Firebase.Firestore

Summary

Enumerations

AggregateSource{
  Server
}
enum
The sources from which anAggregateQuery.GetSnapshotAsync can retrieve its results.
FirestoreError{
  Ok = 0,
  Cancelled = 1,
  Unknown = 2,
  InvalidArgument = 3,
  DeadlineExceeded = 4,
  NotFound = 5,
  AlreadyExists = 6,
  PermissionDenied = 7,
  ResourceExhausted = 8,
  FailedPrecondition = 9,
  Aborted = 10,
  OutOfRange = 11,
  Unimplemented = 12,
  Internal = 13,
  Unavailable = 14,
  DataLoss = 15,
  Unauthenticated = 16
}
enum
Error codes used by CloudFirestore.
MetadataChanges{
  Exclude,
  Include
}
enum
Indicates whether metadata-only changes (that is,DocumentSnapshot.Metadata orQuerySnapshot.Metadata changed) should trigger snapshot events.
ServerTimestampBehavior{
  None = 0,
  Estimate = 1,
  Previous = 2
}
enum
Controls the return value for server timestamps that have not yet been set to their final value.
Source{
  Default,
  Server,
  Cache
}
enum
UnknownPropertyHandling{
  Ignore = 0,
  Warn = 1,
  Throw = 2
}
enum
Determines how unknown properties are handled when deserializing aFirestore document.

Typedefs

DocumentSnapshotCallbackMapusing
ListenerRegistrationMap< Action< DocumentSnapshotProxy,FirestoreError, string >>
LoadBundleProgressCallbackMapusing
ListenerRegistrationMap< Action<LoadBundleTaskProgress >>
QuerySnapshotCallbackMapusing
ListenerRegistrationMap< Action< QuerySnapshotProxy,FirestoreError, string >>
SnapshotsInSyncCallbackMapusing
ListenerRegistrationMap< Action >

Classes

Firebase.Firestore.AggregateQuery

A query that calculates aggregations over an underlying query.

Firebase.Firestore.AggregateQuerySnapshot

The results of executing anAggregateQuerySnapshot.

Firebase.Firestore.CollectionReference

A reference to a collection in aFirestore database.

Firebase.Firestore.DocumentChange

ADocumentChange represents a change to the documents matching a query.

Firebase.Firestore.DocumentReference

ADocumentReference refers to a document location in a CloudFirestore database and can be used to write, read, or listen to the location.

Firebase.Firestore.DocumentSnapshot

An immutable snapshot of the data for a document.

Firebase.Firestore.FieldPath

An immutable path of field names, used to identify parts of a document.

Firebase.Firestore.FieldValue

A static class providing properties and methods to represent sentinel values.

Firebase.Firestore.Filter

AFilter represents a restriction on one or more field values and can be used to refine the results of aQuery.

Firebase.Firestore.FirebaseFirestore

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

Firebase.Firestore.FirebaseFirestoreSettings

Settings used to configure aFirebaseFirestore instance.

Firebase.Firestore.FirestoreDataAttribute

Attribute indicating that a type is intended to be used withFirestore.

Firebase.Firestore.FirestoreDocumentIdAttribute

Attribute indicating that a property should be populated with theFirestore document ID.

Firebase.Firestore.FirestoreEnumNameConverter< T >

Custom converter which uses enum value names instead of integer values as theFirestore representation.

Firebase.Firestore.FirestoreException

A class of exceptions thrown by CloudFirestore.

Firebase.Firestore.FirestorePropertyAttribute

Attribute indicating that a property should be included inFirestore conversions.

Firebase.Firestore.ListenerRegistration

Represents a listener for either document or query snapshots that is returned fromListen methods.

Firebase.Firestore.LoadBundleTaskProgress
Firebase.Firestore.Query

A query which you can read or listen to.

Firebase.Firestore.QuerySnapshot

AQuerySnapshot contains the results of a query.

Firebase.Firestore.ServerTimestampAttribute

Attribute indicating that a timestamp property should be populated with a server timestamp.

Firebase.Firestore.SetOptions

An options object that configures the behavior ofSetAsync calls.

Firebase.Firestore.SnapshotMetadata

Metadata about a snapshot, describing the state of the snapshot.

Firebase.Firestore.Transaction

A transaction, as created by FirebaseFirestore.RunTransactionAsync{T}(System.Func{Transaction, Task{T}}) (and overloads) and passed to user code.

Firebase.Firestore.TransactionOptions

Options to customize transaction behavior forFirebaseFirestore.RunTransactionAsync.

Firebase.Firestore.WriteBatch

A batch of write operations, used to perform multiple writes as a single atomic unit.

Structs

Firebase.Firestore.Blob

An immutable sequence of bytes.

Firebase.Firestore.GeoPoint

