SQLite Wrapper C++
last published on 26 September 2021
The Shoutz0r mediaserver has sprouted a number of simple libraries that were necessary to properly construct the server. One of these libraries is a wrapper for the C SQLite library.
It gives the user a simple thread-safe interface to using queries and resultsets in a more object-oriented environment. It's usage is very simple, merely looking at the header files will give you an impression of how it should work.
This is an example of a simple query from the Shoutz0r codebase. It creates an ObjectResult query with the File structure as it's template class, using the FileFactory method (which is defined elsewhere), the contents of File objects is initialized and inserted into the ObjectResult.
From thereon out, it's a matter of addressing the objects in the objectresult like an array of references to File structures.
The release is somewhat sloppy, a rudimentary Makefile is supplied which will make everything compile and generates a library. For examples of how to use it, check the Shoutzor project, in particular the files in the db/ folder.
Snapshot build from 26-04-2010