The SQLite library contains a number of utility functions that are useful for both application developers, and those working on SQLite extensions. Most of these are not required for basic database tasks, but if your code is strongly tied to SQLite, you may find these particularly useful.
There are several functions available to query the version of the SQLite
library. Each API call has a corresponding
#define macro that declares the same value.
const char* sqlite3_libversion( )
Returns the SQLite library version as a UTF-8 string.
int sqlite3_libversion_number( )
Returns the SQLite library version as an integer.
The format is
M is the major
version (3, in this case),
N is the minor number,
P is the point
release. This format allows for releases up to
3.999.999. If a sub-point release is made, it will
not be indicated in this version number.
const char* sqlite3_sourceid( )
Returns the check-in stamp of the code used in this release. The string consists of a date, time stamp, and an SHA1 hash of the source from the source repository.
If you’re building your own application, you can
#define macros and the function
calls to verify that you’re using the correct header for the available
#define values come from the header file, and are set when your application is compiled. The function calls return the same values that were baked into the library when it ...