Which SQLite feature?
LiteORM’s SQLite backend carries a cluster of capabilities that go well beyond plain rows — search, streamed blobs, column transforms, at-rest encryption, and change capture. This page is the front door: find the job you have, follow the link. Every feature here is SQLite-only and works transparently above both the query builder and the orm.
Pick by need
Section titled “Pick by need”| I want to… | Use | Guide |
|---|---|---|
| Full-text, semantic (vector), or hybrid search over my rows | FTS5 / vec0 sidecar indexes | SQLite search |
Store files, uploads, or media too big to load whole into a []byte |
orm.LOB streamed large objects |
Large objects |
| Transparently transform one column on write/read (JSON, gob, compress, encrypt) | A codec: field codec |
Field codecs |
| Encrypt the whole database file at rest, single key, no format change | sqlite.OpenEncrypted page cipher |
At-rest encryption |
| Encrypt and/or compress the whole database at rest, or share it across recipients | The vault container |
Compressed & encrypted databases |
| Audit, replicate, or undo the changes a set of statements made | SESSION-extension changesets | SQLite changesets |
The three that overlap
Section titled “The three that overlap”Three features can all “compress” or “encrypt,” and it is easy to reach for the wrong one. They operate at different granularities and compose cleanly, so the question is scope, not which is best.
Compression — one column vs one object vs the whole file. A field codec compresses a single column’s value on its way to and from the database, keeping the Go field its natural type. A large object compresses the streamed content of one orm.LOB field at rest, chunk by chunk, for content too big to hold in memory. The vault container compresses every page of the whole database file. Reach column-level for a hot JSON blob you still query, object-level for big write-once payloads (files, logs), file-level when you want the entire database smaller on disk regardless of shape.
Encryption — one column vs the whole file, two ways. A field-codec encryption codec encrypts one column — application code reads plaintext, the column holds ciphertext, and the rest of the row (and the file) stays plaintext; use it when only specific fields are sensitive and the rest should remain queryable and indexable. At-rest encryption (sqlite.OpenEncrypted) encrypts every page of the whole file with a single key, transparently, with no on-disk format change and the smallest dependency footprint — the default when the whole database is sensitive. The vault container also encrypts the whole file, but adds compression, multi-recipient key wrapping, and tamper-evidence in a distinct container format — reach for it when you need those, not for plain whole-file encryption. See the encryption guide for the full comparison.
They stack: a field-codec-encrypted column inside a database opened with OpenEncrypted, whose big orm.LOB content is compressed, is a perfectly ordinary setup.
See also
Section titled “See also”- At-rest encryption — the single-key whole-file page cipher, and the vault-vs-codec comparison table.
- Backends reference — opening the SQLite backend and its configuration.
- Remote SQLite (quicSQL) — every feature here (except streaming large objects) works against a remote server too.