Liking cljdoc? Tell your friends :D

re-db.core


*db-log*cljs


*notify*cljs


*prevent-notify*cljs


add-map-datomscljs

(add-map-datoms datoms id m prev-m db-snap)

add-map-indexescljs

(add-map-indexes db-snap id m prev-m)

conj-setcljs


contains?cljs

(contains? db-snap id)

Returns true if entity with given id exists in db.

Returns true if entity with given id exists in db.
raw docstring

createcljs

(create)
(create schema)

Create a new db, with optional schema, which should be a mapping of attribute keys to the following options:

:db/index [true, :db.index/unique] :db/cardinality [:db.cardinality/many]

Create a new db, with optional schema, which should be a mapping of attribute keys to
the following options:

  :db/index       [true, :db.index/unique]
  :db/cardinality [:db.cardinality/many]
raw docstring

db-logclj/smacro

(db-log & body)

entitiescljs

(entities db-snap qs)

entitycljs

(entity db-snap id)

Returns entity for resolved id.

Returns entity for resolved id.
raw docstring

entity-idscljs

(entity-ids db-snap qs)

getcljs

(get db-snap id attr)
(get db-snap id attr not-found)

Get attribute in entity with given id.

Get attribute in entity with given id.
raw docstring

get-incljs

(get-in db-snap id ks)
(get-in db-snap id ks not-found)

Get-in the entity with given id.

Get-in the entity with given id.
raw docstring

get-in*clj/smacro

(get-in* m ks)
(get-in* m ks not-found)

Compiled version of get-in, small performance boost over the get-in function.

Compiled version of get-in, small performance boost over the `get-in` function.
raw docstring

get-schemacljs

(get-schema db-snap a)

index?cljs

(index? schema)
(index? db-snap a)

Returns true if attribute is indexed.

Returns true if attribute is indexed.
raw docstring

into-setcljs


listencljs

(listen db f)
(listen db patterns f)

Adds listener for transactions which contain datom(s) matching the provided pattern. If patterns not provided, matches all transactions.

Patterns should be a map containing any of the following keys, each containing a collection of patterns:

:e__ entity [id _ _] :ea_ entity-attribute [id attr _] :_av attribute-value [_ attr val] :a attribute [_ attr _]

Adds listener for transactions which contain datom(s) matching the provided pattern. If patterns not provided, matches all transactions.

Patterns should be a map containing any of the following keys, each containing a collection of patterns:

 :e__      entity                              [id _ _]
 :ea_      entity-attribute                    [id attr _]
 :_av      attribute-value                     [_ attr val]
 :_a_      attribute                           [_ attr _]
raw docstring

many?cljs

(many? schema)
(many? db-snap a)

Returns true for attributes with cardinality many, which store a set of values for each attribute.

Returns true for attributes with cardinality `many`, which store a set of values for each attribute.
raw docstring

merge-schema!cljs

(merge-schema! db schema)

Merge additional schema options into a db. Indexes are not created for existing data.

Merge additional schema options into a db. Indexes are not created for existing data.
raw docstring

peekclj/smacro

(peek & body)

Evaluates body without tracking read patterns.

Evaluates body without tracking read patterns.
raw docstring

ref?cljs

(ref? schema)

resolve-idcljs

(resolve-id db-snap id)
(resolve-id db-snap attr val)

Returns id, resolving lookup refs (vectors of the form [attribute value]) to ids. Lookup refs are only supported for indexed attributes. The 3-arity version is for known lookup refs, and does not check for uniqueness.

Returns id, resolving lookup refs (vectors of the form `[attribute value]`) to ids.
Lookup refs are only supported for indexed attributes.
The 3-arity version is for known lookup refs, and does not check for uniqueness.
raw docstring

select-keyscljs

(select-keys db-snap id ks)

Select keys from entity of id

Select keys from entity of id
raw docstring

touchcljs

(touch db-snap {:keys [db/id] :as entity})

Add refs to entity

Add refs to entity
raw docstring

transact!cljs

(transact! db txs)
(transact! db txs {:keys [notify log-datoms] :or {notify true}})

unique-idcljs

(unique-id)

Returns a unique id (string).

Returns a unique id (string).
raw docstring

unique?cljs

(unique? schema)
(unique? db-snap a)

Returns true for attributes where :db/index is :db.index/unique.

Returns true for attributes where :db/index is :db.index/unique.
raw docstring

unlistencljs

(unlisten db f)
(unlisten db patterns f)

Remove listener from patterns (if provided) or :tx-log.

Remove listener from patterns (if provided) or :tx-log.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close