| title | Limits & pitfalls | ||
|---|---|---|---|
| description | Bind-value size cap, per-connection virtual tables and hooks, and other behaviours to know. | ||
| sidebar |
|
- Bind values are capped at ~2 GiB. A single bound BLOB/TEXT parameter can't exceed
INT_MAXbytes — a SQLite limit, surfaced as an error rather than a silent truncation. - Virtual tables are per-connection. A
CREATE VIRTUAL TABLE … USING module(...)and the module registration live on one connection. Underdatabase/sql's pool, register the module on every conn (the/autoblank-import or aDriver.ConnectHook), or pin a single connection. - Per-conn hooks need a pinned conn. Update / authorizer / commit / rollback / pre-update / trace hooks are per-connection;
db.Exec/db.Querymay pick any pooled conn. Pin withdb.SetMaxOpenConns(1)+db.Conn(ctx)+sc.Raw(...)and drive traffic through that conn. See Hooks. - sqlite-vec quirks — no
INSERT OR REPLACE(useUpdate); metadata/partition columns reject NULL;bit[N]needsN%8==0. See Vector search. - libc version pin — your downstream
go.modmust use the samemodernc.org/libcversion this module pins, or the C-side ABI drifts.go mod tidyagainst this module maintains it; inspect withjust libc-pin. - userauth is not available —
_auth*DSN flags are rejected (the feature was removed upstream).