Liking cljdoc? Tell your friends :D

scriva.client

Idiomatic Clojure client for ScrivaDB.

Functions take and return plain Clojure maps; streaming RPCs (find, watch, aggregate, snapshot) return lazy seqs. Every call carries the x-api-key gRPC metadata automatically.

(require '[scriva.client :as scriva])
(let [db (scriva/connect {:host "localhost" :port 5433 :api-key "dev-key"})]
  (scriva/create-collection db "users")
  (let [id (scriva/insert db "users" {"name" "Alice" "age" 30})]
    (println (get-in (scriva/find-by-id db "users" id) [:data "name"])))
  (scriva/close db))
Idiomatic Clojure client for ScrivaDB.

Functions take and return plain Clojure maps; streaming RPCs (find, watch,
aggregate, snapshot) return lazy seqs. Every call carries the `x-api-key`
gRPC metadata automatically.

    (require '[scriva.client :as scriva])
    (let [db (scriva/connect {:host "localhost" :port 5433 :api-key "dev-key"})]
      (scriva/create-collection db "users")
      (let [id (scriva/insert db "users" {"name" "Alice" "age" 30})]
        (println (get-in (scriva/find-by-id db "users" id) [:data "name"])))
      (scriva/close db))
raw docstring

scriva.example

End-to-end example mirroring the Java client's BasicExample: connect, manage collections, CRUD, keyed CRUD + CAS (N1), keyset pagination + multi-field ordering (N3), aggregations (N4), and a lazy-seq watch.

Requires a running server (make run from the repo root). Run with: lein run -m scriva.example

End-to-end example mirroring the Java client's BasicExample: connect, manage
collections, CRUD, keyed CRUD + CAS (N1), keyset pagination + multi-field
ordering (N3), aggregations (N4), and a lazy-seq watch.

Requires a running server (`make run` from the repo root). Run with:
  lein run -m scriva.example
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close