Name
sqlite3_load_extension() — Load a dynamic extension
Definition
int sqlite3_load_extension( sqlite3* db, const char* file, const char* entry_point, char** errmsg );
-
db
A database connection.
-
file
The path and filename of the extension.
-
entry_point
The name of the entry-point function. If this is NULL, the name
sqlite3_extension_init
will be used.-
errmsg
An optional reference to a string pointer. If the function returns anything other than
SQLITE_OK
, and error message will be passed back. If no error is encountered, the pointer will be set to NULL. The reference may be NULL to ignore error messages. Error messages must be freed withsqlite3_free()
.- Returns
An SQLite result code.
Description
This function attempts to load an SQLite dynamic extension. By
default, the use of dynamic extensions are disabled, and must be
enabled using the sqlite3_enable_load_extension()
call.
This function is also exposed as the load_extension()
SQL function.
Although there are no limits on when an extension may be loaded,
many extensions register new functions and are thus subject to
the limits of sqlite3_create_function()
.
For more information on dynamic extensions, please see the section Using Loadable Extensions.
See Also
sqlite3_enable_load_extension() [C API, Ap G], sqlite3_create_function() [C API, Ap G], load_extension() [SQL Func, Ap E]
Get Using SQLite now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.