[boost][sqlite] some feedback on the docs

Hi Everyone, First, I wanted to thank Klements for writing and sharing Boost.SQLite and for submitting it for the review. This is by no means a review. But I have started reading the docs and I have some initial feedback that I wanted to share. I am not familiar with sqlite3 interface, so I am reading the docs from the perspective of someone new. [1] Reference section in the documentation is insufficient. With a C++ mindset, I tried to figure out how the session management works, and the documentation of sqlite/connection.hpp does not help me. I cannot find if the resources are allocated in the constructor. Any constructor? Why do you have two? Why do you have a separate function connect()? What is the purpose of having a constructor if I still need to call connect()? According to the docs, connection class has no destructor,from which I gather that I have to manage the session lifetime manually and close it with function close(). If any other function throws an exception, I will not be able to close the connection. Is that intended? There are actually two functions: release() and close(). The docs do not tell me how they differ and which one I should use and when: how is releasing the handle in class connection different from closing the connection? I also cannot see what exception type is thrown from connection functions and under what conditions. The constructor taking handle_type: where would I use it? Or maybe it is only intended to be called by macros? function valid(): not clear what is an d is not valid in this context: does this indicate the default-constructed state, or is it a term specific to sqlite? [2] Dragging the entire <sqlite3.h> The names like SQLITE_OPEN_READWRITE seem to come from <sqlite3>. So this library indirectly drags the entire <sqlite3.h>, and all the declarations into the global namespace. Is this necessary? One could imagine an alternative when this is only included in the library cpp files. No? In any case, this should be documented. [3] It is interesting that "virtual table" has one meaning in the sqlite world and another in the C++ world: a virtual pointer table. Maybe the docs should highlight that. [4] Exposing sqlite for non-eponymous tables https://klemens.dev/sqlite/#non_eponymous_tables I am reviewing this in a hurry, so maybe I am missing something obvious, but it looks to be like this lib could offer an interface that does not use sqlite types, but their Boost.Sqlite wrappers instead: It could be just a pair of two functions -- you do not have to derive from anything. The example has: struct csv_module final : sqlite::vtab::module<csv_table>{ // create the csv file sqlite::result<table_type> What are csv_table and table_type? Regards, &rzej;
participants (1)
-
Andrzej Krzemienski