Navigate

Kotlin Cloud Firestore integration compatibility

This page tracks an integration contract: unchanged Firebase code run through a Pyric runtime seam, so there is no separate Firebase public API to measure. The rows below are its signed behavior inventory.

Status legend

Conforming — Kotlin conformance test matches com.google.firebase.firestore specification Unverified — com.google.firebase.firestore behavior not yet verified by conformance test

FirebaseFirestore — instance & lifecycle

FirebaseFirestore.getInstance() / Firebase.firestoreReturns the default FirebaseFirestore instance for the default FirebaseApp.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#1.
FirebaseFirestore.getInstance(app, database) / Firebase.firestore(app, database)Provides isolated FirebaseFirestore instances distinguished by FirebaseApp and database ID.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#2.
FirebaseFirestore.firestoreSettingsConfigures host, sslEnabled, persistenceEnabled, and cacheSizeBytes via FirebaseFirestoreSettings.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#3.
FirebaseFirestore.document(path)Instantiates a DocumentReference pointing to the slash-delimited path.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#4.
FirebaseFirestore.collection(path)Instantiates a CollectionReference pointing to the slash-delimited path.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#5.
FirebaseFirestore.collectionGroup(collectionId)Instantiates a Query spanning all collections with the specified collectionId.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#6.
FirebaseFirestore.batch()Instantiates a WriteBatch for atomic batched mutations.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#7.
FirebaseFirestore.runTransaction(handler)Runs interactive transaction handler with automatic conflict retries up to TransactionOptions.maxAttempts.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#8.
FirebaseFirestore.clearPersistence()Clears offline client persistence cache when no active listeners exist.
com.google.firebase.firestore specification; unverified locally.
FirebaseFirestore.enableNetwork() / disableNetwork()Toggles client network connectivity to simulate offline operation.
com.google.firebase.firestore specification; unverified locally.
FirebaseFirestore.terminate()Terminates the Firestore client, closing network connections and unsubscribing active snapshot flows.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#11.
FirebaseFirestore.waitForPendingWrites()Resolves when all locally initiated writes have been committed by the server.
com.google.firebase.firestore specification; unverified locally.
FirebaseFirestore.addSnapshotsInSyncListener(runnable)Notifies when all active snapshot listeners are in sync with server state.
com.google.firebase.firestore specification; unverified locally.

DocumentReference — document operations

DocumentReference.get(source)Reads a single document snapshot from server or cache based on Source.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#14.
DocumentReference.set(data)Overwrites target document completely with provided map or POJO payload.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#15.
DocumentReference.set(data, SetOptions.merge())Merges payload fields into existing document without overwriting unspecified fields.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#16.
DocumentReference.update(data)Updates specified fields in an existing document; fails if document does not exist.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#17.
DocumentReference.delete()Deletes document at reference path from Firestore database.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#18.
DocumentReference.collection(path)Returns a child CollectionReference nested under this document.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#19.
DocumentReference.snapshots(metadataChanges)Returns a Coroutine Flow emitting DocumentSnapshot on document changes.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#20.

Query — filters & constraints

Query.whereEqualTo(field, value)Filters documents matching exact field equality.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#21.
Query.whereNotEqualTo(field, value)Filters documents where field does not equal specified value.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#22.
Query.whereLessThan / whereLessThanOrEqualTo / whereGreaterThan / whereGreaterThanOrEqualToApplies relational range comparison filters on field value.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#23.
Query.whereArrayContains(field, value)Filters documents where array field contains the specified element.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#24.
Query.whereArrayContainsAny(field, values)Filters documents where array field contains any element from the values list.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#25.
Query.whereIn(field, values)Filters documents where field value matches any element in values list (IN query).
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#26.
Query.whereNotIn(field, values)Filters documents where field value matches no element in values list (NOT IN query).
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#27.
Query.where(filter)Evaluates composite boolean expressions constructed via Filter.and(...) or Filter.or(...).
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#28.
Query.orderBy(field, direction)Orders query results by field ascending or descending.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#29.
Query.limit(limit)Limits maximum number of matched documents returned.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#30.
Query.limitToLast(limit)Limits query results to the last N documents relative to query ordering.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#31.
Query.startAt(values) / startAfter(values)Positions starting cursor boundary using field values.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#32.
Query.endAt(values) / endBefore(values)Positions ending cursor boundary using field values.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#33.
Query.startAt(documentSnapshot) / endAt(documentSnapshot)Positions query pagination cursors using DocumentSnapshot instances.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#34.
Query.get(source)Executes query and returns QuerySnapshot containing matched documents.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#35.
Query.snapshots(metadataChanges)Returns a Coroutine Flow emitting QuerySnapshot upon matching changes.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#36.

