Package-level declarations

Types

Link copied to clipboard
actual abstract class AggregateField
expect abstract class AggregateField

An aggregation of a field, mirroring the Android SDK's AggregateField; created with count, sum and average.

actual abstract class AggregateField
actual abstract class AggregateField
Link copied to clipboard
actual class AggregateQuery
actual class AggregateQuery
expect class AggregateQuery

An aggregation over the results of a Query, mirroring the Android SDK's AggregateQuery.

actual class AggregateQuery
actual class AggregateQuery
actual class AggregateQuery
Link copied to clipboard

The results of an AggregateQuery, mirroring the Android SDK's AggregateQuerySnapshot.

Link copied to clipboard

Where an aggregation is computed.

Link copied to clipboard
class Blob : Comparable<Blob>

Binary data stored in a document, mirroring com.google.firebase.firestore.Blob from the Firebase Android SDK.

Link copied to clipboard
actual class CollectionReference : Query
actual class CollectionReference : Query
expect class CollectionReference : Query

A collection, mirroring the Android SDK's CollectionReference: a Query over its documents that can also add to it.

actual class CollectionReference : Query
actual class CollectionReference : Query
actual class CollectionReference : Query
Link copied to clipboard
actual class DocumentChange
actual class DocumentChange
expect class DocumentChange

A change to the results of a query, mirroring the Android SDK's DocumentChange.

actual class DocumentChange
actual class DocumentChange
actual class DocumentChange
Link copied to clipboard

The SDK's annotation; com.google.firebase.serialization.DocumentId is read on every platform.

Link copied to clipboard
actual class DocumentReference
actual class DocumentReference
expect class DocumentReference

A document location, mirroring com.google.firebase.firestore.DocumentReference from the Firebase Android SDK: the document may or may not exist; reads, writes and listeners are performed through it. A @Serializable class is written with the setData and updateData extensions, which map it through FirebaseFormat.Firestore on every platform; the SDK's set and update(Map), which map a class by reflection on Android, are deprecated with an error towards them.

actual class DocumentReference
actual class DocumentReference
actual class DocumentReference
Link copied to clipboard
actual open class DocumentSnapshot
actual open class DocumentSnapshot
expect open class DocumentSnapshot

The data of a document read from Firestore, mirroring com.google.firebase.firestore.DocumentSnapshot from the Firebase Android SDK. Field values are the Firestore types: Boolean, Long, Double, String, Timestamp, GeoPoint, Blob, DocumentReference, List and Map, as on Android; a document that does not exist has no data.

actual open class DocumentSnapshot
actual open class DocumentSnapshot
actual open class DocumentSnapshot
Link copied to clipboard
fun interface EventListener<T>

Receives the snapshots of a document or query, or the error that ended the listener.

Link copied to clipboard

The SDK's exclusion annotation; kotlinx.serialization.Transient excludes a property on every platform.

Link copied to clipboard
actual class FieldPath
expect class FieldPath

A path to a field of a document, mirroring com.google.firebase.firestore.FieldPath from the Firebase Android SDK.

actual class FieldPath
actual class FieldPath
Link copied to clipboard
actual abstract class FieldValue
expect abstract class FieldValue

A sentinel written in place of a field value, mirroring com.google.firebase.firestore.FieldValue from the Firebase Android SDK: a server timestamp, a deletion or a transform of the current value.

actual abstract class FieldValue
actual abstract class FieldValue

A sentinel value; operation and arguments are converted to the platform SDK's field value when written.

Link copied to clipboard
actual class Filter
expect class Filter

A query condition, mirroring com.google.firebase.firestore.Filter from the Firebase Android SDK: field conditions combined with and and or, applied with Query.where.

actual class Filter
actual class Filter

A condition tree; node is null for the empty filter of the public constructor, which matches everything.

Link copied to clipboard
actual class FirebaseFirestore
actual class FirebaseFirestore
expect class FirebaseFirestore

The entry point of Cloud Firestore, mirroring com.google.firebase.firestore.FirebaseFirestore from the Firebase Android SDK: obtained per FirebaseApp and database with the static accessors (or the Firebase.firestore extensions), it creates references, batches and transactions and manages the network and the local cache.

actual class FirebaseFirestore

The JS SDK's Firestore must be initialised with its settings (and connected to the emulator) before any use, so the underlying object is created on first use with the settings set until then, as the Android SDK's semantics require. Instances are cached per app and database, as the Android SDK's getInstance.

actual class FirebaseFirestore
actual class FirebaseFirestore

The JS SDK's Firestore must be initialised with its settings (and connected to the emulator) before any use, so the underlying object is created on first use with the settings set until then, as the Android SDK's semantics require. Instances are cached per app and database, as the Android SDK's getInstance.

