Add Database::VERSION, getLibVersion() and getLibVersionNumber()

Usefull to get SQLite3 version without including sqlite3.h in application code
This commit is contained in:
Sébastien Rombauts
2016-07-25 21:53:06 +02:00
parent f77b707206
commit 648ffe01e8
4 changed files with 30 additions and 5 deletions

View File

@@ -32,6 +32,21 @@ extern const int OPEN_MEMORY = SQLITE_OPEN_MEMORY;
extern const int OK = SQLITE_OK;
extern const char* VERSION = SQLITE_VERSION;
extern const int VERSION_NUMBER = SQLITE_VERSION_NUMBER;
// Return SQLite version string using runtime call to the compiled library
const char* getLibVersion() noexcept // nothrow
{
return sqlite3_libversion();
}
// Return SQLite version number using runtime call to the compiled library
const int getLibVersionNumber() noexcept // nothrow
{
return sqlite3_libversion_number();
}
// Open the provided database UTF-8 filename with SQLite::OPEN_xxx provided flags.
Database::Database(const char* apFilename,