Liking cljdoc? Tell your friends :D

firestore-clj.core


->atomclj

(->atom q)
(->atom q
        {:keys [error-handler plain-fn]
         :or {error-handler identity plain-fn snapshot->data}})

Returns an atom holding the latest value of a DocumentReference or Query.

Returns an atom holding the latest value of a DocumentReference or Query.
sourceraw docstring

add!clj

(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.
sourceraw docstring

add-listenerclj

(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.
sourceraw docstring

array-removeclj

(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.
sourceraw docstring

array-unionclj

(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.
sourceraw docstring

assocclj

(assoc context d & kvs)

Associates new keys and values in a batched write/transaction context.

Associates new keys and values in a batched write/transaction context.
sourceraw docstring

assoc!clj

(assoc! d & kvs)

Associates new keys and values.

Associates new keys and values.
sourceraw docstring

batchclj

(batch db)

Get a new write batch

Get a new write batch
sourceraw docstring

client-with-credsclj

(client-with-creds creds-path)

Creates a client from a credentials JSON file.

Creates a client from a credentials JSON file.
sourceraw docstring

collclj

(coll db coll-name)

Returns a CollectionReference for the collection of given name.

Returns a CollectionReference for the collection of given name.
sourceraw docstring

commit!clj

(commit! b)

Commits a write batch.

Commits a write batch.
sourceraw docstring

create!clj

(create! d m)

Creates a new document at the DocumentReference's location. Fails if the document exists.

Creates a new document at the DocumentReference's location. Fails if the document exists.
sourceraw docstring

default-clientclj

(default-client project-id)

Gets default client i.e. using a service account.

Gets default client i.e. using a service account.
sourceraw docstring

deleteclj

(delete context d)

Deletes a document in a batched write/transaction context.

Deletes a document in a batched write/transaction context.
sourceraw docstring

delete!clj

(delete! d)

Deletes a document.

Deletes a document.
sourceraw docstring

detachclj

(detach a)

Detaches an atom built with ->atom.

Detaches an atom built with ->atom.
sourceraw docstring

dissocclj

(dissoc context d & ks)

Deletes keys in a batched write/transaction context.

Deletes keys in a batched write/transaction context.
sourceraw docstring

dissoc!clj

(dissoc! d & ks)

Deletes keys.

Deletes keys.
sourceraw docstring

docclj

(doc c)
(doc c id)

Gets a DocumentReference given CollectionReference and an id. If id is not given, it will point to a new document with an auto-generated-id

Gets a DocumentReference given CollectionReference and an id. If id is not given, it will point
to a new document with an auto-generated-id
sourceraw docstring

doc->plainclj

(doc->plain s)

Represents a DocumentSnapshot as plain map.

Represents a DocumentSnapshot as plain map.
sourceraw docstring

doc->plain-with-idclj

(doc->plain-with-id s)

Represents a DocumentSnapshot as a [id plain-doc] pair

Represents a DocumentSnapshot as a [id plain-doc] pair
sourceraw docstring

doc-snapshotclj

(doc-snapshot d)
(doc-snapshot d t)

Gets a QueryDocumentSnapshot given a DocumentReference and possibly a Transaction.

Gets a QueryDocumentSnapshot given a DocumentReference and possibly a Transaction.
sourceraw docstring

docsclj

(docs c ds)

Gets a vector of DocumentReferences, given a vector of ids

Gets a vector of `DocumentReference`s, given a vector of ids
sourceraw docstring

filter-containsclj

(filter-contains q field value)

Filters where field contains value.

Filters where field contains value.
sourceraw docstring

filter-contains-anyclj

(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.
sourceraw docstring

filter-inclj

(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.
sourceraw docstring

filter<clj

(filter< q field value)

Filters where field < value.

Filters where field < value.
sourceraw docstring

filter<=clj

(filter<= q field value)

Filters where field <= value.

Filters where field <= value.
sourceraw docstring

filter=clj

(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.
sourceraw docstring

filter>clj

(filter> q field value)

Filters where field > value.

Filters where field > value.
sourceraw docstring

filter>=clj

(filter>= q field value)

Filters where field >= value.

Filters where field >= value.
sourceraw docstring

idclj

(id d)

Returns the id of a DocumentReference or DocumentSnapshot.

Returns the id of a DocumentReference or DocumentSnapshot.
sourceraw docstring

incclj

(inc v)

Used with set! and merge!. Increments a numeric field.

Used with `set!` and `merge!`. Increments a numeric field.
sourceraw docstring

map!clj

(map! db q f & args)

Updates all docs in a vector or query by applying a function to them

Updates all docs in a vector or query by applying a function to them
sourceraw docstring

mark-for-deletionclj

(mark-for-deletion)

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.
sourceraw docstring

mergeclj

(merge context d m)

Updates field of a document in a batched write/transaction context.

Updates field of a document in a batched write/transaction context.
sourceraw docstring

merge!clj

(merge! d m)

Updates fields of a document.

Updates fields of a document.
sourceraw docstring

order-byclj

(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.
sourceraw docstring

pullclj

(pull q)
(pull q t)

Pulls data from a DocumentReference or Query, possibly inside a transaction context.

Pulls data from a DocumentReference or Query, possibly inside a transaction context.
sourceraw docstring

pull-docclj

Pulls clojure data from a DocumentReference.

Pulls clojure data from a DocumentReference.
sourceraw docstring

pull-docsclj

(pull-docs ds)
(pull-docs ds t)

Pulls clojure data from a sequence of DocumentReferences, possibly inside a transaction context.

Pulls clojure data from a sequence of `DocumentReference`s, possibly inside a transaction context.
sourceraw docstring

pull-queryclj

Pulls results from a Query as clojure data.

Pulls results from a Query as clojure data.
sourceraw docstring

pullvclj

Pulls query results as a vector of document data.

Pulls query results as a vector of document data.
sourceraw docstring

pullv-with-idsclj

Pulls query results as a vector of pairs. Each pair has an id and document data

Pulls query results as a vector of pairs. Each pair has an id and document data
sourceraw docstring

query->plain-mapclj

(query->plain-map s)

Represents a QuerySnapshot as a plain map whose keys are the document ids.

Represents a QuerySnapshot as a plain map whose keys are the document ids.
sourceraw docstring

query->plainvclj

(query->plainv s)

Represents a QuerySnapshot as a plain vector of document data.

Represents a QuerySnapshot as a plain vector of document data.
sourceraw docstring

query->plainv-with-idsclj

(query->plainv-with-ids s)

Represents a QuerySnapshot as a plain vector of [id doc] pairs.

Represents a QuerySnapshot as a plain vector of [id doc] pairs.
sourceraw docstring

query-snapshotclj

(query-snapshot q)
(query-snapshot q t)

Gets a QuerySnapshot given a Query and possibly a Transaction.

Gets a QuerySnapshot given a Query and possibly a Transaction.
sourceraw docstring

server-timestampclj

(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.
sourceraw docstring

setclj

(set context d m)

Creates or overwrites a document in a batched write/transaction context.

Creates or overwrites a document in a batched write/transaction context.
sourceraw docstring

set!clj

(set! d m)

Creates or overwrites a document.

Creates or overwrites a document.
sourceraw docstring

snapshot->dataclj

(snapshot->data s)

Gets a DocumentSnapshot/CollectionSnapshot/QuerySnapshot's underlying data.

Gets a DocumentSnapshot/CollectionSnapshot/QuerySnapshot's underlying data.
sourceraw docstring

takeclj

(take q n)

Limits results to a certain number.

Limits results to a certain number.
sourceraw docstring

transact!clj

(transact! db f)
(transact! db f {:keys [attempts executor] :as options})

Performs a transaction. Optionally, you can specify an executor and the maximum number of attemps.

Performs a transaction. Optionally, you can specify an executor and the maximum number of attemps.
sourceraw docstring

update!clj

(update! db d f & args)

Updates a document by applying a function to it.

Updates a document by applying a function to it.
sourceraw docstring

update-field!clj

(update-field! db d field f & args)

Updates a single field of a document by applying a function to it.

Updates a single field of a document by applying a function to it.
sourceraw docstring

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

× close