Column codecs every persistence backend shares: entity ids and references, keyword, timestamp and JSON TEXT columns, and turn status values. A leaf namespace, so the facade, the SQLite backend and the public API require it without a load cycle.
Column codecs every persistence backend shares: entity ids and references, keyword, timestamp and JSON TEXT columns, and turn status values. A leaf namespace, so the facade, the SQLite backend and the public API require it without a load cycle.
Persistence facade: the Store protocol, the connection lifecycle and the
guarantees every backend gets before it sees a call.
SQLite is the one backend Vis ships. Its namespace loads on the first store
operation, not with this facade (see sqlite), so commands that never touch
the store skip ~480 ms of JDBC/Hikari class loading on a cold JVM.
Every Store op forwards to that backend, which hands the facade its
implementation through store-implementation: a backend missing an op fails
to compile.
Frontends still call db-error->user-message here; the backend owns the
actual translation. Same for the store-staleness check the process-wide
shared connection uses.
Persistence facade: the `Store` protocol, the connection lifecycle and the guarantees every backend gets before it sees a call. SQLite is the one backend Vis ships. Its namespace loads on the first store operation, not with this facade (see `sqlite`), so commands that never touch the store skip ~480 ms of JDBC/Hikari class loading on a cold JVM. Every `Store` op forwards to that backend, which hands the facade its implementation through `store-implementation`: a backend missing an op fails to compile. Frontends still call `db-error->user-message` here; the backend owns the actual translation. Same for the store-staleness check the process-wide shared connection uses.
JSON for extension aggregate identifiers and Python state. Object keys in identifiers are sorted because SQLite uses text equality for lookups.
JSON for extension aggregate identifiers and Python state. Object keys in identifiers are sorted because SQLite uses text equality for lookups.
SQLite store.
Implements the persistence facade's Store protocol: backend, at the end
of this file, hands the facade every op through store-implementation,
which clj-kondo cannot expand, so the ns-level config above silences
:unused-public-var for the whole file. The call surface is verified
through the storage facade tests.
Tables (schema.sql): session_soul, session_state, session_turn_soul, session_turn_state, session_turn_iteration, llm_routing_event, extension_aggregate
Connection lifecycle: (db-open! db-spec) -> {:datasource ds :path ...} (db-close! store) -> idempotent dispose
SQLite store.
Implements the persistence facade's `Store` protocol: `backend`, at the end
of this file, hands the facade every op through `store-implementation`,
which clj-kondo cannot expand, so the ns-level config above silences
`:unused-public-var` for the whole file. The call surface is verified
through the storage facade tests.
Tables (schema.sql):
session_soul, session_state,
session_turn_soul, session_turn_state,
session_turn_iteration, llm_routing_event,
extension_aggregate
Connection lifecycle:
(db-open! db-spec) -> {:datasource ds :path ...}
(db-close! store) -> idempotent disposeReclaim free SQLite pages in short transactions. Pass work to the janitor so the gateway can start without waiting for the reclaim.
Reclaim free SQLite pages in short transactions. Pass work to the janitor so the gateway can start without waiting for the reclaim.
Install the SQLite schema in an empty store. Do not change any other store.
Install the SQLite schema in an empty store. Do not change any other store.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |