Ir a la consola

FirebaseFirestore

public class FirebaseFirestore extends Object

Represents a Cloud Firestore database and is the entry point for all Cloud Firestore operations.

Subclassing Note: Cloud Firestore classes are not meant to be subclassed except for use in test mocks. Subclassing is not supported in production code and new SDK releases may break code that does so.

Public Method Summary

WriteBatch
batch()
Creates a write batch, used for performing multiple writes as a single atomic operation.
Task<Void>
clearPersistence()
Clears the persistent storage, including pending writes and cached documents.
CollectionReference
collection(String collectionPath)
Gets a CollectionReference instance that refers to the collection at the specified path within the database.
Query
collectionGroup(String collectionId)
Creates and returns a new Query that includes all documents in the database that are contained in a collection or subcollection with the given collectionId.
Task<Void>
disableNetwork()
Disables network access for this instance.
DocumentReference
document(String documentPath)
Gets a `DocumentReference` instance that refers to the document at the specified path within the database.
Task<Void>
enableNetwork()
Re-enables network usage for this instance after a prior call to disableNetwork().
FirebaseApp
getApp()
Returns the FirebaseApp instance to which this FirebaseFirestore belongs.
FirebaseFirestoreSettings
getFirestoreSettings()
Returns the settings used by this FirebaseFirestore object.
static FirebaseFirestore
static FirebaseFirestore
Task<Void>
runBatch(WriteBatch.Function batchFunction)
Executes a batchFunction on a newly created WriteBatch and then commits all of the writes made by the batchFunction as a single atomic unit.
<TResult> Task<TResult>
runTransaction(Function<TResult> updateFunction)
Executes the given updateFunction and then attempts to commit the changes applied within the transaction.
void
setFirestoreSettings(FirebaseFirestoreSettings settings)
Sets any custom settings used to configure this FirebaseFirestore object.
static void
setLoggingEnabled(boolean loggingEnabled)
Globally enables / disables Cloud Firestore logging for the SDK.
Task<Void>
terminate()
Terminates this FirebaseFirestore instance.
Task<Void>
waitForPendingWrites()
Waits until all currently pending writes for the active user have been acknowledged by the backend.

Inherited Method Summary