Link copied to clipboard

A failed Firestore operation, mirroring com.google.firebase.firestore.FirebaseFirestoreException from the Firebase Android SDK; code is the gRPC-style Code of the failure.

Link copied to clipboard

The settings of a FirebaseFirestore, mirroring com.google.firebase.firestore.FirebaseFirestoreSettings from the Firebase Android SDK: built with Builder (or the firestoreSettings extension) and applied with FirebaseFirestore.firestoreSettings before the instance is used.

Link copied to clipboard
class GeoPoint(val latitude: Double, val longitude: Double) : Comparable<GeoPoint>

A geographical point, mirroring com.google.firebase.firestore.GeoPoint from the Firebase Android SDK.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class IgnoreExtraProperties

The SDK's annotation; com.google.firebase.serialization.IgnoreExtraProperties is read on every platform.

Link copied to clipboard
fun interface ListenerRegistration

A registered snapshot listener; remove stops it.

Link copied to clipboard

Where a snapshot listener listens: the default (cache then backend) or the local cache only.

Link copied to clipboard
actual abstract class LoadBundleTask : Task<LoadBundleTaskProgress>
expect abstract class LoadBundleTask

The loading of a bundle, mirroring the Android SDK's LoadBundleTask: a Task of the final LoadBundleTaskProgress that also reports intermediate progress to addOnProgressListener. Only created by FirebaseFirestore.loadBundle.

actual abstract class LoadBundleTask : Task<LoadBundleTaskProgress>
actual abstract class LoadBundleTask

Created by the platform implementations of FirebaseFirestore.loadBundle as a LoadBundleTaskImpl.

Link copied to clipboard

The progress of a LoadBundleTask.

Link copied to clipboard

The configuration of the local cache: PersistentCacheSettings or MemoryCacheSettings.

Link copied to clipboard

An in-memory local cache, mirroring the Android SDK's MemoryCacheSettings; built with newBuilder.

Link copied to clipboard

Eager garbage collection: documents are dropped as soon as no listener uses them; the Android SDK's MemoryEagerGcSettings.

Link copied to clipboard

How an in-memory cache is garbage collected: MemoryEagerGcSettings or MemoryLruGcSettings.

Link copied to clipboard

Least-recently-used garbage collection up to a size, the Android SDK's MemoryLruGcSettings.

Link copied to clipboard

Whether snapshot listeners are notified of metadata-only changes.

Link copied to clipboard

Receives the progress of a LoadBundleTask.

Link copied to clipboard

Manages the indexes of the persistent cache, mirroring the Android SDK's PersistentCacheIndexManager.

Link copied to clipboard

A persistent (on-disk) local cache, mirroring the Android SDK's PersistentCacheSettings; built with newBuilder.

Link copied to clipboard
class Pipeline

A sequence of stages that transforms a set of documents; built from a PipelineSource and run with execute.

Link copied to clipboard
actual class PipelineResult
actual class PipelineResult

A row of a pipeline's results, over the iOS SDK's bridge.

expect class PipelineResult

A document, or a computed row, of a Pipeline.Snapshot.

actual class PipelineResult

A row of a pipeline's results, over the JS SDK's.

actual class PipelineResult
actual class PipelineResult

A row of a pipeline's results, over the JS SDK's.

Link copied to clipboard

The source stages a Pipeline can start from, from FirebaseFirestore.pipeline.

Link copied to clipboard

The SDK's property name annotation; kotlinx.serialization.SerialName names a property on every platform.

Link copied to clipboard
actual open class Query
actual open class Query
expect open class Query

A query over the documents of a collection or collection group, mirroring com.google.firebase.firestore.Query from the Firebase Android SDK: immutable, every method returns a new query with the constraint added.

actual open class Query
actual open class Query
actual open class Query
Link copied to clipboard

A DocumentSnapshot from a query, which is guaranteed to exist.

Link copied to clipboard

The results of a Query, mirroring the Android SDK's QuerySnapshot: the documents and the changes since the previous snapshot.

Link copied to clipboard

The SDK's annotation; com.google.firebase.serialization.ServerTimestamp is read on every platform.

Link copied to clipboard
actual class SetOptions
expect class SetOptions

How a set merges with an existing document, mirroring com.google.firebase.firestore.SetOptions from the Firebase Android SDK.

actual class SetOptions
actual class SetOptions
Link copied to clipboard

The options of a snapshot listener, mirroring the Android SDK's SnapshotListenOptions.

Link copied to clipboard
actual class SnapshotMetadata
actual class SnapshotMetadata
expect class SnapshotMetadata

The metadata of a snapshot, mirroring the Android SDK's SnapshotMetadata.