Immutable struct representing a geographic location in CloudFirestore.

Firebase.Firestore.Timestamp

A nanosecond-precision immutable timestamp.

Enumerations

AggregateSource

AggregateSource

The sources from which anAggregateQuery.GetSnapshotAsync can retrieve its results.

Properties
Server

Perform the aggregation on the server and download the result.

The result received from the server is presented, unaltered, without considering any local state. That is, documents in the local cache are not taken into consideration, neither are local modifications not yet synchronized with the server. Previously-downloaded results, if any, are not used. Every request using this source necessarily involves a round trip to the server.

TheAggregateQuery will fail if the server cannot be reached, such as if the client is offline.

FirestoreError

FirestoreError

Error codes used by CloudFirestore.

The codes are in sync acrossFirestore SDKs on various platforms.

Properties
Aborted

The operation was aborted, typically due to a concurrency issue like transaction aborts, etc.

AlreadyExists

Some document that we attempted to create already exists.

Cancelled

The operation was cancelled (typically by the caller).

DataLoss

Unrecoverable data loss or corruption.

DeadlineExceeded

Deadline expired before operation could complete.

For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire.

FailedPrecondition

Operation was rejected because the system is not in a state required for the operation's execution.

Internal

Internal errors.

Means some invariants expected by underlying system has been broken. If you see one of these errors, something is very broken.

InvalidArgument

Client specified an invalid argument.

Note that this differs fromFailedPrecondition.InvalidArgument indicates arguments that are problematic regardless of the state of the system (e.g., an invalid field name).

NotFound

Some requested document was not found.

Ok

The operation completed successfully.

OutOfRange

Operation was attempted past the valid range.

PermissionDenied

The caller does not have permission to execute the specified operation.

ResourceExhausted

Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.

Unauthenticated

The request does not have valid authentication credentials for the operation.

Unavailable

The service is currently unavailable.

This is a most likely a transient condition and may be corrected by retrying with a backoff.

Unimplemented

Operation is not implemented or not supported/enabled.

Unknown

Unknown error or an error from a different error domain.

MetadataChanges

MetadataChanges

Indicates whether metadata-only changes (that is,DocumentSnapshot.Metadata orQuerySnapshot.Metadata changed) should trigger snapshot events.

Properties
Exclude

Snapshot events will not be triggered by metadata-only changes.

Include

Snapshot events will be triggered by any changes, including metadata-only changes.

ServerTimestampBehavior

ServerTimestampBehavior

Controls the return value for server timestamps that have not yet been set to their final value.

Properties
Estimate

Return local estimates for server timestamps that have not yet been set to their final value.

This estimate will likely differ from the final value and may cause these pending values to change once the server result becomes available.

None

Returnnull for server timestamps that have not yet been set to their final value.

Previous

Return the previous value for server timestamps that have not yet been set to their final value.

Source

Source

Configures the behavior ofDocumentReference.GetSnapshotAsync andQuery.GetSnapshotAsync.

By providing aSource value, these methods can be configured to fetch results only from the server, only from the local cache, or attempt to fetch results from the server and fall back to the cache (which is the default).

Properties
Cache

CausesFirestore to immediately return a value from the cache, ignoring the server completely (implying that the returned value may be stale with respect to the value on the server).

If there is no data in the cache to satisfy theDocumentReference.GetSnapshotAsync call will return an error andQuery.GetSnapshotAsync will return an emptyQuerySnapshot with no documents.

Default

CausesFirestore to try to retrieve an up-to-date (server-retrieved) snapshot, but fall back to returning cached data if the server can't be reached.

Server

CausesFirestore to avoid the cache, generating an error if the server cannot be reached.

Note that the cache will still be updated if the server request succeeds. Also note that latency-compensation still takes effect, so any pending write operations will be visible in the returned data (merged into the server-provided data).

UnknownPropertyHandling

UnknownPropertyHandling

Determines how unknown properties are handled when deserializing aFirestore document.

Properties
Ignore

Unknown properties are silently ignored.

Throw

Unknown properties cause an exception to be thrown.

Warn

Unknown properties cause a warning, but no error.

Typedefs

DocumentSnapshotCallbackMap

ListenerRegistrationMap<Action<DocumentSnapshotProxy,FirestoreError,string>>DocumentSnapshotCallbackMap

LoadBundleProgressCallbackMap

ListenerRegistrationMap<Action<LoadBundleTaskProgress>>LoadBundleProgressCallbackMap

QuerySnapshotCallbackMap

ListenerRegistrationMap<Action<QuerySnapshotProxy,FirestoreError,string>>QuerySnapshotCallbackMap

SnapshotsInSyncCallbackMap

ListenerRegistrationMap<Action>SnapshotsInSyncCallbackMap

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-02-13 UTC.