(->atom q)
(->atom q error-handler)
Returns an atom holding the latest value of a DocumentReference or Query.
Returns an atom holding the latest value of a DocumentReference or Query.
(add! c m)
Adds a document to a collection. Its id will be automatically generated.
Adds a document to a collection. Its id will be automatically generated.
(add-listener q f)
Adds a snapshot listener to a DocumentReference or Query.
Listener is a fn of arity 2. First arg is the QuerySnapshot, second arg is a FirestoreException. Returns an ListenerRegistration object.
Adds a snapshot listener to a DocumentReference or Query. Listener is a fn of arity 2. First arg is the QuerySnapshot, second arg is a FirestoreException. Returns an ListenerRegistration object.
(array-remove & vs)
Used with set!
and merge!
. Removes values from an array field.
Used with `set!` and `merge!`. Removes values from an array field.
(array-union & vs)
Used with set!
and merge!
. Adds unique values to an array field.
Used with `set!` and `merge!`. Adds unique values to an array field.
(assoc! d & kvs)
Associates new keys and values.
Associates new keys and values.
(client-with-creds creds-path)
Creates a client from a credentials JSON file.
Creates a client from a credentials JSON file.
(collection db coll-name)
Returns a CollectionReference for the collection of given name.
Returns a CollectionReference for the collection of given name.
(default-client project-id)
Gets default client i.e. using a service account.
Gets default client i.e. using a service account.
(delete)
Used with set!
and merge!
. A sentinel value that marks a field for deletion.
Used with `set!` and `merge!`. A sentinel value that marks a field for deletion.
(detach a)
Detaches an atom built with ->atom.
Detaches an atom built with ->atom.
(document c id)
Gets a document from a collection reference.
Gets a document from a collection reference.
(filter-contains q field value)
Filters where field contains value.
Filters where field contains value.
(filter-contains-any q field arr)
Filters where field contains one of the values in arr.
Filters where field contains one of the values in arr.
(filter-in q field arr)
Filters where field is one of the values in arr.
Filters where field is one of the values in arr.
(filter< q field value)
Filters where field < value.
Filters where field < value.
(filter<= q field value)
Filters where field <= value.
Filters where field <= value.
(filter= q m)
(filter= q field value)
Filters where field = value. A map may be used for checking multiple equalities.
Filters where field = value. A map may be used for checking multiple equalities.
(filter> q field value)
Filters where field > value.
Filters where field > value.
(filter>= q field value)
Filters where field >= value.
Filters where field >= value.
(id d)
Returns the id of a document, given a reference.
Returns the id of a document, given a reference.
(inc v)
Used with set!
and merge!
. Increments a numeric field.
Used with `set!` and `merge!`. Increments a numeric field.
(merge! d m)
Updates fields of a document.
Updates fields of a document.
(order-by q & ordering)
Orders by a sequence of fields with optional directions. Notice that ordering by multiple fields requires creation of a composite index.
Orders by a sequence of fields with optional directions. Notice that ordering by multiple fields requires creation of a composite index.
(pull q)
Pulls data from a DocumentReference or Query.
Pulls data from a DocumentReference or Query.
(server-timestamp)
Used with set!
and merge!
. Timestamp for when the update operation is performed on server.
Used with `set!` and `merge!`. Timestamp for when the update operation is performed on server.
(set! c doc-name m)
Creates or overwrites a document.
Creates or overwrites a document.
(snapshot->data s)
Gets a DocumentSnapshot/CollectionSnapshot/QuerySnapshot's underlying data.
Gets a DocumentSnapshot/CollectionSnapshot/QuerySnapshot's underlying data.
(take q n)
Limits results to a certain number.
Limits results to a certain number.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close