actual class SnapshotMetadata
actual class SnapshotMetadata
actual class SnapshotMetadata
Link copied to clipboard
enum Source : Enum<Source>

Where a one-time read reads from.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ThrowOnExtraProperties

The SDK's annotation; com.google.firebase.serialization.ThrowOnExtraProperties is read on every platform.

Link copied to clipboard
actual class Transaction
actual class Transaction
expect class Transaction

A transaction, mirroring com.google.firebase.firestore.Transaction from the Firebase Android SDK: the writes are applied atomically when the Function returns. Reads inside a transaction (get) are synchronous on Android, the JVM and Apple platforms and are declared in the nonJs source set, as the JS SDK only reads asynchronously.

actual class Transaction
actual class Transaction
actual class Transaction
Link copied to clipboard

The options of a transaction, mirroring the Android SDK's TransactionOptions.

Link copied to clipboard

A vector of doubles, mirroring com.google.firebase.firestore.VectorValue from the Firebase Android SDK; created with FieldValue.vector.

Link copied to clipboard
actual class WriteBatch
actual class WriteBatch
expect class WriteBatch

A batch of writes, mirroring com.google.firebase.firestore.WriteBatch from the Firebase Android SDK: applied atomically by commit.

actual class WriteBatch
actual class WriteBatch
actual class WriteBatch

Properties

Link copied to clipboard
val <Error class: unknown class>.firestore: FirebaseFirestore

The FirebaseFirestore of the default FirebaseApp; the Android SDK's Firebase.firestore.

Functions

Link copied to clipboard
inline fun <T> DocumentReference.dataObjects(metadataChanges: MetadataChanges = MetadataChanges.EXCLUDE): Flow<T?>
inline fun <T> Query.dataObjects(metadataChanges: MetadataChanges = MetadataChanges.EXCLUDE): Flow<List<T>>

The SDK's dataObjects flow; deprecated towards com.google.firebase.serialization.dataObjects.

Link copied to clipboard
fun <Error class: unknown class>.firestore(app: <Error class: unknown class>): FirebaseFirestore
fun <Error class: unknown class>.firestore(database: String): FirebaseFirestore

The FirebaseFirestore of the default FirebaseApp for the named database.

fun <Error class: unknown class>.firestore(app: <Error class: unknown class>, database: String): FirebaseFirestore

The FirebaseFirestore of app for the named database.

Link copied to clipboard

FirebaseFirestoreSettings built with init, as the Android SDK's firestoreSettings.

Link copied to clipboard
inline fun <T> DocumentSnapshot.getField(fieldPath: FieldPath): T?
inline fun <T> DocumentSnapshot.getField(field: String): T?
inline fun <T> DocumentSnapshot.getField(fieldPath: FieldPath, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): T?
inline fun <T> DocumentSnapshot.getField(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): T?

The SDK's reified getField; deprecated towards com.google.firebase.serialization.getField.

Link copied to clipboard
fun FirebaseFirestore.loadBundle(bundleData: <Error class: unknown class>): LoadBundleTask

Loads a Firestore bundle into the local cache as bundleData is read, closing it at the end; the kotlinx-io form of loadBundle(InputStream). On Android and the JVM the SDK reads the source as a stream, on Apple platforms as an NSInputStream and on JS through a ReadableStream, so a bundle streams on every platform.

Link copied to clipboard

MemoryCacheSettings built with init, as the Android SDK's memoryCacheSettings.

Link copied to clipboard

MemoryEagerGcSettings built with init, as the Android SDK's memoryEagerGcSettings.

Link copied to clipboard

MemoryLruGcSettings built with init, as the Android SDK's memoryLruGcSettings.

Link copied to clipboard

PersistentCacheSettings built with init, as the Android SDK's persistentCacheSettings.

Link copied to clipboard
fun DocumentReference.snapshots(metadataChanges: MetadataChanges = MetadataChanges.EXCLUDE): Flow<DocumentSnapshot>

The document and every change to it as a Flow, which fails if the listener fails.

fun Query.snapshots(metadataChanges: MetadataChanges = MetadataChanges.EXCLUDE): Flow<QuerySnapshot>

The query results and every change to them as a Flow, which fails if the listener fails.

Link copied to clipboard
inline fun <T> DocumentSnapshot.toObject(): T?
inline fun <T> DocumentSnapshot.toObject(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): T?

The SDK's reified toObject; deprecated towards com.google.firebase.serialization.toObject.

Link copied to clipboard
inline fun <T> QuerySnapshot.toObjects(): List<T>
inline fun <T> QuerySnapshot.toObjects(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): List<T>

The SDK's reified toObjects; deprecated towards com.google.firebase.serialization.toObjects.