Skip to Main Content
Using SQLite
book

Using SQLite

by Jay A. Kreibich
August 2010
Intermediate to advanced content levelIntermediate to advanced
526 pages
23h 39m
English
O'Reilly Media, Inc.
Content preview from Using SQLite

Utility Functions

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.

Version Management

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.

SQLITE_VERSION const char* sqlite3_libversion( )

Returns the SQLite library version as a UTF-8 string.

SQLITE_VERSION_NUMBER int sqlite3_libversion_number( )

Returns the SQLite library version as an integer. The format is MNNNPPP, where M is the major version (3, in this case), N is the minor number, and 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.

SQLITE_SOURCE_ID 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 use the #define macros and the function calls to verify that you’re using the correct header for the available library. The #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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning SQL, 3rd Edition

Learning SQL, 3rd Edition

Alan Beaulieu
High Performance MySQL, 4th Edition

High Performance MySQL, 4th Edition

Silvia Botros, Jeremy Tinley

Publisher Resources

ISBN: 9781449394592Errata PageSupplemental Content