Loading Extensions

Warning: May not work on your platform!

Harlequin uses Python’s distribution of SQLite, via its built-in sqlite3 library. On some (most?) platforms, including MacOS and Ubuntu, this library disables support for extensions. Windows is the notable exception where this should “just work.”

To allow Harlequin to load SQLite extensions, you may have to rebuild your Python from source, passing specific config during the Python build process.

Loading Extensions Using CLI Option

You can install and load SQLite extensions when starting Harlequin, by invoking the -e or --extension option one or more times:

$ harlequin -e ./fts5 -e ./json1

The argument to the option should be a path to a SQLite extension executable. Loading specific entrypoints is not supported via the CLI option.

Loading Extensions via Init Script or SQL API

You can use a .load command in an initialization script to load an extension (optionally specifying an entrypoint).

Or you can execute a select load_extension(...) statement in Harlequin’s Query Editor.