Liking cljdoc? Tell your friends :D

hive-datascript.swarm.slave-index

Slave rows, read once per connection and then kept current from each transaction's delta.

Reading every slave entity is the expensive part of a roster query: the swarm keeps every row it ever saw, so a full read materializes thousands of entities to return the handful that are live. This index pays that cost once, then re-reads only the slave entities a transaction touched.

Consumers that want to react instead of poll subscribe! and are called after any transaction that changed a slave row.

Slave rows, read once per connection and then kept current from each
transaction's delta.

Reading every slave entity is the expensive part of a roster query: the
swarm keeps every row it ever saw, so a full read materializes thousands
of entities to return the handful that are live. This index pays that
cost once, then re-reads only the slave entities a transaction touched.

Consumers that want to react instead of poll `subscribe!` and are called
after any transaction that changed a slave row.
raw docstring

apply-deltaclj

(apply-delta by-eid touched db-after)

BY-EID advanced by one transaction: only the TOUCHED slave entities are re-read from DB-AFTER.

BY-EID advanced by one transaction: only the TOUCHED slave entities are
re-read from DB-AFTER.
sourceraw docstring

scanclj

(scan db)

{eid slave-map} for every slave row in DB. The full read.

{eid slave-map} for every slave row in DB. The full read.
sourceraw docstring

slavesclj

(slaves c db)

{eid slave-map} for conn C, whose current value is DB. Served from the index when it is current; rebuilt, with its listener installed on C, when it is not.

{eid slave-map} for conn C, whose current value is DB. Served from the
index when it is current; rebuilt, with its listener installed on C,
when it is not.
sourceraw docstring

subscribe!clj

(subscribe! key f)

Call F (no args) after every transaction that changes a slave row. Re-subscribing under KEY replaces the previous F. Returns KEY.

Call F (no args) after every transaction that changes a slave row.
Re-subscribing under KEY replaces the previous F. Returns KEY.
sourceraw docstring

touched-eidsclj

(touched-eids tx-data)

Entity ids whose slave attributes TX-DATA changed.

Entity ids whose slave attributes TX-DATA changed.
sourceraw docstring

unsubscribe!clj

(unsubscribe! key)

Stop calling the subscriber under KEY.

Stop calling the subscriber under KEY.
sourceraw 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