A very thin wrapper around SQLite3, written in C++.
The C interface of SQLite3 is a good interface for the most part.
The goal of this wrapper is to add type safety where it is useful, apply RAII
to outputs and generally make the library cleaner to call from C++.
The rules used for wrapping the SQLite3 library are as follows:
- Match the library; type for type, function for function.
- Matching type names will be suffixed with _t.
- Throw exception on error.
- Return output parameters.
- Non-error flags each have a unique type. eg. SQLITE_OPEN_* and
SQLITE_STATUS_*. - Constant values become constant variables of the same name (in lower case).
- UTF-16 characters will be of type
char16_t
. - Output strings are returned as
std::basic_string
. - Functions that create objects that must be cleaned up shall be returned as
std::unique_ptr<T>
with a custom deleter for clean-up and will have the type
name unique_*. - Multiple results are returned in a
std::tuple
, in the order they appear
in the original function declaration from left to right.