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

->streamclj

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

Returns a manifold stream pushing the latest values of a DocumentReference or Query.

Returns a manifold stream pushing the latest values of a DocumentReference or Query.
sourceraw docstring

add!clj

(add! cr 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 dr & fvs)

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

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

assoc!clj

(assoc! dr & fvs)

Associates new fields and values.

Associates new fields and values.
sourceraw docstring

batchclj

(batch db)

Get a new write batch

Get a new write batch
sourceraw docstring

changesclj

(changes s)

Returns a vector of changes. Each change is a map with keys :type, :ref, :new-index, and :old-index. Type is one of #{:added :removed :modified}.

Returns a vector of changes. Each change is a map with keys `:type`, `:ref`, `:new-index`,
and `:old-index`. Type is one of `#{:added :removed :modified}`.
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 r coll-name)

Returns a CollectionReference for the collection of given name.

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

collsclj

(colls d)
(colls d cs)

Returns collections or subcollections as a vector of CollectionReference.

Returns collections or subcollections as a vector of CollectionReference.
sourceraw docstring

commit!clj

(commit! b)

Commits a write batch.

Commits a write batch.
sourceraw docstring

countclj

(count qs)

Number of documents in a QuerySnapshot

Number of documents in a QuerySnapshot
sourceraw docstring

create!clj

(create! dr 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

create-timeclj

(create-time ds)

The time at which this document was created.

The time at which this document was created.
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 dr)

Deletes a document in a batched write/transaction context.

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

delete!clj

(delete! dr)

Deletes a document.

Deletes a document.
sourceraw docstring

delete-all!clj

(delete-all! cr)
(delete-all! cr batch-size)

Deletes all documents from a query. Batches for efficiency. Query must not contain limit or offset.

Deletes all documents from a query. Batches for efficiency. Query must not contain limit or offset.
sourceraw docstring

delete-all!*clj

(delete-all!* cr)
(delete-all!* cr batch-size)

Deletes all documents from a query. Batches for efficiency. Fetches all results in memory.

Deletes all documents from a query. Batches for efficiency. Fetches all results in memory.
sourceraw docstring

detachclj

(detach a)

Detaches an atom built with ->atom or a listener returned from add-listener.

Detaches an atom built with `->atom` or a listener returned from `add-listener`.
sourceraw docstring

dissocclj

(dissoc context dr & ks)

Deletes keys in a batched write/transaction context.

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

dissoc!clj

(dissoc! dr & fields)

Deletes fields.

Deletes fields.
sourceraw docstring

docclj

(doc cr)
(doc cr id)

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

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

doc-snapsclj

(doc-snaps qs)

Gets DocumentSnapshots from a QuerySnapshot

Gets DocumentSnapshots from a QuerySnapshot
sourceraw docstring

doc-snapshotclj

(doc-snapshot dr)
(doc-snapshot dr 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)
(docs c ds)

Gets a vector of DocumentReferences.

Gets a vector of `DocumentReference`s.
sourceraw docstring

ds->plainclj

(ds->plain s)

Represents a DocumentSnapshot as plain map.

Represents a DocumentSnapshot as plain map.
sourceraw docstring

ds->plain-with-idclj

(ds->plain-with-id s)

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

Represents a DocumentSnapshot as a [id plain-doc] pair
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

firestoreclj

(firestore q)

Gets the Firestore instance associated with this query.

Gets the Firestore instance associated with this query.
sourceraw docstring

idclj

(id d)

Returns the id of a CollectionReference, DocumentReference or DocumentSnapshot.

Returns the id of a CollectionReference, 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

limitclj

(limit q n)

Limits results to a certain number.

Limits results to a certain number.
sourceraw docstring

map!clj

(map! 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 dr 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! dr m)

Updates fields of a document.

Updates fields of a document.
sourceraw docstring

offsetclj

(offset q n)

Skips the first n results.

Skips the first n results.
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

parentclj

(parent dr)

A reference to the collection to which this document belongs to.

A reference to the collection to which this document belongs to.
sourceraw docstring

pathclj

(path r)

A string representing the path of the referenced document or collection.

A string representing the path of the referenced document or collection.
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 drs)
(pull-docs drs 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

qs->plain-mapclj

(qs->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

qs->plainvclj

(qs->plainv s)

Represents a QuerySnapshot as a plain vector of document data.

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

qs->plainv-with-idsclj

(qs->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

rangeclj

(range q start end)

Gets a range

Gets a range
sourceraw docstring

read-timeclj

(read-time q)

The time at which this snapshot was read.

The time at which this snapshot was read.
sourceraw docstring

refclj

(ref ds)

Gets a reference to the document this snapshot refers to.

Gets a reference to the document this snapshot refers to.
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 dr 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! dr 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

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! dr 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! dr 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

update-timeclj

(update-time ds)

The time at which this document was last updated.

The time at which this document was last updated.
sourceraw docstring

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

× close