QueryDocumentSnapshot

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

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

Properties

Link copied to clipboard
actual val data: Map<String, Any?>?

The fields as a map, or null when the document does not exist.

actual val data: Map<String, Any?>?

The fields as a map, or null when the document does not exist.

expect val data: Map<String, Any?>?

The fields as a map, or null when the document does not exist.

actual val data: Map<String, Any?>?

The fields as a map, or null when the document does not exist.

actual val data: Map<String, Any?>?

The fields as a map, or null when the document does not exist.

Link copied to clipboard
actual val id: String

The document id.

actual val id: String

The document id.

expect val id: String

The document id.

actual val id: String

The document id.

actual val id: String

The document id.

Link copied to clipboard
open override val ios: FIRQueryDocumentSnapshot

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

Whether the snapshot is from the cache or has pending writes.

Whether the snapshot is from the cache or has pending writes.

Whether the snapshot is from the cache or has pending writes.

Whether the snapshot is from the cache or has pending writes.

Whether the snapshot is from the cache or has pending writes.

Link copied to clipboard

The reference of the document.

The reference of the document.

The reference of the document.

The reference of the document.

The reference of the document.

Functions

Link copied to clipboard
actual fun contains(fieldPath: FieldPath): Boolean

Whether the document has fieldPath.

actual fun contains(field: String): Boolean

Whether the document has field (a .-separated path).

actual fun contains(fieldPath: FieldPath): Boolean

Whether the document has fieldPath.

actual fun contains(field: String): Boolean

Whether the document has field (a .-separated path).

expect fun contains(fieldPath: FieldPath): Boolean

Whether the document has fieldPath.

expect fun contains(field: String): Boolean

Whether the document has field (a .-separated path).

actual fun contains(fieldPath: FieldPath): Boolean

Whether the document has fieldPath.

actual fun contains(field: String): Boolean

Whether the document has field (a .-separated path).

actual fun contains(fieldPath: FieldPath): Boolean

Whether the document has fieldPath.

actual fun contains(field: String): Boolean

Whether the document has field (a .-separated path).

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean

The JS SDK creates a new object per read, so snapshots are equal when they are of the same document and data.

open operator override fun equals(other: Any?): Boolean

The JS SDK creates a new object per read, so snapshots are equal when they are of the same document and data.

Link copied to clipboard
actual fun exists(): Boolean

Whether the document exists.

actual fun exists(): Boolean

Whether the document exists.

expect fun exists(): Boolean

Whether the document exists.

actual fun exists(): Boolean

Whether the document exists.

actual fun exists(): Boolean

Whether the document exists.

Link copied to clipboard
actual fun get(fieldPath: FieldPath): Any?

The value of fieldPath, or null.

actual fun get(field: String): Any?

The value of field (a .-separated path), or null.

