You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
goldeneye: build SQLite from source and treat compile options as extensions
Which functions a SQLite has is decided when it is compiled, and the
official sqlite3 binary's option set matches neither the driver sqlc's
tests run against nor any other in particular. So instead of downloading
that binary, `install sqlite` downloads the pinned release's amalgamation,
checked against the SHA3-256 sqlite.org lists, and compiles the shell
from it with cc or $CC: once with the options sqlite.org's own configure
turns on by default, which gives functions.jsonl, and once per option in
the extension list, each of which gets a directory under extensions/
holding the functions its build adds over the default one — found the
way the PostgreSQL generator finds what CREATE EXTENSION adds, by
comparing the catalog with and without. GEOPOLY lives inside the RTREE
module, so its build carries both options. Each shell is checked against
pragma compile_options before it is read, so a stale build is caught.
The eight builds take about fifteen seconds unoptimised.
A schema says which options it needs the way SQLite itself does, with
CREATE VIRTUAL TABLE ... USING fts5. dialect.json gains a modules map
from a virtual table module to its extension, the seed resolves a module
or extension name through it, and both the legacy catalog and the core
load the extension when a virtual table is declared, so the fts5 case
keeps its typed bm25, highlight and snippet results. The legacy
catalog's createExtension also now records what it loaded, which it
never did.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RYkxvtwH6GgysuWYP87vyj
0 commit comments