chickadee » sql-de-lite » load-extension!

load-extension! db filename #!optional entry-pointprocedure

Loads a SQLite extension library from filename and initializes it by calling entry-point, a string containing the name of a C function. If filename is not found, it will try filename.so, filename.dylib or filename.dll as appropriate for the platform. If entry-point is omitted or #f, SQLite guesses the entry point name from the filename. See the documentation for sqlite3_load_extension for further details.

As an example, see tests/run.scm and tests/rot13.c in the egg source, which define and call a rot13 function.

Warning. This allows arbitrary code to be loaded and executed from disk at runtime, and could conceivably cause the extension's state to get out of sync. Please proceed with extreme caution.