Module sqlite_loadable::ext
source · Expand description
Unsafe wrappers around low-level sqlite3 C API.
Functions
This function MUST be called in loadable extension before any of the below functions are invoked.
(The sqlite_entrypoint function will do this for you).
This essentially emulates the SQLITE_EXTENSION_INIT2 macro that’s not available in rust-land.
Without it, when dynamically loading extensions, calls to SQLite C-API functions in sqlite3ext_sys
like sqlite3_value_text will segfault, because sqlite3ext.h does not include their proper definitions.
Instead, a sqlite3_api_routines object is provided through the entrypoint at runtime, to which
sqlite_loadable will redefine the static SQLITE3_API variable that the functions below requre.