Dynamic var used in conjunction with re-db.patterns/capture-patterns macro to identify patterns read by a block of code.
Dynamic var used in conjunction with re-db.patterns/capture-patterns macro to identify patterns read by a block of code.
(add-value value-map pattern-key pattern value)
Associates value with pattern in value-map.
Associates value with pattern in value-map.
(capture-patterns & body)
Evaluates body, returning map with evaluation result and read patterns.
Evaluates body, returning map with evaluation result and read patterns.
(datom-patterns datoms many?)
(datom-patterns datoms many? pattern-keys)
Returns a map of patterns matched by a list of datoms. Limits patterns to those listed in pattern-keys. many? should return true for attributes which have schema value :db.cardinality/many?.
Returns a map of patterns matched by a list of datoms. Limits patterns to those listed in pattern-keys. many? should return true for attributes which have schema value :db.cardinality/many?.
(datom-values value-map datoms many?)
Returns the set of values in value-map associated with patterns matched by datoms.
Returns the set of values in value-map associated with patterns matched by datoms.
(invalidate! db pattern-key pattern)
Invalidate a pattern, ie. invoke callbacks that match pattern
Invalidate a pattern, ie. invoke callbacks that match pattern
(patterns this)
Return the patterns currently listened to
Return the patterns currently listened to
(reaction this)
the action to take when a listened pattern matches
the action to take when a listened pattern matches
(listen-lookup-ref [lookup-attr lookup-val :as lookup-ref]
kind
pattern
listeners
db
f)
Adds lookup ref listener, which uses an intermediate listener to update when the target of a lookup ref changes.
Adds lookup ref listener, which uses an intermediate listener to update when the target of a lookup ref changes.
(log-read kind pattern)
(log-read kind pattern multiple?)
Record pattern to pattern-log.
Record pattern to *pattern-log*.
(lookup-ref? kind pattern)
Returns true if pattern has lookup ref in id position.
Returns true if pattern has lookup ref in id position.
(non-empty-keys m)
Returns list of keys for which map contains a non-empty value.
Returns list of keys for which map contains a non-empty value.
(pattern-values pattern-map value-map)
Returns values associated with patterns.
value-map is of form {<pattern-key> {<pattern> #{...set of values...}}}. pattern-map is of form {<pattern-key> #{...set of patterns...}}
Returns values associated with patterns. value-map is of form {<pattern-key> {<pattern> #{...set of values...}}}. pattern-map is of form {<pattern-key> #{...set of patterns...}}
(remove-value value-map pattern-key pattern value)
Removes value associated with pattern in value-map.
Removes value associated with pattern in value-map.
(resolve-id db-snap attr val)
Copied from re-db.core.
Copied from re-db.core.
(unlisten db patterns value)
Removes pattern listener.
Removes pattern listener.
(unlisten-lookup-ref lookup-ref kind pattern listeners db f)
Removes lookup ref listener.
Removes lookup ref listener.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close