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. Data is written as maps of field values (a custom class is only mapped by reflection on Android).

Not mirrored: the Activity and Executor overloads of addSnapshotListener (see api/android-sdk/exclusions.txt).

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. Data is written as maps of field values (a custom class is only mapped by reflection on Android).

Not mirrored: the Activity and Executor overloads of addSnapshotListener (see api/android-sdk/exclusions.txt).

Properties

Link copied to clipboard

The FirebaseFirestore this reference belongs to.

The FirebaseFirestore this reference belongs to.

The FirebaseFirestore this reference belongs to.

The FirebaseFirestore this reference belongs to.

The FirebaseFirestore this reference belongs to.

Link copied to clipboard
actual val id: String

The last segment of the path: the document id.

actual val id: String

The last segment of the path: the document id.

expect val id: String

The last segment of the path: the document id.

actual val id: String

The last segment of the path: the document id.

actual val id: String

The last segment of the path: the document id.

Link copied to clipboard
val ios: FIRDocumentReference

The underlying Firebase iOS SDK object.

Link copied to clipboard

The underlying Firebase JS SDK object.

The underlying Firebase JS SDK object.

Link copied to clipboard

The collection containing this document.

The collection containing this document.

The collection containing this document.

The collection containing this document.

The collection containing this document.

Link copied to clipboard
actual val path: String

The path from the root, /-separated.

actual val path: String

The path from the root, /-separated.

expect val path: String

The path from the root, /-separated.

actual val path: String

The path from the root, /-separated.

actual val path: String

The path from the root, /-separated.

Functions

Link copied to clipboard

Listens to the document and every change to it.

Listens to the document, also notifying listener of metadata changes when metadataChanges is INCLUDE.

Listens to the document with options.

Not in the common API (the executor is Android-only); the Kotlin-first layer's Android listeners bind to this member.

Listens to the document and every change to it.

Listens to the document, also notifying listener of metadata changes when metadataChanges is INCLUDE.

Listens to the document with options.

Listens to the document and every change to it.

Listens to the document, also notifying listener of metadata changes when metadataChanges is INCLUDE.

Listens to the document with options.

Listens to the document and every change to it.

Listens to the document, also notifying listener of metadata changes when metadataChanges is INCLUDE.

Listens to the document with options.

Listens to the document and every change to it.

Listens to the document, also notifying listener of metadata changes when metadataChanges is INCLUDE.

Listens to the document with options.

Link copied to clipboard
actual fun collection(collectionPath: String): CollectionReference

The subcollection at collectionPath, relative to this document.

actual fun collection(collectionPath: String): CollectionReference

The subcollection at collectionPath, relative to this document.

expect fun collection(collectionPath: String): CollectionReference

The subcollection at collectionPath, relative to this document.

actual fun collection(collectionPath: String): CollectionReference

The subcollection at collectionPath, relative to this document.

actual fun collection(collectionPath: String): CollectionReference

The subcollection at collectionPath, relative to this document.

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

The document data as T (see toObject) and every change to it as a Flow.

Link copied to clipboard
actual fun delete(): Task<Nothing?>

Deletes the document.

actual fun delete(): Task<Nothing?>

Deletes the document.

expect fun delete(): Task<Nothing?>

Deletes the document.

actual fun delete(): Task<Nothing?>

Deletes the document.

actual fun delete(): Task<Nothing?>

Deletes the document.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
actual fun get(): Task<DocumentSnapshot>

Reads the document, from the cache and the backend as available.

actual fun get(source: Source): Task<DocumentSnapshot>

Reads the document from source.

actual fun get(): Task<DocumentSnapshot>

Reads the document, from the cache and the backend as available.

actual fun get(source: Source): Task<DocumentSnapshot>

Reads the document from source.

expect fun get(): Task<DocumentSnapshot>

Reads the document, from the cache and the backend as available.

expect fun get(source: Source): Task<DocumentSnapshot>

Reads the document from source.

actual fun get(): Task<DocumentSnapshot>

Reads the document, from the cache and the backend as available.

actual fun get(source: Source): Task<DocumentSnapshot>

Reads the document from source.

actual fun get(): Task<DocumentSnapshot>

Reads the document, from the cache and the backend as available.

actual fun get(source: Source): Task<DocumentSnapshot>

Reads the document from source.

Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard
actual fun set(data: Any): Task<Nothing?>

Writes data (a map of field values), replacing the document.

actual fun set(data: Any, options: SetOptions): Task<Nothing?>

Writes data (a map of field values) according to options.

actual fun set(data: Any): Task<Nothing?>

Writes data (a map of field values), replacing the document.

actual fun set(data: Any, options: SetOptions): Task<Nothing?>

Writes data (a map of field values) according to options.

expect fun set(data: Any): Task<Nothing?>

Writes data (a map of field values), replacing the document.

expect fun set(data: Any, options: SetOptions): Task<Nothing?>

Writes data (a map of field values) according to options.

actual fun set(data: Any): Task<Nothing?>

Writes data (a map of field values), replacing the document.

actual fun set(data: Any, options: SetOptions): Task<Nothing?>

Writes data (a map of field values) according to options.

actual fun set(data: Any): Task<Nothing?>

Writes data (a map of field values), replacing the document.

actual fun set(data: Any, options: SetOptions): Task<Nothing?>

Writes data (a map of field values) according to options.

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.

Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String
Link copied to clipboard
actual fun update(data: Map<String, Any?>): Task<Nothing?>

Updates the fields in data; fails if the document does not exist.

actual fun update(fieldPath: FieldPath, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates fieldPath to value and the further field path/value pairs in moreFieldsAndValues.

actual fun update(field: String, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates field to value and the further field/value pairs in moreFieldsAndValues.

actual fun update(data: Map<String, Any?>): Task<Nothing?>

Updates the fields in data; fails if the document does not exist.

actual fun update(fieldPath: FieldPath, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates fieldPath to value and the further field path/value pairs in moreFieldsAndValues.

actual fun update(field: String, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates field to value and the further field/value pairs in moreFieldsAndValues.

expect fun update(data: Map<String, Any?>): Task<Nothing?>

Updates the fields in data; fails if the document does not exist.

expect fun update(fieldPath: FieldPath, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates fieldPath to value and the further field path/value pairs in moreFieldsAndValues.

expect fun update(field: String, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates field to value and the further field/value pairs in moreFieldsAndValues.

actual fun update(data: Map<String, Any?>): Task<Nothing?>

Updates the fields in data; fails if the document does not exist.

actual fun update(fieldPath: FieldPath, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates fieldPath to value and the further field path/value pairs in moreFieldsAndValues.

actual fun update(field: String, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates field to value and the further field/value pairs in moreFieldsAndValues.

actual fun update(data: Map<String, Any?>): Task<Nothing?>

Updates the fields in data; fails if the document does not exist.

actual fun update(fieldPath: FieldPath, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates fieldPath to value and the further field path/value pairs in moreFieldsAndValues.

actual fun update(field: String, value: Any?, vararg moreFieldsAndValues: Any?): Task<Nothing?>

Updates field to value and the further field/value pairs in moreFieldsAndValues.