CollectionReference — collection operations

CollectionReference.document([path])Returns DocumentReference under collection; auto-generates 20-char ID if path omitted.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#37.
CollectionReference.add(data)Generates auto-ID, writes document data, and returns DocumentReference.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#38.

Snapshots & metadata

DocumentSnapshot.exists()Reports true if document is present in Firestore; false if absent.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#39.
DocumentSnapshot.getData()Returns revived Map<String, Object> containing document field data.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#40.
DocumentSnapshot.get(field)Extracts single field value supporting dot notation or FieldPath instances.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#41.
DocumentSnapshot.toObject<T>()Deserializes snapshot into typed data object via reified extension function.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#42.
SnapshotMetadata (hasPendingWrites, isFromCache)Exposes local cache and uncommitted pending write status on snapshots.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#43.
QuerySnapshot.documents / documentChangesProvides ordered List<DocumentSnapshot> and List<DocumentChange> detailing change types.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#44.

WriteBatch — atomic batches

WriteBatch.set(documentReference, data, options)Enqueues set or merge operation into atomic mutation batch.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#45.
WriteBatch.update(documentReference, data)Enqueues update operation into atomic mutation batch.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#46.
WriteBatch.delete(documentReference)Enqueues delete operation into atomic mutation batch.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#47.
WriteBatch.commit()Atomically commits all enqueued mutations across multiple documents.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#48.

Transaction — interactive transactions

Transaction.get(documentReference)Reads document snapshot within transaction context and acquires read lock.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#49.
Transaction.set(documentReference, data, options)Enqueues transactional set mutation to be committed on handler completion.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#50.
Transaction.update(documentReference, data)Enqueues transactional update mutation to be committed on handler completion.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#51.
Transaction.delete(documentReference)Enqueues transactional delete mutation to be committed on handler completion.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#52.
Transaction retry mechanismCatches optimistic locking conflicts and re-executes handler up to maxAttempts.
com.google.firebase.firestore specification; unverified locally.

FieldValue — sentinels & transformations

FieldValue.serverTimestamp()Encodes sentinel replaced by server commit timestamp during write.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#54.
FieldValue.delete()Encodes sentinel that deletes the target field during document update.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#55.
FieldValue.increment(value)Encodes numeric transformation operand that atomically increments field value.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#56.
FieldValue.arrayUnion(elements)Encodes transformation adding elements to array field if absent.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#57.
FieldValue.arrayRemove(elements)Encodes transformation removing matching elements from array field.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#58.

Data types & value codecs

Timestamp codecSerializes and revives Timestamp preserving seconds and nanoseconds across bridge wire format.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#59.
GeoPoint codecSerializes and revives GeoPoint coordinates (latitude, longitude) over WebSocket bridge.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#60.
Blob codecSerializes byte arrays to base64 bridge wire format and revives them as Blob.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#61.
DocumentReference codecEncodes and decodes DocumentReference values stored within document fields.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#62.
Nested Map and List collectionsDeeply encodes and revives recursive nested Maps and Lists containing mixed primitives and sentinels.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#63.

Aggregations & advanced queries

AggregateQuery.count()Returns count of matched documents without pulling full document payloads.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#64.
AggregateQuery.aggregate(sum, average)Computes server-side numeric sum and average across matched query documents.
com.google.firebase.firestore specification. Test: packages/kt-client/src/test/kotlin/dev/pyric/firestore/ConformanceTest.kt assertion set firestore-kotlin#65.

Current gaps

Unverified

Tracked behavior whose available evidence does not yet establish the production result.

FirebaseFirestore.clearPersistence()Clears offline client persistence cache when no active listeners exist.
com.google.firebase.firestore specification; unverified locally.
FirebaseFirestore.enableNetwork() / disableNetwork()Toggles client network connectivity to simulate offline operation.
com.google.firebase.firestore specification; unverified locally.
FirebaseFirestore.waitForPendingWrites()Resolves when all locally initiated writes have been committed by the server.
com.google.firebase.firestore specification; unverified locally.
FirebaseFirestore.addSnapshotsInSyncListener(runnable)Notifies when all active snapshot listeners are in sync with server state.
com.google.firebase.firestore specification; unverified locally.
Transaction retry mechanismCatches optimistic locking conflicts and re-executes handler up to maxAttempts.
com.google.firebase.firestore specification; unverified locally.