chickadee » orm-db-rqlite » rqlite-backend

rqlite-backendprocedure

Returns a backend alist implementing the orm-db protocol (the keys connect, close, query, execute, and batch), backed by rqlite's HTTP API. Pass the result to db/backend.

(db/backend (rqlite-backend))

The backend procedures are used by orm-db; you do not normally call them directly:

  • connect: records the rqlite base URL from db/path (no socket is opened)
  • close: no-op
  • query: POSTs a SELECT to /db/request, returning a vector of alists (rqlite's associative mode yields rows keyed by column name)
  • execute: POSTs a statement and returns the requested output value; rqlite errors are raised as a CHICKEN (error 'rqlite ...) condition
  • batch: POSTs several SELECTs in one request and returns a list of row vectors, one per statement (see Batching below)