actual fun get(fieldPath: FieldPath, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of fieldPath with server timestamps resolved per serverTimestampBehavior.

actual fun get(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of field with server timestamps resolved per serverTimestampBehavior.

actual fun get(fieldPath: FieldPath): Any?

The value of fieldPath, or null.

actual fun get(field: String): Any?

The value of field (a .-separated path), or null.

actual fun get(fieldPath: FieldPath, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of fieldPath with server timestamps resolved per serverTimestampBehavior.

actual fun get(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of field with server timestamps resolved per serverTimestampBehavior.

expect fun get(fieldPath: FieldPath): Any?

The value of fieldPath, or null.

expect fun get(field: String): Any?

The value of field (a .-separated path), or null.

expect fun get(fieldPath: FieldPath, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of fieldPath with server timestamps resolved per serverTimestampBehavior.

expect fun get(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of field with server timestamps resolved per serverTimestampBehavior.

actual fun get(fieldPath: FieldPath): Any?

The value of fieldPath, or null.

actual fun get(field: String): Any?

The value of field (a .-separated path), or null.

actual fun get(fieldPath: FieldPath, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of fieldPath with server timestamps resolved per serverTimestampBehavior.

actual fun get(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of field with server timestamps resolved per serverTimestampBehavior.

actual fun get(fieldPath: FieldPath): Any?

The value of fieldPath, or null.

actual fun get(field: String): Any?

The value of field (a .-separated path), or null.

actual fun get(fieldPath: FieldPath, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of fieldPath with server timestamps resolved per serverTimestampBehavior.

actual fun get(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Any?

The value of field with server timestamps resolved per serverTimestampBehavior.

Link copied to clipboard
actual fun getBlob(field: String): Blob?
actual fun getBlob(field: String): Blob?
expect fun getBlob(field: String): Blob?
actual fun getBlob(field: String): Blob?
actual fun getBlob(field: String): Blob?
Link copied to clipboard
actual fun getBoolean(field: String): Boolean?
actual fun getBoolean(field: String): Boolean?
expect fun getBoolean(field: String): Boolean?
actual fun getBoolean(field: String): Boolean?
actual fun getBoolean(field: String): Boolean?
Link copied to clipboard
actual fun getBsonObjectId(field: String): BsonObjectId?

The BsonObjectId at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getBsonObjectId(field: String): BsonObjectId?

The BsonObjectId at field, or null; throws a ClassCastException when the field holds another type, as on Android.

expect fun getBsonObjectId(field: String): BsonObjectId?

The BsonObjectId at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getBsonObjectId(field: String): BsonObjectId?

The BsonObjectId at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getBsonObjectId(field: String): BsonObjectId?

The BsonObjectId at field, or null; throws a ClassCastException when the field holds another type, as on Android.

Link copied to clipboard

The BsonTimestamp at field, or null; throws a ClassCastException when the field holds another type, as on Android.

The BsonTimestamp at field, or null; throws a ClassCastException when the field holds another type, as on Android.

The BsonTimestamp at field, or null; throws a ClassCastException when the field holds another type, as on Android.

The BsonTimestamp at field, or null; throws a ClassCastException when the field holds another type, as on Android.

The BsonTimestamp at field, or null; throws a ClassCastException when the field holds another type, as on Android.

Link copied to clipboard
actual fun getData(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Map<String, Any?>?

The fields as a map with server timestamps resolved per serverTimestampBehavior, or null when the document does not exist.

actual fun getData(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Map<String, Any?>?

The fields as a map with server timestamps resolved per serverTimestampBehavior, or null when the document does not exist.

expect fun getData(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Map<String, Any?>?

The fields as a map with server timestamps resolved per serverTimestampBehavior, or null when the document does not exist.

actual fun getData(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Map<String, Any?>?

The fields as a map with server timestamps resolved per serverTimestampBehavior, or null when the document does not exist.

actual fun getData(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Map<String, Any?>?

The fields as a map with server timestamps resolved per serverTimestampBehavior, or null when the document does not exist.

Link copied to clipboard

The Decimal128Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

The Decimal128Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

The Decimal128Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

The Decimal128Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

The Decimal128Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

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

The value of fieldPath as T; on Apple platforms and JS a cast of DocumentSnapshot.get.

inline fun <T> DocumentSnapshot.getField(field: String): T?
inline fun <T> DocumentSnapshot.getField(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): T?

The value of field as T; on Apple platforms and JS a cast of DocumentSnapshot.get.

Link copied to clipboard
actual fun getGeoPoint(field: String): GeoPoint?
actual fun getGeoPoint(field: String): GeoPoint?
expect fun getGeoPoint(field: String): GeoPoint?
actual fun getGeoPoint(field: String): GeoPoint?
actual fun getGeoPoint(field: String): GeoPoint?
Link copied to clipboard
actual fun getInt32Value(field: String): Int32Value?

The Int32Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getInt32Value(field: String): Int32Value?

The Int32Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

expect fun getInt32Value(field: String): Int32Value?

The Int32Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getInt32Value(field: String): Int32Value?

The Int32Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getInt32Value(field: String): Int32Value?

The Int32Value at field, or null; throws a ClassCastException when the field holds another type, as on Android.

Link copied to clipboard
actual fun getLong(field: String): Long?
actual fun getLong(field: String): Long?
expect fun getLong(field: String): Long?
actual fun getLong(field: String): Long?
actual fun getLong(field: String): Long?
Link copied to clipboard
actual fun getMaxKey(field: String): MaxKey?

The MaxKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getMaxKey(field: String): MaxKey?

The MaxKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

expect fun getMaxKey(field: String): MaxKey?

The MaxKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getMaxKey(field: String): MaxKey?

The MaxKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getMaxKey(field: String): MaxKey?

The MaxKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

Link copied to clipboard
actual fun getMinKey(field: String): MinKey?

The MinKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getMinKey(field: String): MinKey?

The MinKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

expect fun getMinKey(field: String): MinKey?

The MinKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getMinKey(field: String): MinKey?

The MinKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getMinKey(field: String): MinKey?

The MinKey at field, or null; throws a ClassCastException when the field holds another type, as on Android.

Link copied to clipboard
actual fun getRegexValue(field: String): RegexValue?

The RegexValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getRegexValue(field: String): RegexValue?

The RegexValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

expect fun getRegexValue(field: String): RegexValue?

The RegexValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getRegexValue(field: String): RegexValue?

The RegexValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getRegexValue(field: String): RegexValue?

The RegexValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

Link copied to clipboard
actual fun getString(field: String): String?
actual fun getString(field: String): String?
expect fun getString(field: String): String?
actual fun getString(field: String): String?
actual fun getString(field: String): String?
Link copied to clipboard
actual fun getTimestamp(field: String): Timestamp?
actual fun getTimestamp(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Timestamp?
actual fun getTimestamp(field: String): Timestamp?
actual fun getTimestamp(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Timestamp?
expect fun getTimestamp(field: String): Timestamp?
expect fun getTimestamp(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Timestamp?
actual fun getTimestamp(field: String): Timestamp?
actual fun getTimestamp(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Timestamp?
actual fun getTimestamp(field: String): Timestamp?
actual fun getTimestamp(field: String, serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): Timestamp?
Link copied to clipboard
actual fun getVectorValue(field: String): VectorValue?

The VectorValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getVectorValue(field: String): VectorValue?

The VectorValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

expect fun getVectorValue(field: String): VectorValue?

The VectorValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getVectorValue(field: String): VectorValue?

The VectorValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

actual fun getVectorValue(field: String): VectorValue?

The VectorValue at field, or null; throws a ClassCastException when the field holds another type, as on Android.

Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard
inline fun <T> DocumentSnapshot.toObject(): T?

The document as T; on Apple platforms and JS a cast of DocumentSnapshot.data.

inline fun <T> DocumentSnapshot.toObject(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): T?

The document as T; on Apple platforms and JS a cast of DocumentSnapshot.getData.

Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String