The seam between the pure engine and a concrete SQLite binding.
The engine (registry, invalidation, recomputation) is pure cljc logic over this protocol; every platform provides one implementation over its native binding - org.sqlite.jni on the JVM, sqlite-wasm's capi in ClojureScript. Handles are opaque: prepared statements especially are binding-specific objects the engine only ever passes back.
Method map, with the contract the engine relies on:
-exec! run one statement for effect -prepare compile one statement, reused for every recompute -run-query bind + step a prepared statement to completion and reset it for reuse; returns rows as maps -finalize! release a prepared statement -subscribe! deliver raw preupdate events (preupdate.clj's shape) and rollback notifications -column-names declared columns of a table (a zero-row select) -eqp-tables the planner's table set for a statement -autocommit? whether no transaction is open -close! close the connection; per-db hooks are cleaned up raw-connection the native handle (sqlite3 on the JVM), for statement layers layered on top - nil where meaningless (wasm)
The seam between the pure engine and a concrete SQLite binding.
The engine (registry, invalidation, recomputation) is pure cljc
logic over this protocol; every platform provides one
implementation over its native binding - org.sqlite.jni on the
JVM, sqlite-wasm's capi in ClojureScript. Handles are opaque:
prepared statements especially are binding-specific objects the
engine only ever passes back.
Method map, with the contract the engine relies on:
-exec! run one statement for effect
-prepare compile one statement, reused for every recompute
-run-query bind + step a prepared statement to completion and
reset it for reuse; returns rows as maps
-finalize! release a prepared statement
-subscribe! deliver raw preupdate events (preupdate.clj's shape)
and rollback notifications
-column-names declared columns of a table (a zero-row select)
-eqp-tables the planner's table set for a statement
-autocommit? whether no transaction is open
-close! close the connection; per-db hooks are cleaned up
raw-connection the native handle (sqlite3 on the JVM), for
statement layers layered on top - nil where meaningless (wasm)(run-stmt b stmt params)(subscribe! b on-raw-event on-rollback)(finalize-stmt b stmt)(prepare-stmt b sql)(raw-connection b)(autocommit? b)(close-backend! b)(eqp-tables b sql)(column-names b table)(exec-stmt! b sql params)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 |