cloud_firestore_dart 0.3.2
cloud_firestore_dart: ^0.3.2 copied to clipboard
Unofficial pure-Dart Cloud Firestore client ported from the Firebase Android SDK: offline cache in SQLite, real-time listeners, queries and transactions.
0.3.2 #
- Several tabs can share one IndexedDB cache:
indexedDbCacheSettings(multiTab: true)(a preview, off by default; Chrome only, tested with dart2js and dart2wasm). One tab is primary and uses the network; the others get their listeners' results and the acknowledgement of their writes through it, and another tab takes over when it closes or its lease (5 s) lapses. It uses the lease, rows andlocalStoragekeys of the JS SDK'spersistentMultipleTabManagerand needswindow.localStorage(unimplementedwithout it). A one-tab and a multi-tab instance on one cache refuse each other. Differences from JS: a secondary takes the lease at once when it hears a closing tab remove its state, and a page restored from the back/forward cache comes back with a terminated client. Not tested: a JS SDK tab beside a tab of this SDK, different users in the tabs, other browsers, a tab hidden for more than a few minutes; the handover between a hidden and a visible tab was tried by hand in Chrome only. The SQLite caches stay at one tab. Seedocs/guides/web.md. - The package has the pub.dev topic
server.
0.3.1 #
WebExperimentalLongPollingOptionsand the long-polling settings are supported, not experimental: the word "Experimental" in their names comes from the JS SDK and stays for compatibility with it and with FlutterFire.getPendingWriteCount()andpendingWriteCounts()are a supported extension, no longer experimental (the official SDKs have no equivalent). New tests: the count per user and after a change of user, with writes of several users, with the memory and the SQLite cache; the 250 ms throttle of the stream; a second client on the same SQLite cache, whose writes the stream shows at its next emission.- Firestore Lite (
package:cloud_firestore_dart/lite.dart) is supported, no longer experimental, and covered by the support policy like the main library. Its public API was compared export by export with the JS SDK'sfirebase/firestore/lite;docs/guides/lite.mdlists every difference (all deliberate; the JS SDK'sfirebase/firestore/lite/pipelinesis not ported) and what was verified: the emulator over gRPC and REST, and Chrome (dart2js and dart2wasm), never a production backend. New tests: batches with several kinds of writes and all-or-nothing failure, cursors from document snapshots and on several fields, aggregations over cursors, and converters in batches, transactions and cursor queries. - The cache in your own storage (
package:cloud_firestore_dart/cache_store.dart,keyValueCacheSettingsover aCacheStore) is no longer experimental. What it stores is now a commitment: the format is versioned, a newer SDK migrates the store of an older one in the transaction that opens it, and a store written by a newer SDK is refused withfailed-precondition(no downgrade;clearPersistence()starts over). The format of 0.3.0 is kept as a test fixture, and a format change without a new version and a migration fails the tests. Limits, stated plainly: one Firestore instance and one client per store (no primary lease, no coordination of tabs, isolates or processes), and the writes of each SDK transaction are held in memory until it commits. New guide:docs/guides/custom_cache_store.md; the format is described indocs/keyvalue_cache_format.md. - An error thrown by a
CacheStore(get,scanorwrite) is now treated as a database that is not available right now (TransientDatabaseException, with the store's error as itscause): the listen or write that needed it fails withunavailable, acknowledgements and remote changes are stored again later, and the client goes offline and tries the store again with a backoff. Before, the error was fatal for the client. getPendingWriteCount()on the key-value cache reads the pending batches once and then keeps the count; it read every batch on each call (10,000 pending writes: about 4 ms per call before, under 0.1 ms after the first).- The key-value cache no longer counts deleted documents it skips in a collection scan as read, as the SQLite cache does; the count feeds the choice of a cache index.
mergeUnsentWritesis no longer experimental: it is a supported opt-in extension that differs from the official SDKs (off by default; the backend ends with the same documents, rules and functions see fewer writes). Each merge rule of the guide is tied to a test, and new property tests compare random offline sequences with and without the setting on a model backend, on the emulator (SQLite, memory and key-value caches, with what the app sees after every write and the outcome of every write), against security rules, and with the merge at start killed at random points. The guide also documents that after a process kill a SQLite cache that is not anExclusiveDatabasemerges nothing until the row of the killed client is 30 minutes old.mergeUnsentWrites: aset(or an earlier merged write that became one) with aserverTimestampon a nested field (n.t) followed by anupdatethat deletes that field or a map above it is no longer merged. The timestamp creates the mapn, which the delete leaves empty on the backend; the merged write did not create it, sonwas missing. Found by a new property test of random offline sequences.mergeUnsentWrites: a merged write no longer carries the fields that aserverTimestampof the newer write overwrites (for examplen.tof the older write and a timestamp onnin the newer one). The backend ends the same; until it confirms the write, the value thatServerTimestampBehavior.previousshows under the pending timestamp is now the one it shows without the setting (it showed the older write's fields, or an earlier map). Found by a new test that compares the cache views with and without the setting after every offline write.importJsSdkCacheanddeleteJsSdkCacheare no longer experimental. They are now tested in Chrome (dart2wasm and dart2js) against databases the real JS SDK wrote: every kind of write and value type reaches the backend with the same result as when the JS SDK sends it, the writes of several users each under their user and in their order, every JS schema version from 5 to 18, an import stopped at every step and run again (each write sent once), a JS tab still running (refused), 5,000 pending writes with 20,000 documents, and every kind of cache as destination.- Fixed, JS SDK cache import: a failure while the imported writes were removed from the JS
database could leave some batches removed without their
documentMutationsrows, which the JS SDK asserts on; the removal is now all or nothing. A-0in a JS write is kept (it was read as0). The cached documents are read and imported 2,000 at a time instead of all at once. - Fixed, all platforms: a write stream that failed while acknowledgements of earlier writes were still being processed could be restarted before its failure was handled. Writes then went to the new stream before its handshake, and the rejected write was retried instead of being rejected. Seen when many pending writes, one of them rejected, are sent at once.
- Fixed, web (dart2js): a timestamp less than half a millisecond before a whole second was sent one second late, and the last second of year 9999 as year 10000 (which the backend did not answer). The web transport now writes timestamps as the JS SDK does.
- Web: the IndexedDB cache (
indexedDbCacheSettings()ofpackage:cloud_firestore_dart/indexeddb_cache.dart) is no longer experimental. The persistence suites that the SQLite, memory and key-value caches run (mutation queue, remote documents, targets, overlays, bundles, globals, the index managers, the local store, garbage collection, the query engine, the index backfiller) and the upstream spec tests, restarts included, now run on it in Chrome with dart2js and dart2wasm (test/browser/web_indexeddb_*_test.dart), and CI runs the check against the official JS SDK in Chrome, both ways, when the engine changes. - Fixed, IndexedDB cache: an equality (or
in, range, cursor) query whose value holds a map of two or more keys could miss a document whose cache index entry the JS SDK wrote with the map's keys in another order (the JS SDK encodes a map in the order of its JS object's keys). Such queries are no longer served from a cache index, and this SDK writes maps in one canonical key order. - Fixed, IndexedDB cache: when another client takes the primary lease over (this tab was in the
background long enough for its lease to lapse), the query listeners now get the
failedPreconditionerror that says the lease was lost, and every later call throws it, instead of the listeners stopping without an error and later calls failing with "The client has already been terminated". The same when another client deletes the database. - Fixed, IndexedDB cache: removing a cached document (a delete from the backend, garbage collection) now also removes its cache index entries, so a query served by an index no longer looks up a document that is gone. Writes that reach the caches outside a persistence transaction run in a transaction of their own instead of failing on a read-only one.
- Fixed, IndexedDB cache: the rows are written as the JS SDK writes them. An empty bytes value was
stored as
{}and could not be read back; compiled with dart2js, timestamps were rounded to milliseconds (a time less than half a millisecond before a whole second was stored one second late, and the last second of year 9999 became year 10000, which could not be read back); and -0.0 was stored as0. Timestamps now keep their nanoseconds, -0.0 is written as"-0"and a"-0"the JS SDK wrote is read as -0.0. - IndexedDB cache: a database of a schema version other than 18 is refused as before, and the error now says the cache was left as it is; for a newer version it says that a new schema version of the JS SDK needs a new release of this package.
- Web transport: a WebChannel back channel that stops delivering without failing is now made again, as the WebChannel of the JS SDK does. When the server answers a message of the client with the number of the last message it sent, and the client has not received that one, the client waits 6 seconds for data on the back channel and then requests it again from the last message it has. When the server answers that it has no back channel request at all, one sent more than 3 seconds before is made again at once.
- An unexpected error inside the client's internal queue now fails the queue for good, as the
AsyncQueueof the JS SDK does: it is logged once with its stack (INTERNAL UNHANDLED ERROR), operations that wait for their turn fail with it, and later ones fail withAsyncQueue is already failed. Before, the client went on in a state nobody had checked. The errors of your own operations (a rejected write, a busy cache) stay with their caller and do not fail the queue;terminate()andclearPersistence()still work on a failed queue. - Persistent cache indexes: a query served by a field index could miss a document that watch sent in a later snapshot with the same version as an earlier one, when the index had already been brought up to date for that version and the document's id sorted before the documents indexed last. Such a snapshot now makes the index read its documents again. The JS and Android SDKs have the same gap.
0.3.0 #
-
Faster reads from the cache, with no change in results (100,000 documents, an M5 laptop):
orderBy(...).limit(20)without a cache index 2.7 s to 0.37 s (the documents within the limit are selected before the view is built, instead of all being sorted and then removed one by one), a whole collection 742 to 401 ms (the first result is built in one pass), a filtered scan about 13% faster (the key of a document comes from its row). A filtered scan over documents that exist only as pending writes is about 45% faster (the pending writes are decoded with less copying and filtered while they are read, instead of all being held first), an ordered limit of them about 25% and a whole collection about 15% faster. Method and numbers indocs/spikes/cache_read_profile.md. -
Experimental: bring your own cache storage.
keyValueCacheSettings(store: ...)of the new librarypackage:cloud_firestore_dart/cache_store.dartkeeps the persistent cache in anyCacheStore, an ordered key-value store of bytes that the app implements (open,close,get, a rangescan, andwrite, which applies a list of puts and deletes atomically and durably). The store needs no transactions: the SDK keeps the writes of each of its transactions in memory, reads through them, and hands them to the store in onewriteat commit, so a store on IndexedDB, whose transactions cannot stay open across the SDK's awaits, works as well as one on SQLite. The SDK lays out the whole cache on it in a format of its own: documents, pending writes, overlays, targets, LRU garbage collection, cache indexes, bundles.package:cloud_firestore_dart/cache_store_testing.darthas conformance checks for a store, andexample/cache_store/three example stores (plain Dart with a log file, SQLite as a key-value table, and IndexedDB for the web). One instance uses a store at a time. Only apps that import the library carry the code. -
Breaking for code that switches over
LocalCacheSettingsexhaustively: there is a new subclass,KeyValueCacheSettings. -
Experimental, web:
indexedDbCacheSettings()of the new librarypackage:cloud_firestore_dart/indexeddb_cache.dart(only apps that import it carry the engine) stores the cache in IndexedDB in the format of the official Firebase JS SDK (databasefirestore/<app>/<project>[.<database>]/main, schema version 18, the same stores, keys and proto3 JSON rows), without SQLite: nosqlite3.wasmto download and noopenDatabasefunction. A new database is created as the JS SDK creates it, an existing one of version 18 (left by a JS SDK app) is opened as it is, any other version is refused. Stored: the pending writes, the cached documents, the overlays, the targets, the globals, the collection parents, cache indexes (configuration, states and entries, with the JS SDK's own index value encoding, so indexes built by either SDK serve the other), bundles and named queries. Garbage collection runs on the JS SDK's sequence numbers and size accounting (sizeBytes);indexAutoCreation,indexBackfillandmergeUnsentWritesas inPersistentCacheSettings. One tab at a time: it takes the JS SDK's primary lease as a single JS tab does, refuses to start while another client holds a valid lease, and terminates when another client took the lease over while it was in the background. Throws anUnsupportedErroroff the web.importJsSdkCacheanddeleteJsSdkCachedo nothing on an instance whose cache is that database. -
Experimental, web:
importJsSdkCache(firestore)imports the IndexedDB cache of the official Firebase JS SDK (or of FlutterFire on the web) once, so that a web app switching to this SDK keeps the writes its users left pending: the pending writes of every user, in order, and the cached documents (not the targets, resume tokens, indexes or bundles). Exactly once across crashes; refuses while a JS tab may be open, for unknown schema versions (5 to 18 are read), when the cache already has pending writes of the same user, and with a memory cache unlessallowMemoryCache: true(a reload would lose the imported writes).deleteJsSdkCache(firestore)deletes the JS database. A no-op off the web. See "Switching from the official JS SDK" indocs/guides/web.md. -
Docs only, no code change: the web (browser) support is now described as supported in Chrome (tested against the emulator; other browsers untested) instead of experimental.
-
Experimental, not in the official SDKs, off by default:
mergeUnsentWritesonPersistentCacheSettingsandMemoryCacheSettingsmerges a write into the pending write of its document when that one was not sent yet and the two have the same result on the backend, so a document edited many times offline keeps one pending write (see "Merging repeated offline writes" indocs/guides/offline_persistence.mdfor the conditions and what rules and triggers no longer see). The writes already queued when an instance starts with the setting on (from an earlier session, or queued with it off) are merged once at start by the same rules, in transactions of 500 writes between the app's operations and before any write is sent; an interrupted merge resumes at the next start. -
With many pending writes, a query of a collection reads only the pending writes of that collection instead of every pending write of the user (a collection of 10 among 1,000,000 pending writes: 128 ms to 0.07 ms), and an index fill run reads only the next pending writes of its collection group (schema 20 adds an index on the overlays, built once on open: about 1 s for 1,000,000 pending writes). The local store also forgets the keys of a batch once it is acknowledged or rejected.
-
An index fill run of a collection group spread over many collections no longer reads every collection of the group when few cached documents changed since the last run: those are read in read time order and the ones of the group kept (one run of 50 documents with 100,000 pending writes in 10,000 collections: about 1.1 s to 15 to 60 ms, now about the same as with 10,000 pending writes).
-
Experimental:
FirebaseFirestore.getPendingWriteCount()andpendingWriteCounts()give the number of write batches the backend has not acknowledged yet, and a throttled stream of it, to show the progress of a sync after a long time offline. The official SDKs have no equivalent. See "Writes waiting for the backend" indocs/guides/offline_persistence.md. -
Cache indexes, not in the official SDKs:
PersistentCacheSettings(indexAutoCreation: true)turns automatic index creation on from the start of every instance (noenableIndexAutoCreation()call needed),PersistentCacheSettings(indexBackfill: IndexBackfillSettings(documentsPerRun:, interval:, initialDelay:))sets the background fill rate (default 50 documents a minute, as before), andpersistentCacheIndexManager.fillIndexes({maxDocuments})fills the indexes now, in runs of 100 documents between the other operations.PersistentCacheSettings.toString()lists the new fields. -
Acknowledging one of many pending updates of a document with a
serverTimestamporincrementno longer applies all the remaining updates again: the overlay is recalculated from a summary of them that the previous acknowledgement kept (100,000 updates: 623 ms to 0.16 ms per acknowledgement in the local store). The local views stay the same. -
The copied SQLite openers are gone from
example/:sqlite_database.dart,sqlite_database_web.dartandsqlite_opfs_worker.dart. Since 0.2.0 apps usecloud_firestore_dart_sqlite(sqliteOpener,openWithMemoryFallback,runOpfsWorker), which holds the same code; the examples, the tests and the browser tests of this package now use it too. -
Development only: the
sqlite3dev dependency allows 2.7.3 to 3.x, likecloud_firestore_dart_sqlite, and the tests no longer importpackage:sqlite3/open.dart(gone in 3.x). The lock file and the browser tests'sqlite3.wasmmove to 3.9.1, now thatcloud_firestore_dart_sqlite0.1.1 waits for every queued IndexedDB write (the IndexedDB crash test lost acknowledged transactions on 3.9.1 before). -
A query with
limitserved by a cache index reads only the documents of its window when the last document of the window has pending writes that the index already holds, instead of every match (anorderBy.limit(10)on 100,000 pending documents: about 2 s before).
0.2.0 #
Breaking: the public API takes the names and shapes of FlutterFire's cloud_firestore and of
Dart, instead of those of the Android SDK. The implementation did not change. Every change, with
its FlutterFire equivalent, is in
docs/api_migration_0_2.md.
FirestoreisFirebaseFirestoreandFirestoreSettingsisSettings(the old names stay as deprecated aliases);instanceFor(databaseId: ...);FirebaseFirestore.instancecreates the default instance when there is none.snapshots(),snapshotsInSync()anddata()are methods;get([GetOptions]);snapshots({includeMetadataChanges, source})replacesgetSnapshotsandgetSnapshotsWithOptions.- One
where,orderBy(field, descending: ...),Filter(field, isEqualTo: ...),update(Map<Object, Object?>)withStringorFieldPathkeys,SetOptions(merge: ..., mergeFields: ...),withConverter(fromFirestore: ..., toFirestore: ...)andfindNearestwith named arguments replace the Java-style overloads and options objects. DocumentSnapshot.get(field)takes aStringor aFieldPath; the typed getters (getString,getInt, ...) are gone.DocumentSnapshot.reference,DocumentChange.doc,QuerySnapshot.size,FieldPath(...),FieldPath.fromString,FieldPath.documentId.- Errors are
FirestoreException, which extendsFirebaseExceptionand implementsException:codeis FlutterFire's string ('not-found'),errorCodetheFirestoreErrorCodeenum. - As in FlutterFire,
firestore.settings = ...anduseFirestoreEmulator(host, port)work until the first use of an instance: the instance starts at its first use, or at once wheninstanceForgot settings. After that they throw aFirestoreExceptionwithfailed-precondition.runTransactiontakes atimeout(30 seconds by default). - A new instance of an app name and database waits for a terminated instance of the same ones to
close its cache, also after
await app.delete(). - Fixes:
VectorQuery.getapplies the converter of its query;QuerySnapshot.docChangesincludes metadata-only changes when the listen asked for them; the settings of an instance can be read back (FirebaseFirestore.settings);LogLevel.info, which logged likewarn, is removed. - Docs: the SQLite openers are in the new companion package
cloud_firestore_dart_sqlite(sqliteOpener); the doc comment ofOpenDatabaseandexample/README.mdpoint there. The copies inexample/stay for the tests of this package.
0.1.1 #
Documentation and examples only. The library behaves exactly as in 0.1.0; the only code
change is the version it reports (Version.sdkVersion).
- API reference: doc comments with compiling samples across the public API:
Firestore, references, queries, snapshots, writes, transactions, batches, field values, error codes and the value types. - New examples in
example/:cookbook/(18 task-shaped programs),performance/(four programs on indexes, cache size and bundles),error_handling.dartandlogging.dart. - README: links to the new guides in the repository: Flutter, web, servers, cookbook, error handling, troubleshooting, performance and a guide for AI coding agents.
- Corrections:
example/sqlite_database.dartsays that it needssqlite32.x (it does not compile with 3.x), andexample/lifecycle.dartnames the right default log level (warn).
0.1.0 #
First release under the new name. This package was published as cloud_firestore_vm (last
version 0.0.7, April 2020); it is the same code base, revived and brought forward to roughly
the behaviour of the current Android and JS SDKs. One entry covers the whole revival.
The published package contains lib/ and example/. Tests, tooling and design notes (the
test/, tool/ and docs/ paths mentioned below) are in the
repository.
How this was verified:
- Unit tests, the spec tests shared with the JS and Android SDKs, and integration tests against
the local Firestore emulator. Against production Firestore only the verification kit
(
tool/verify_production) was run, on a Standard edition database: 13 of its 15 checks passed in one run and 2 were skipped (one needs an Enterprise edition database, the other a Web API key with anonymous sign-in). An earlier run found the -0.0 bug of the web transport that is fixed in this version. - Features of the Enterprise edition (BSON value types, Pipelines) were run against the emulator in Enterprise edition only.
- Web support is experimental: it was run in Chrome only, against the emulator only, with a memory cache or the opt-in SQLite cache in IndexedDB (browser tests, and the standard integration suite on the VM over the web transport).
- On the VM: macOS, Ubuntu x64 (CI) and Debian arm64 (a container: unit tests, the standard
integration suite, SQLite shared by two isolates and by two processes, the connectivity
detector against a real interface change). Windows was not run. The SQLite opener of the
example falls back to
libsqlite3.so.0on Linux systems withoutlibsqlite3-dev.
Renamed packages #
- License: Apache-2.0 (see
LICENSEandNOTICE).cloud_firestore_vmand the two internal_vmpackages were licensed under BSD-3-Clause. cloud_firestore_vmis nowcloud_firestore_dart: importpackage:cloud_firestore_dart/cloud_firestore_dart.dart.firebase_core_vmis nowfirebase_app_dart(FirebaseApp,FirebaseOptions, ... keep their names)._firebase_database_collection_vmis folded into this package and_firebase_internal_vmintofirebase_app_dart; neither is a separate dependency any more.- The Flutter example app is replaced by command-line examples, one per topic, in
example/(including a completepackage:sqlite3opener for offline persistence); they run against the Firestore emulator. - Migration guide with before/after code: docs/migrating_from_vm_packages.md.
Breaking changes #
Requirements:
- Dart 3.8 (
sdk: ^3.8.0, required bygrpc5) with sound null safety; dependencies updated to the current majors (grpc^5.1.0,protobuf^6.1.0,rxdart, ...). Values that can be missing are nullable:DocumentSnapshot.datais null for a missing document and field values areObject?.
API changes that need code changes:
DocumentReference,CollectionReference,Query,DocumentSnapshot,QueryDocumentSnapshot,QuerySnapshotandDocumentChangeare generic in the type of the document data (see typed data converters under Added). Code that uses the references returned byFirestorekeeps compiling (they are...<Map<String, Object?>>); a bare type annotation such asDocumentSnapshotnow meansdynamicdata.Firestore.instanceFor(new) and the deprecatedgetInstancereturn theFirestoreinstead of aFuture<Firestore>, like Firestore Lite, the JS, Android and FlutterFire SDKs. The instance initializes in the background as the first task of its queue: it waits for the first user of the auth provider, opens and migrates the cache, and starts the local and remote stores, and every operation runs after that. A failed initialization (the opener throws, a migration fails) is reported by the operations of the instance instead of byinstanceFor. A newFirebaseAppwith the name of a deleted one gets its instance at once; it opens the cache once the instance of the deleted app has closed it.await Firestore.instanceFor(...)keeps compiling.Firestore.databaseIdis the database name as aString(as FlutterFire's), no longer theDatabaseIdmodel; the newFirestore.projectIdgives the project. The same in Firestore Lite.Database.file(adart:ioFile) is replaced byDatabase.path(aString), so the persistence interface no longer needsdart:io. Implementations ofDatabasemust rename the getter.FirebaseApp.setDataCollectionDefaultEnabled(firebase_app_dart) now takes a required namedenabledparameter.- Narrowed public API (internals that leaked through the barrel or as public members):
- No longer exported:
ConflictAlgorithm,maxVectorQueryLimit,maxVectorQueryDimensions. Fromutil/database.dartonly the SQLite opener contract stays public:Database,OpenDatabase,OnConfigure,OnCreate,OnOpen,OnVersionChange(now documented).UnaryFilter/CompositeFilterwere already not exported; the API golden listed them by mistake. - No longer reachable from
package:cloud_firestore_dart/cloud_firestore_dart.dart(they are library private; the SDK itself uses them through extensions that the public libraries do not export). None of the classes below has a public constructor any more, so they cannot be subclassed outside the SDK (implementsfor a test double still works):Firestore(...)constructor,Firestore.newInstance,client,scheduler,dataConverter, theDatabaseIdmodel ofdatabaseId(Firestore.databaseIdis now the database name as aString, as in FlutterFire; with the newFirestore.projectIdit replaces the model),validateReference;Query.query;QuerySnapshot.snapshot;DocumentSnapshot.document;DocumentReference.key;SetOptions.fieldMask;FieldPath(...)unnamed constructor,internalPath,reserved,documentIdInstance(useFieldPath.documentIdField);FieldValue.elements,methodNameand theisDelete/isServerTimestamp/isArrayUnion/isArrayRemove/isIncrement/isMinimum/isMaximumgetters;AggregateField.alias; theAggregateQueryandAggregateQuerySnapshotconstructors; theLoadBundleTaskconstructor,setResult,setException,updateProgress;LoadBundleTaskProgress.forInitial/forSuccess;FirestoreErrorCode.fromValue;Timestamp.validateRange; and the constructors ofDocumentReference,CollectionReference,Query,DocumentSnapshot,QueryDocumentSnapshot,QuerySnapshot,DocumentChange(withchangesFromSnapshot),Transaction,WriteBatch,VectorQuery,VectorQuerySnapshotandPersistentCacheIndexManager.package:cloud_firestore_dart/lite.darthides the same members of the classes it shares with the main library (FieldPath,FieldValue,SetOptions,AggregateField,Timestamp).
- No longer exported:
Behaviour changes without a compile error:
- Read-write transactions no longer fail with "Every document read in a transaction must also
be written": documents that were read but not written are sent as
VerifyMutations at commit (upstream ef38ef7), so the transaction retries if they changed. - Operations on a terminated instance fail with a
FirestoreErrorwith the codefailedPreconditionand the message "The client has already been terminated." (as the JS SDK; it was anArgumentError"The client has already been shutdown"). The error always arrives through the returnedFuture, as the first event of aStream(which then closes;snapshotsInSyncused to stay silent) or through theLoadBundleTask, never as a synchronous throw. Builders that do no I/O (collection,doc,batch,where, ...) and committing an emptyWriteBatchkeep working, as upstream. - Default transaction attempts changed from 6 to 5 (now
TransactionOptions.defaultMaxAttempts). - Read-only transactions (
TransactionOptions(readOnly: true), new in this release) run on the backend: they read one snapshot, commit nothing and are not run again when documents change. Revisions of this package before the release verified the documents at commit and retried; code written against those sees the snapshot instead. See Added. - Arguments are validated in every build mode, not only with asserts: a collection path with an
even number of segments, a
cacheSizeBytesbelow 1 MB with persistence, aGeoPointorTimestampoutside its range when it is written or used in a query.firestore.doc(''), a document path that is only a slash andcollectionGroup('')throw anArgumentError(they were accepted). Details under Fixed. - Settings and input are validated more strictly (from a security review):
FirestoreSettingsthrows anArgumentErrorforsslEnabled: falsewith the production host in every build mode (it was anassert, which release builds drop, so the auth token could be sent without TLS), whatever the case of the host or a trailing dot.FirestoreSettings.hostmust be a host name or IP address: an empty value or one with/,@,?,#,\or whitespace is anArgumentError(a value such asfirestore.googleapis.com@other.examplemade the web transport talk to the other host).- Bundles are treated as untrusted input: a length prefix has to be at most 10 plain decimal digits, an element is at most 64 MiB, values and filters may be nested at most 100 levels, and fields of the wrong JSON type are reported as an invalid bundle. A stream without a valid element is rejected at once instead of being buffered, and elements that arrive in small chunks are no longer re-copied per chunk.
- Over REST (Firestore Lite on the web, and the single calls of the web transport) a document
or collection path with a
.or..segment fails withinvalid-argumentbefore anything is sent: the URL resolved such segments, so the request went to another path (or project) with the credentials of this one. The gRPC transport sends the path as data, and the backend rejects these ids. - The bundle inside a snapshot JSON (
DocumentSnapshot.fromJson,QuerySnapshot.fromJson) needs the same plain decimal length prefix asloadBundle(a sign, white space or a hex prefix was accepted), and its errors quote at most 200 characters of the input. - Decimal128 values are parsed, compared and hashed in linear time: a value with a million digits (in a bundle or a snapshot JSON) took seconds to minutes and blocked the isolate. The accepted strings and the order are unchanged.
clearPersistence()that empties a cache other clients still use quotes the table names it reads from the file: a table named by another process could run SQL (for example attach and create another file with the permissions of this process).
- The local evaluation of queries and transforms follows the backend where 0.0.7 (and the JS
and Android SDKs) did not; details under Fixed:
whereIn,whereNotIn,arrayContains,arrayContainsAny,arrayUnionandarrayRemovecompare numbers by value (1is1.0), whatever their type.<,<=,>and>=do not matchnullandNaN.- A cached document that the client matches for a query but the backend does not return is
dropped from that query's view once the backend confirms that it exists, instead of
keeping the listener in
isFromCache. - A write that is acknowledged without changing the document on the backend (a re-sent write) is applied to the cached document.
- Idle stream timeout changed from 10 seconds to 1 minute (as Android).
- A clean close of a stream by the server is now reported as
UNAVAILABLEand retried instead of being ignored (fixes a start hang). TransformMutationis removed: field transforms are folded into set/patch mutations (update_transforms). Stored legacy transform writes are squashed on load by the local serializer.- Locally mutated documents carry
SnapshotVersion.none, as upstream. - The SQLite schema goes from version 8 to 17 (bundle tables, read times on remote documents,
document overlays, the tables of the persistent cache indexes, two lookup indexes, and the
client lease tables of version 15, the globals table of version 16, ported from the JS and
Android SDKs, which keep a session token there; nothing uses it yet, as upstream; and the
document_typecolumn of version 17 (Android 26.0.1), with which queries skip deleted documents; rows from older versions get it the first time they are read; see index-free queries, document overlays and persistent cache indexes under Added, and the primary client under Fixed). The migration runs through the opener'sonUpgradecallback on the first open; pending writes are converted to overlays the first time the client starts. A cache written bycloud_firestore_vm0.0.7 (schema 8) is migrated with its documents, targets (reused: the canonical ids did not change), pending writes (legacy transform writes are folded into the preceding write) and collection parents. Covered by a test on a schema 8 database reconstructed from the 0.0.7 sources, and by a migration test from every intermediate schema version. - With overlays, array transforms (
arrayUnion/arrayRemove) keep their local result until the write is acknowledged instead of being re-applied on top of newer server data (as upstream). Timestamp.fromDate/toDateare microsecond-accurate (they truncated to milliseconds), also on the web up to the end of theTimestamprange; results for millisecond inputs are unchanged, andDateTimevalues written to documents keep their microseconds.Timestamp.now()still has millisecond precision.Blob.bytesreturns a copy.FirebaseApp.persistenceKey(firebase_app_dart) now uses URL-safe base64 without padding; keys computed by older versions differ.
Deprecated, still working:
Firestore.getInstance(useinstanceFor),Firestore.shutdown(useterminate),document(usedoc),DocumentSnapshot.reference(useref),QuerySnapshot.documents/documentChanges(usedocs/docChanges),FieldPath.documentId()(usedocumentIdField),Source.defaultSource(useserverAndCache).FirebaseFirestoreandSettingsare typedefs ofFirestoreandFirestoreSettings.
Added #
example/sqlite_database.dart:sqliteOpener(directory, pageCacheMb: ...)sets SQLite's page cache size (PRAGMA cache_size). The client keeps SQLite's default, as the Android SDK does; the offline persistence guide has measurements and a recommendation.- Recovery from a cache that is not available for a while, as in the JS SDK: a
Databasecan throw the newTransientDatabaseException(the example openers do for SQLite's busy, locked, I/O and full-disk errors, and on the web when IndexedDB fails to store a transaction). A listen or write that can not be stored then fails withunavailable; an acknowledgement, watch update or user change that can not be stored takes the client offline and is retried with a backoff until the cache works again. Before, such an error failed the operation that ran into it and could leave the client stuck. Verified with the shared recovery spec tests (simulated failures); not run against a real failing disk. An operation that is retried and itself runs into the failing cache again (an acknowledgement that is stored, after which reading the next write fails) no longer runs twice or drops the operation it queued, and the retries back off instead of looping without delay. A cache that reads but does not write (a full disk) no longer makes the client reconnect, download the same changes and fail to store them in a loop: after a failure, the next one waits for the backoff until a remote event or an acknowledgement was stored again. A write that can not be read from the cache is probed with that read, so the network stays offline until it works.TransientDatabaseException.toString()names the type of itscauseinstead of repeating it: the string of aSqliteExceptionholds the statement and its arguments (document contents, paths, user ids), and Firestore puts this exception into theunavailableerror the app gets and into a warning in its log. - Authentication with ready-made token providers from the new
firebase_auth_providers_dartpackage of this repository (Firebase Auth user sign-in over REST, service accounts, Application Default Credentials); see the README section "Authentication".test/integration_authshows a signed-in user's token reaching Firestore over gRPC, the web transport and Firestore Lite, the streams restarting on a user switch and access ending at sign-out. Emulators only.
Queries and aggregations:
- Queries:
!=/not-in, compositeFilter.or/Filter.and(OR queries), multiple inequality filters,limitToLast, arrays inwhereInvalues. Query.wherealso takes a field with FlutterFire-style named arguments:where('age', isGreaterThanOrEqualTo: 18, isLessThan: 65),where(FieldPath.documentIdField, whereIn: [...]),isNull: true/false.where(Filter)keeps working (the parameter is nowObject: aFilter, aStringfield or aFieldPath). Unlike FlutterFire, a call with a field and no non-null named argument throws anArgumentErrorinstead of returning the query unchanged.- Aggregations:
count(),sum,averagethroughRunAggregationQuery.Query.aggregateWithAliases({'total': AggregateField.sum('price')})runs aggregations with user-chosen aliases, as JSgetAggregateFromServer;AggregateQuerySnapshot.data()returns the results keyed by alias (also exposed asAggregateQuery.aliases). - Vector values and
Query.findNearest(server only).
Data types:
- Typed data converters:
FirestoreDataConverter<T>(withFirestoreDataConverter.from),SnapshotOptions, andwithConverter<T>/withoutConverter()onDocumentReference,CollectionReferenceandQuery.set/add/WriteBatch.set/Transaction.settakeT,datareturnsT; a converter of a nullable type may return null, and snapshot equality takes the converter into account.runTransaction<T>is generic in its result. - BSON value types for Enterprise edition databases:
MinKey,MaxKey,Int32Value,Decimal128Value,BsonObjectId,BsonTimestamp,RegexValue, and BSON binary data as aBlobwith a subtype (Blob.bsonBinary,Blob.subtype). They can be written, read (with typedDocumentSnapshotgetters such asgetInt32Value), filtered and ordered, and the local cache sorts them like the backend.Blob.fromJsonaccepts asubtype. Until now a document with such a field was read as a map like{'__int__': 5}.AggregateQuerySnapshot.getDouble/getIntconvert aDecimal128Valuesum or average, and a plain map with a reserved key used as a query value or as anarrayUnion/arrayRemoveelement (for example{'__int__': 5}) is read as the BSON value, so that the local cache evaluates the query like the backend. Verified on the Enterprise edition emulator only.Decimal128Valuethrows aFormatExceptionfor a string that decimal128 can not hold exactly, as the backend rejects such a value: more than 34 significant digits (leading zeros and trailing zeros that carry no digit do not count), anything above9.99...9e6144, or a last digit below1e-6176(1e6145,1e-6177and15e-6177are rejected;1e6144,1e-6176and1.with 40 zeros are fine). A stored value is read as it is. The other SDKs accept any decimal string and round it to a 128-bit binary float. - Value helpers from the JS SDK:
Timestamp.fromMillis/toMillis,Blob.fromBase64String/toBase64, andtoJson/fromJsononTimestamp,GeoPoint,BlobandVectorValuein the JStoJSON()shape (sojsonEncodeworks on them). ServerTimestampBehavioris exported.
Transactions and writes:
- Read-only transactions of the backend:
TransactionOptions(readOnly: true)starts a read-only transaction on the server with its first read. Every read sees one snapshot of the database: documents withTransaction.get, and (new) queries and aggregations withTransaction.getQueryandTransaction.getAggregate.TransactionOptions.readTimereads the database as it was at a past time. Nothing is committed and the callback is not run again for conflicts. (Before, the documents read were verified at commit withVerifyMutations and the transaction retried; theverifywrite is still used for documents that a read-write transaction reads without writing.) Over the web transport they use the REST verbsbeginTransactionandrollback. Emulator-verified only. - Transaction retry with exponential backoff and
TransactionOptions(maxAttempts). FieldValue.maximum/FieldValue.minimum.
Listeners, cache and lifecycle:
Firestore.waitForPendingWrites,terminate,snapshotsInSync.- Cache settings (
PersistentCacheSettings,MemoryCacheSettings),ListenSource.cacheandSnapshotListenOptions. - Persistent cache indexes (the client-side index engine of the Android and JS SDKs):
Firestore.persistentCacheIndexManagerwithenableIndexAutoCreation(),disableIndexAutoCreation()anddeleteAllIndexes(), and the deprecatedFirestore.setIndexConfiguration(json). Queries against the SQLite cache are served from an index when one matches (all operators,in/not-in, array membership, OR queries, cursors, limits), merged with the documents that are not indexed yet; indexes are filled in the background. Schema versions 12 and 13 add the tables. Not available with a memory cache. The stored index entries differ from the Android SDK's in two places where its encoding returns wrong results (references of different depths, BSON timestamps past 2^31 seconds). Firestore.clearPersistence(): deletes the local SQLite database (and its-journal,-wal,-shmfiles) of a terminated instance. It fails withfailedPreconditionwhile the instance, or a newer instance of the same app and database, is running, and is a no-op for memory persistence.- Index-free queries (upstream 21.3.0): queries that were synced before are executed from their
cached result plus the documents read since then, instead of a full collection scan (SQLite
schema version 10: read time columns on
remote_documents). Older versions of the port can still open the database, and a later upgrade discards the data they could not maintain. - Document overlays (upstream 24.0.0): the local view of documents with pending writes is stored as one overlay per document instead of replaying the whole mutation queue on every read and query (SQLite schema version 11).
- Data bundles and named queries (
loadBundle,loadBundleStream,getNamedQuery), including bundles withORcomposite filters. - Snapshot serialization (JS SDK
toJSON()/documentSnapshotFromJSON()/querySnapshotFromJSON()/onSnapshotResume()):DocumentSnapshot.toJson(),QuerySnapshot.toJson(),DocumentSnapshot.fromJson(),QuerySnapshot.fromJson(),Firestore.documentSnapshotsFromJson()andFirestore.querySnapshotsFromJson(). The JSON holds the snapshot as a bundle string; resuming a query listen sends the snapshot's read time to the backend. AlsoDocumentReference.toJson()/DocumentReference.fromJson(). The JSON and bundle formats are checked against the JS SDK (13.3.0) and firebase-admin bytest/integration/.../js_interop_test.dart(needstool/interop). A serialized snapshot keeps empty blobs and-0.0.
Emulator and logging:
FirestoreSettings.withEmulator(host, port, mockUserToken: ...)(and themockUserTokensetting): a token string or a map of claims, encoded as an unsigned JWT likeconnectFirestoreEmulatorof the JS SDK, sent as the bearer token to the emulator. It can only be set throughwithEmulator; settings that have a token and are pointed at another host throw anArgumentError, so the unsigned token is never sent to production. A token with an emptysubusesuser_idfor the user.Firestore.setLogLevel(LogLevel)with the six levels of the JS SDK:verbose,debug,info,warn(the default),errorandsilent; also in Firestore Lite.setLoggingEnabledstill works.Firestore.app, an alias ofFirestore.firebaseAppunder the name the JS SDK and FlutterFire use.
Pipelines (preview):
- Firestore Pipelines as a preview in a separate library,
package:cloud_firestore_dart/pipelines.dart:firestore.pipeline()with the sourcescollection,collectionGroup,database,documents,literalsandcreateFrom(query), the stageswhere,select,addFields,removeFields,sort,limit,offset,aggregate,distinct,findNearest,sample,union,unnest,replaceWithandrawStage, and expressions for comparisons, logic, math, strings, arrays, maps, timestamps and vectors. Pipelines need an Enterprise edition database and are always executed by the server (no cache, no offline support, no listeners). The API is experimental and may change. Tested with the unit suite and an Enterprise edition emulator only. - The preview also has the write stages
update,delete,insertandupsertwithexecute(atomic: true), variables and subqueries (define,variable,subcollection,toArrayExpression,toScalarExpression), lambda functions (arrayFilter,arrayTransform),switchOn,nor, andPipelineSnapshot.explainStats.createFrom(query),createFromAggregateQueryandcreateFromVectorQueryconvert the classic queries;example/pipelines.dartshows the API. A converted query returns what the classic query returns in two cases where the pipeline functions behave differently (the JS and Android SDKs do not add these checks):!=andnot-indo not match a null value, andarray-contains/array-contains-anyskip a field that is not an array instead of failing the pipeline. Known difference: a cursor on a field that holds values of several types only returns the documents whose value has the type of the cursor value. Pipeline results return BSON values as their value classes. documents()rejects a path given twice, as the JS SDK does.rawStagetakes aggregate functions and orderings as arguments, also as values of a map argument, as Android'sRawStagedoes.literalsrejects, as the JS and Android SDKs do, an empty field name at any depth of a document, and names the field of aFieldValuesentinel in its error.- Also in the preview:
Pipeline.searchwithdocumentMatchesandscore; window functions withPipeline.addWindowFields,WindowSpec,WindowFrame,WindowFunction,rank()andAggregateFunction.over(beta upstream; the emulator rejects search and window functions, so both are checked for their encoding only);Transaction.execute(pipeline)in read-only transactions; typedPipelineExplainOptionsforPipeline.execute;Expression.arraySum,Expression.log10, more key/value pairs forExpression.mapSet, andpipelineResultEqual. The surface has every symbol of the JSfirestore-pipelinesAPI, in Dart shape.
Firestore Lite (experimental):
- A second entry point,
package:cloud_firestore_dart/lite.dart: the counterpart offirebase/firestore/liteof the JS SDK. A client without local cache, listeners and sync engine, where every call is one request and one response:ref.get(),set/update/delete,collection.add, write batches,runTransaction(also read-only, with queries), queries (where,orderBy,limit,limitToLast, cursors, collection groups),count/sum/averageaggregations with aliases, converters andterminate(). Its classes have the names and the shape of the main library's (Firestore,DocumentReference,Query, ...), without streams, snapshot metadata,Sourceand cache settings; the value types are shared. It uses gRPC on native platforms and REST without WebChannel on the web, with the Auth and App Check tokens of the app and the emulator settings (withEmulator,mockUserToken). A program that only imports it does not contain the sync engine, the local store or the SQLite layer. The API is experimental and may change. See the README section andexample/lite.dart.
Networking:
- A built-in connectivity detector on the VM. While a stream is failing, the client watches the
addresses of the network interfaces (and the clock, for a wake-up from sleep) and restarts
its streams at once when the connectivity may be back, instead of waiting for the backoff. It
only speeds up recovery: it never declares the client offline, and it has no timer while the
streams work. An app that feeds
PlatformDependencies.onNetworkConnecteditself replaces it. Tested on macOS only. - App Check: the token of the app's App Check provider is sent in the
x-firebase-appcheckheader. When the provider throws, requests are sent without the header and a warning is logged, as the JS and Android SDKs behave (their App Check SDKs report failures with a placeholder token instead of failing). Tested on the wire over gRPC, WebChannel and REST (full SDK and Lite): the App Check and ID tokens on every request, their refresh afterUNAUTHENTICATED, a new App Check token used from the next request on, and a failing provider. Enforcement by the backend is not testable on the emulator and remains untested. FirestoreSettings.grpcFlowControlWindow(also in the settings of Firestore Lite): the HTTP/2 flow-control window of the gRPC transport, 256 KiB by default (FirestoreSettings.defaultGrpcFlowControlWindow) as in the Android and JS SDKs, for the connection as a whole and for each request (0.0.7 used the HTTP/2 default of 64 KiB, which limited a large read to 64 KiB per round trip). package:http2 can only set the window of the streams, so the client grows the window of the connection itself and holds back data that package:http2 would refuse while a response is not read. With another window than 65535 bytes a new connection waits for the backend to acknowledge it before its first request, and a server that answers with GOAWAY instead fails the connection attempt. Ignored by the web transport.- Bloom-filter existence-filter handling, gRPC keepalive and connect timeout, backoff reset on connectivity change, instance cache per app and database, serial queue for remote store work.
- Experimental web support. The RPCs are behind a transport interface and the
platform-specific code is behind conditional imports. Where
dart:iois missing (browsers) the client uses a second network transport: REST/JSON forCommit,BatchGetDocuments,RunQuery,RunAggregationQueryandExecutePipeline, and a WebChannel client for theListenandWritestreams, overfetch(package:web, a new dependency). This is what the JS SDK does; neither the backend nor the emulator accept gRPC-Web. The VM keeps using gRPC. Limits:- The cache is in memory on the web unless the application opts in to the SQLite cache in IndexedDB (below).
- Verified against the emulator only: on the VM, where the whole standard integration suite
runs over the web transport (
tool/test_integration.sh standard --transport=webchannel, orFIRESTORE_TEST_TRANSPORT=webchannel), and in Chrome with 54 browser tests (tool/test_browser.sh both; 53 pass and 1 is skipped with each compiler: the IndexedDB crash harness under dart2wasm, the 64 bit integer test under dart2js). No other browser and no production backend was tried. - Compile with dart2wasm to keep 64 bit integers exact. Compiled with dart2js, integers above 2^53 lose precision.
- Opt-in persistence on the web (experimental):
example/sqlite_database_web.dartis a completeOpenDatabasefor browsers, to copy into an application likeexample/sqlite_database.dart. It runs SQLite as WebAssembly (package:sqlite3, which stays out of this package's dependencies) with the database in IndexedDB, guards it with a Web Lock so that a second tab is refused withfailedPrecondition, and waits for IndexedDB at the end of every transaction. New public interfaceClearableDatabase: aDatabasethat implements it deletes its own storage forclearPersistence(), which is how the IndexedDB database is removed (by defaultclearPersistencedeletes the file atDatabase.path). Verified in Chrome against the emulator: data and pending writes survive a new page load of a tab that was not closed properly, a cache held by another browsing context is refused, the schema migrations (up to version 14 when this was run) run one by one and at once, automatic cache indexes work,clearPersistenceremoves the database. The opener creates or upgrades a cache in one transaction and keeps SQLite from writing pages before their commit, and a worker that is killed at random moments (2700 times) always left a database that passedPRAGMA integrity_checkwith every acknowledged transaction in it. 10,000 cached documents of 1 KB are 17 MB and open in 0.1 s, 100,000 are 160 MB and open in 1.2 s compiled with dart2wasm (0.6 s with dart2js). The opener wraps the file system ofsqlite32.9.4 so that a read copies what it reads: compiled with dart2wasm every read used to convert the whole database file (26 ms per statement on a 1.2 MB database; opening a cache of 1,000 documents went from 0.7 s to 19 ms, scanning it from 2.4 s to 39 ms, a write from 0.7 s to 17 ms). Not verified: other browsers, a crash of the browser itself. - OPFS storage for the web cache (experimental):
sqliteWebOpener(opfsWorker: ...)inexample/sqlite_database_web.dartkeeps the database in the origin private file system, with SQLite in a dedicated worker (example/sqlite_opfs_worker.dart, compiled withdart compile js) on the synchronous access handles ofSimpleOpfsFileSystem(package:sqlite3), instead of a copy of the whole database in memory. No cross-origin isolation is needed. IndexedDB stays the default, and the fallback in a browser without synchronous OPFS access in workers; the first OPFS open of a cache that is in IndexedDB moves it, pending writes included. Measured in Chrome with 100,000 documents of about 1 KB: 3 to 7 MB once open instead of 133 to 138 MB, opens in 45 to 170 ms instead of 0.55 to 1.2 s; reads by id and scans cost about the same (a scan of 100,000 documents needs about 0.45 GB for its snapshot with either storage). A worker killed at random moments 1500 times always left an intact database with every acknowledged transaction. I/O errors in the worker (BUSY, LOCKED, IOERR, FULL) are reported asTransientDatabaseException(offline, then a retry) only when nothing can have been stored: inside a transaction, at a COMMIT that left the transaction open or after which the database file is unchanged (its change counter), and for reads; an error at a COMMIT that may have stored the transaction stays fatal, so that it is not applied twice (tested with a worker that fails reads, writes, syncs and the journal delete on command). Not verified: browsers other than Chrome. - Web transport robustness (web only, the gRPC transport is unchanged):
FirestoreSettings.experimentalForceLongPollingandexperimentalAutoDetectLongPolling(on by default), for networks where a proxy buffers streamed responses. Forced long polling was run against the emulator (the whole standard integration suite on the VM with--transport=webchannel-longpolling, and a test in Chrome). The automatic switch has the purpose of the JS option of the same name but its own detection (no data on the first stream response within 10 seconds), and was only tested with a simulated silent response, not behind a real buffering proxy.- Unary calls time out after 15 seconds with
DEADLINE_EXCEEDED, as in the JS SDK. - The client listens to the
online/offlineevents of the browser and restarts its streams when the network comes back. - A WebChannel session is now always terminated on the server: also when it is closed while
its handshake is in flight, and the HTTP layer of a client that is terminated waits for
those requests (up to 3 seconds) instead of cutting them off. Before, every terminated
client left its sessions behind, and the emulator keeps a socket for each (see
tool/README.md). - A stream request that is lost on the way is sent again with the same request id (the
server applies an id once; checked on the emulator), and a listen or write response that
is cut is asked for again from the last message that arrived, both after 100 ms and after
1 s, before the stream fails with
UNAVAILABLE. A WebChannel session therefore survives a cut connection without losing or repeating a message. The chaos tests (cuts, stalls, delays) run over the web transport as well. - Values are sent faithfully: an empty
Blobwas sent without its type (and rejected or misread), and the sign of-0.0was dropped before sending, also in aGeoPoint. They are now encoded like the JS SDK does ("bytesValue": "","doubleValue": "-0"). The JSON endpoints of the emulator (v1.22.0) still store-0.0as0.0, whatever its spelling, so the sign only round-trips there over gRPC. - Over WebChannel a failed write is reported as a message and the session goes on (seen on
the emulator), so writes sent ahead of the failure are applied although the client closes
the stream and sends them again: an
incrementbehind a rejected write was counted twice. Over gRPC the backend ends the call instead. Writes are therefore only sent ahead of the answers to earlier writes when applying them twice is harmless: a write with anincrementwaits for all earlier answers, and so does a write that shares a document with a write in flight when one of the two has a precondition (update). Sets, merges, deletes and updates of distinct documents are sent ahead, up to the ten writes the client keeps in flight. - A WebChannel request that carries messages to the server and is not answered within 20 seconds is aborted and sent again (with the same request id), instead of blocking every later message of the stream for ever on a connection that silently drops data.
- WebChannel responses with a negative or non-decimal chunk length, or one above 256 Mi
characters (enough for a 16 MiB document as JSON), end the stream with
unavailable. - A WebChannel response of many megabytes (for example a query or a listener with many large documents) is parsed in one pass instead of being copied once per network chunk; reading 12 documents of 1 MiB from the emulator takes about 0.2 s instead of 4 s.
- Request headers with a line break are refused instead of being sent in the handshake, and
fetchno longer follows redirects (a redirect would re-send the credentials elsewhere). - A clear
UnsupportedErrorat start when the application was compiled with-Dprotobuf.omit_field_names=trueor-Dprotobuf.omit_enum_names=true, which would make every request wrong.
Documentation and tests:
- Every exported class and member has a doc comment (members marked
@internalsay so), the library has an overview, anddart docruns without warnings. - Runnable examples in
example/, README and migration guide snippets that are compiled by a test, and public API golden files for the three libraries (main, pipelines, lite). - Test suite (in the repository, not in the published package): unit tests, the spec tests
re-synced with JS SDK
main, seeded property tests, an emulator integration suite (also run over the web transport and against the Enterprise edition emulator), chaos tests behind a TCP proxy that cuts and stalls connections, Enterprise-only tests intest/integration_enterprise, browser tests in Chrome, interop tests with the JS SDK, and size budgets for a small web app with Firestore Lite and with the main library (tool/check_size.sh). Protos regenerated from current googleapis (tool/gen_protos.sh). - A production verification kit (
tool/verify_production): 15 named checks that run against the emulator and, only with your own credentials and an explicit--yes, against a real project. It was run against a real Standard edition database; its README lists the results.
Fixed #
- On the VM a SQLite cache in the default rollback-journal mode is switched to write-ahead logging when it is
opened (a journal mode the opener sets is kept). With several clients on one cache (isolates, processes), a
client could wait out the 10-second busy timeout without ever getting the file and fail with
database is locked, for example when several isolates opened a new cache at once. Firestore.instancebefore the default instance exists throws aStateErrorthat says to callFirestore.instanceFor(app: FirebaseApp.instance)(0.0.7 namedFirestore.getInstance).- Two clients with the same SQLite cache open (the isolate before a Flutter hot restart, a background isolate, a
second process) could give two listens the same target id or two writes the same batch id, and overwrite the
cache metadata with what each had read at its start; a transaction could also fail with "database is locked"
the moment the other client wrote. Transactions now take the write lock when they start and wait for it,
the state kept in memory is read again after a commit of another connection, and two clients that open an old
cache at the same time migrate it once. A client whose cache is moved to another schema version by a different
version of the SDK while it runs fails with
failedPreconditioninstead of working on a schema it does not know. The clients are still not coordinated (there is no multi-tab support). - Clients of one SQLite cache now elect a primary client with the lease of the JS SDK (valid for 5 s, refreshed every 4 s; a terminated client releases it at once, a dead one loses it when it expires). Only the primary uses the network, applies remote events and acknowledgements, collects garbage and backfills indexes. A client that opens a cache another live client holds takes the lease and logs a warning (as after a hot restart); the other client then reports offline, serves its listeners and gets from the cache and keeps its writes pending, until it becomes primary again (when the new client terminates or disables its network). (At first the primary sent the pending writes of the other client, whose futures then never completed; that is fixed, see "Changes made after the lists above were written".) A lone client is always primary.
clearPersistence()with another live client on the cache empties the cache in place instead of deleting the file under that client; the other client fails withfailedPreconditionat its next use and terminates.clearPersistence()deletes the-journal,-waland-shmfiles before the database file, tries all of them, and keeps the database file when one of them can't be deleted (a journal left next to a new database of the same name would be applied to it); the error names every file that failed. A persistent cache whose start fails after the database was opened closes it again instead of leaving the handle open.- A malformed primary lease or client row in a SQLite cache (a value of the wrong type) counts as no lease or no
client instead of making every new client fail to start; a missing or malformed epoch row is repaired by a new
client and makes running clients stop as after a clear. The warning about a lease or client row dated in the
future is logged once a minute instead of at every refresh. Clearing a cache in place (another client is alive)
overwrites the deleted rows with zeros (
PRAGMA secure_delete) and checkpoints the write-ahead log, and a client row from the future no longer counts as a live client there. - When the cache can't be opened, the operations that were queued while it was opening fail with the error of the
open, like the later ones, instead of
LateInitializationError: Field 'localStore'.openWithMemoryFallbackinexample/sqlite_database_web.dartwaits for a first operation to see that error, sinceFirestore.instanceForreturns before the cache is open. - Argument checks that were only
asserts, and so did nothing in release builds, now throw anArgumentErrorin every build: a collection path with an even number of segments (firestore.collection('coll/doc'),doc.collection('')), acacheSizeBytesbelow the minimum of 1 MB with persistence enabled, and aGeoPointoutside its range when it is written or used in a query (theGeoPointandTimestampconstructors areconstand keep their asserts; both values are checked when they enter the SDK). firestore.doc('')returned a reference to nothing instead of failing, andcollectionGroup('')was accepted. Both throw anArgumentError(as the JS SDK; also for a document path that is only a slash).- Two
AggregateQuerySnapshots made withaggregateWithAliases(oraggregate) were only equal when the aggregations were asked for in the same order. They are now equal when they aggregate the same query and hold the same results under the same names, asaggregateQuerySnapshotEqualof the JS SDK. - Cache after a lost write acknowledgement: a write that is sent again and changes nothing on the backend is
acknowledged with the unchanged update time of the document, and was then dropped from the cached document
(as in the other SDKs), so
get(Source.cache)returned the old value without a pending write until the document was read from the backend. It is now applied when the cached document is only the result of earlier acknowledgements. Emulator-verified only. - The local evaluation of filters follows the backend in three places where the JS and Android
SDKs do not:
whereIn,whereNotIn,arrayContainsandarrayContainsAnymatch numbers by value (1is1.0,0.0is-0.0);<,<=,>and>=do not ordernullandNaN(a < 1does not match aNaN,a >= NaNmatches no number);arrayUnionandarrayRemovecompare numbers by value. Before, a cached document that only the client matched stayed in limbo (the listener never leftisFromCache,get(Source.server)did not complete), and after an array transform the cached document differed from the stored one. Found by the seeded property tests (test/util/property.dart). - A cached document that the client matches for a query but the backend does not return no
longer stays in limbo when the backend confirms that it exists (the JS and Android SDKs keep
it there: the listener never leaves
isFromCacheandget(Source.server)does not complete). The view of that query drops the document once no pending write can explain the difference; it comes back when the backend returns it or when it is written locally. This covers the remaining known difference (null/NaNoperands ofwhereIn, the array filters,<=and>=on a Standard edition database) and any other disagreement. - A listener no longer keeps showing the local version of a document, with
hasPendingWrites, after its writes were acknowledged or rejected, when the backend deleted the document (or stopped returning it) before watch sent it again. The view waits for watch after such a change (as the JS and Android SDKs do, which have the same gap), and watch never sends a document that left the query: the document now goes through limbo resolution once watch took it out of the target, or once a snapshot of watch at or after the commit of the write does not have it (also when the acknowledgement left the data unchanged, and for a document that watch never had). Found by the chaos soak test (a write rejected withnot-foundon top of the result of an earlier, acknowledged write; a document created by one client and deleted by another before watch sent it); emulator-verified only. - A double and an integer beyond 2^53 are compared by their exact values (the order used to depend on the side of the operands).
- Fixes from the upstream sync (UTF-8 string ordering, limbo handling, limbo-resolution
document removal, transaction precondition, listener lifecycle and others); see
docs/upstream_sync/UPSTREAM_PLAN.md. - Every listen is sent to the backend with a fresh remote target id (as the JS SDK), so a late removal or error for an earlier listen of a query no longer rejects a newer listen of it.
- A document in limbo whose limbo resolution finds it deleted is now removed even when another query's target sent and removed the same document in the same snapshot window (the JS fix for firebase-js-sdk#8474; Android does not have it). Before, the stale document stayed in the view of the other query.
- A pending
set(..., merge)on a document that the cache knows as deleted no longer hides the other fields of the document when the backend creates it before the write is acknowledged. - Web transport: a listen or write stream that the client closes ends its WebChannel session right away instead of keeping it open for 10 seconds.
- The client no longer resets a call that the backend may be finishing (aggregate queries,
stopped or idle listen and write streams, transaction lookups): it closes its side and lets
the call end, and cancels it only if it is still open after 10 seconds. A reset that raced
the end of a call made
package:http2terminate the whole connection and fail every call in flight. For a transaction that meant a commit that the backend had applied looked failed and was retried (a counter incremented twice). - Transactions are no longer retried once the instance is terminated.
- The client no longer reconnects in a tight loop to a peer that accepts connections and then
drops them before a call could start (it closes them at once, also after the TLS handshake or
after the HTTP/2 preface, or it sends GOAWAY: a load balancer without a backend, a captive
portal, a TLS-terminating middlebox).
package:grpckept the waiting calls and connected again immediately, about 43 times per second, without failing a call, so the backoff of the streams never applied. The attempt that follows such a connection now fails, the calls fail withunavailable, and the streams retry with their exponential backoff as they do when a connection is refused (about 15 connections in 30 seconds instead of 1300). The web transport was checked and did not have the problem. - The SQLite persistence lock is per database instead of process-wide, so a long transaction in
one
Firestoreinstance no longer blocks the others. Firestore.instanceForno longer returns an instance whoseterminate()is still in progress. With a newFirebaseAppthat has the name of a deleted one it no longer returns the instance of the deleted app (which was about to be terminated, sinceFirebaseApp.delete()terminates the instances of the app in the background): it returns a new instance at once, which opens the same cache after the old instance has closed it.- The
x-goog-api-clientheader carries only the Dart version (gl-dart/3.12.2); it carried the wholePlatform.versionstring, with spaces, a date and a quoted platform name. FirestoreSettings.copyWith(cacheSettings: ...)on settings that setpersistenceEnabledorcacheSizeBytesthrows instead of dropping them.- Firestore Lite: a transaction no longer holds off
terminate()(awaitingterminate()inside a transaction used to hang). As in the JS SDK, once the instance is terminated the next read or the commit of a running transaction fails withfailedPrecondition, and the transaction is not retried. - Transactions (main library and Firestore Lite): a read after a write fails with the message of the JS and Android SDKs ("Firestore transactions require all reads to be executed before all writes.") and, as in the JS SDK, the transaction then fails to commit even if the update function caught the error.
FieldValue.arrayUnionandFieldValue.arrayRemoveare equal (==) when their elements are equal in the same order, asisEqualof the JS SDK.- LRU garbage collection of the SQLite cache read every orphaned document in one query, so its memory grew with the cache (several hundred MB for a million cached documents). It now works in batches as the Android SDK does. Collection queries no longer read the documents of subcollections out of the cache.
terminate()no longer hangs when the backend dropped the connection while a request was on its way out:package:http2waited for the socket to close, which never happened, and the open socket (and then the idle timer ofpackage:grpc) kept the isolate or process alive. As in the Android SDK, the connection gets one second to close and the socket is then destroyed.- A listen or unlisten made while the watch stream was opening was sent twice; the backend rejects a target that is already active and fails the whole stream, which then had to reconnect.
- A write stream that failed right after its handshake no longer crashes the client with "Writing mutations requires an opened stream": as in the Android SDK, the late report of a stream that already failed is dropped.
Changes made after the lists above were written #
Newest first. Several of these correct changes from the lists above before they were ever published. A change in behaviour is marked in bold.
- Persistent cache indexes: a limit query served by a field index could show a document that had left its window. The query engine looked beyond the window only when the document at its edge had a version (update time) after the index offset; a document delivered late by a target that lagged behind has an older version. It now also refills the window when the document at its edge changed in the cache after the offset. The JS and Android SDKs only test the version.
- Persistent cache indexes: the query engine could return documents that do not match the query, among the documents that changed after the offset of a field index, when none of them had a pending write.
- Persistent cache indexes: a query served by a field index could miss a document for good after one of the client's own writes. The acknowledged document is stored with the commit version as read time, and the index backfill moved past it; a document that watch delivered afterwards in a snapshot at or before that version was never indexed. While such an acknowledged document has not been sent by watch, the backfill now stops at the last snapshot version of watch. The JS and Android SDKs have the same gap.
- Web transport: a listener could stop getting snapshots for good (it stayed on its last snapshot from the cache, with pending writes) when the server no longer had messages of a listen stream it had never delivered. Seen with the emulator after a connection was stalled and cut while the stream had a large backlog: the server answered a request for the messages after the last one the client had from a later message on. One of the lost messages confirmed a target, and the client ignores every change of a target that is not confirmed. Such an answer now fails the stream, and the client opens a new one.
- Behaviour change:
Firestore.instanceFor()(andgetInstance) throws aStateErrorwhen it is given settings that differ from those of the instance that already exists for the app and database, as the JS and Android SDKs do. Before, the new settings were silently ignored. Call it without settings to get the existing instance, orterminate()that instance first. - A listener no longer gets an extra
modifiedevent, with pending writes and unchanged fields, when watch sends a document before the acknowledgement of a set with a server timestamp. A set overlay that comes from a real set is now applied as stored when the document arrives, as in the other SDKs; only one that stands for a merge or update of a document without a remote version is computed again. FirestoreSettings.experimentalLongPollingOptions(timeoutSeconds, 5 to 30) sets the long-polling timeout of the web transport, as in the JS SDK. The client reports online as soon as the watch stream connects rather than at its first message.- Persistent cache indexes: after a write was rejected by the backend, a query served by a field index could miss the document, or return it as the rejected write had left it (for example a document that the user deleted, and whose delete was rejected, stayed out of the result). The index entries of the documents of a rejected write are now written when it is rejected. The Android SDK has the same gap.
- Web transport: writes that were in flight when the write stream was closed by the client (
disableNetwork(), a credential change, an idle stream) could reach the backend later, after the same writes and newer ones had been sent on the next stream, and replace the newer values: the WebChannel session of the closed stream went on delivering what it had queued, sending a failed request again for up to its timeout. The session now ends when the stream is closed, as in the JS SDK: what was not sent is dropped (the client keeps unacknowledged writes and sends them again anyway), and a request in flight is not sent again. - A listener could lose a document for good after an existence filter mismatch. The client then resets the target and listens to it again, and its documents go through limbo resolution. When a resolution confirmed a document before the backend had sent the target again, the view concluded that the backend does not return the document for the query and dropped it; it did not come back, and the snapshot was reported as in sync. That conclusion is now only drawn once watch marked the target CURRENT on the current stream.
- Web: a page sends the pending writes that the page before it left in a persistent cache as soon as it starts,
and
waitForPendingWrites()waits for them. Since the change below (writes belong to the client that made them) they were held back for 60 s after a reload, andwaitForPendingWrites()returned without them. ADatabasewhose opener holds an exclusive lock while it is open now says so with the newExclusiveDatabaseinterface (the web openers of the example do, with their Web Lock): every other client of the cache is then known to be gone. If you copiedexample/sqlite_database_web.dartinto your app, copy it again. On the VM the 60 s remain. toString()of the public classes is one line now, in the format of the Android SDK where it has one:DocumentSnapshot{key=..., metadata=..., doc=...},SnapshotMetadata{hasPendingWrites=..., isFromCache=...},Blob { bytes=0102, subtype=0 },FirestoreSettings{host=..., ...}. AQuerySnapshotprints its query and the number of its documents, aQueryits filters and orderings.FirestoreErrorCode.cancelledandresourceExhaustedprint their own names (they printedcanceledandresourcesExhausted), and messages name the query operators as the JS SDK does (array-contains,array-contains-any,not-in).Timestamp.toString()is nowTimestamp(seconds=1, nanoseconds=2), as in the JS and Android SDKs. It used to print the two fields over four lines.- The canonical ids of queries, which the SQLite cache stores to find the cached results of a query again, are now
the ids of the JS SDK (
rooms|f:at<=time(60,3000)|ob:atasc,__name__asc). They were built from thetoString()of the values of a query, so they contained multi-line debug output and changed whenever such atoString()changed. An existing cache keeps its cached queries: the ids of its stored targets are computed again when it is opened (SQLite schema version 19). - Error messages no longer contain multi-line debug output.
FirestoreError.toString()is nowFirestoreError: [code=<code>]: <message>(the JS format; it used to end in the cause and the stack trace, ornull null), and messages that name a document print its path, for exampleFailed to get document 'rooms/eros' from cache(it printed'DocumentKey {\n path=rooms/eros,\n}'). - Two clients on one SQLite cache: the primary client now sends the pending writes of a client that is gone (it crashed or was killed, see below) at its next metadata refresh, every 4 s. It only looked for them when it wrote something itself, so with an idle primary they were never sent.
- Web transport: the double -0.0 read from production Firestore came back as 0.0. Production writes it as the
JSON number
-0, whichjsonDecodereads as the int 0; the responses of REST and WebChannel are now decoded keeping the sign, asJSON.parsedoes in the JS SDK. (The emulator writes-0.0, so its tests did not show it.) Empty bytes were not affected. - Two clients on one SQLite cache: the primary client no longer sends the pending writes of the other client. It
sent them, but the other client was never told the result, so its
set()andwaitForPendingWrites()futures never completed. Each write now records the client that made it (SQLite schema version 18), and the primary sends only its own writes, the writes of a client that is gone (it terminated, or did not refresh its metadata, which a live client does every 4 s, for 60 s: it crashed or its app was killed) and the writes stored before this version. The other client sends its writes, and its futures complete, once it is primary itself. A client that stalls for more than 60 s (a paused isolate, an app in the background) can still have a write sent by the primary without being told the result. - The switch of a SQLite cache to write-ahead logging is tried again a few times (within 1.5 s) when
another connection opening the same file at that moment makes it fail with
database is locked; if it still fails, that is logged at debug level instead of as a warning, and the next open switches the file. - Web transport (and Firestore Lite on the web): the calls in flight when the instance is terminated fail with
unavailable, as over gRPC. Their responses used to just end, so a transaction read failed with "Mismatch in docs returned from document lookup" and a commit withunimplemented("No responses received"). - Web transport: a WebChannel stream (Listen, Write) sends the headers of the JS SDK's
WebChannelConnection: the client,
Content-Type: text/plain, the app id, the credentials and the API key. It no longer sendsgoogle-cloud-resource-prefixorx-goog-request-params, which JS sends only with unary calls; the stream is routed by itsdatabaseURL parameter. - The app id of the app (
FirebaseOptions.applicationId) is sent with every request in thex-firebase-gmpidheader, as the Android SDK (x-firebase-gmpid) and the JS SDK (X-Firebase-GMPID) do. - Web transport: a REST call sends
x-goog-request-paramsas the JS SDK's RestConnection does,project_id=<project>(with&database_id=<database>for a named database), instead of the database name the gRPC transport sends. - Firestore Lite on the web sends the browser's cookies with its REST calls to a Cloud Workstations
host (
*.cloudworkstations.dev), as the JS SDK's FetchConnection does; other hosts get none. FieldPath.fromServerFormat(used for field paths from the backend, bundles and index configurations) rejects a path with an unterminated backtick, as the JS SDK does.- A bundle whose document or document metadata names something other than a document (a collection, the
documentsroot) or that holds a reference value that is not a document is now rejected as an invalid bundle (anArgumentError), as in the iOS SDK. Before, the root name loaded a document with an empty key and the other names failed an internal assertion. - The local view of a document is now right when its pending writes delete a nested field and later its
parent (for example
a.b.cset, thena.b.canda.bdeleted): the overlay kept for it handles the fields in order, as the JS and iOS SDKs do, and no longer drops the parentaleft as an empty map. - Argument validation errors are worded like the JS SDK's (the error types do not change).
Invalid document data names the method, the field and the document, for example "Function
WriteBatch.set() called with invalid data. Unsupported field value: a custom Foo object (found in
field a in document c/d)", with "(via
toFirestore())" when a converter produced the data; this applies to where() and cursor values and to field path arguments too. An empty path passed to collection() or doc() fails with "Function Firestore.collection() cannot be called with an empty path." instead of a segment count. The messages of the pipelines are unchanged. - A listen or write stream that the backend closes with UNAUTHENTICATED invalidates the token only if it has been open for less than 10 seconds, as in the Android and JS SDKs; a stream that was healthy keeps it. Before, every UNAUTHENTICATED of a stream invalidated the token (unary calls still do, as upstream).
- The API key of the app (
FirebaseOptions.apiKey) is sent with every request, as the JS SDK does: thex-goog-api-keyheader over gRPC and WebChannel, and thekeyquery parameter of a REST call (Firestore Lite on the web sends only the parameter). Requests used to carry no API key, so API key restrictions of the project did not apply to them. The Android SDK sends none. - gRPC transport: a server that ignores HTTP/2 flow control can no longer make the client buffer without limit. More data than the flow-control window allows, more than 1 MiB of held frames without data, or a frame larger than 16 KiB ends the connection (package:http2 does the same, but only once a frame is complete); the call fails as for any lost connection. A padded frame with more padding than payload is no longer counted as negative.
- A query, vector query or commit whose response can not be used (a document that does not decode, a second commit response) no longer resets its HTTP/2 stream: the call is left to end and cancelled only if the backend keeps it open. A reset that races the end of the call made package:http2 terminate the connection and fail every other call on it. The same for a Listen or Write call that was started for a stream stopped in the meantime.
- Errors of auth and App Check providers are logged and passed on with anything that looks like a token
(JWTs, bearer and
token=values, long opaque strings) replaced by<redacted>; the stack trace of a failed auth token request is logged at debug level only. - Web transport: a REST response or the answer to a WebChannel request is read up to 256 Mi characters
(
WebHttpResponse.maxBodyLength, the bound of one WebChannel chunk); a larger one fails the call with RESOURCE_EXHAUSTED and the request is aborted. An error body of the back channel is read up to 1 MiB. - Web transport: an HTTP 400 without a status in its body maps to FAILED_PRECONDITION as in the JS SDK (was INVALID_ARGUMENT).
- A write whose mutation can not be stored because the cache is busy for a moment (a
TransientDatabaseException) fails only its future withunavailable, as in the JS SDK. Before, the error was also raised as an uncaught error of the zone, which ends a command-line program.
Not done #
- Persistent cache indexes for queries with inequalities on several fields (they are scanned, as upstream), and indexes with a memory cache.
- Known gap of persistent cache indexes: a query served by a field index can miss a document that watch sends in a later snapshot with the same version as an earlier one, when the index was already brought up to date for that version, until the document changes again. We have not seen watch do this against the emulator or production. Queries that no index serves are not affected. The JS and Android SDKs have the same gap. See "Known limitations" in docs/parity.md.
- Coordinating running clients that share one persistent cache (the multi-tab support of the JS SDK). Two clients on one SQLite file keep it consistent and elect a primary client that alone uses the network (see Fixed), but they do not share listens or writes; in the browser the cache is refused to a second tab. Sharing them (stage 3 of the multi-client plan) is deferred until after 0.1.0.
- On the web: any browser other than Chrome.
- Pipelines beyond the preview: pipelines in a read-write
Transaction, evaluation against the local cache (an internal evaluator exists but is not wired into the client) and real-time pipelines. Search and window functions are only checked for their encoding. - A port of the Firebase Auth SDK. The app supplies tokens through
PlatformDependencies, for example with the providers offirebase_auth_providers_dart(email/password, anonymous and custom-token sign-in, service accounts); there are no federated or phone sign-in providers. - Any run against production Firestore beyond the verification kit: no Enterprise edition database, no Firebase Auth user sign-in, no long-running load.
Versions published as cloud_firestore_vm #
0.0.7 April 22, 2020 #
- make Firestore.newInstance register the new instance with the multi db component
- add warning in case of not initializing FirebaseAuth prior to calling Firestore.instance
0.0.6 April 21, 2020 #
- fix auth provider picker logic
- fix exporting Source
0.0.5 April 18, 2020 #
- fix null bool
0.0.4 April 18, 2020 #
- disable verbose logging
- make sql connection not exclusive so we don't break hot reload
0.0.3 April 18, 2020 #
- fix return when garbage collection kicks in
0.0.2 April 18, 2020 #
- update export statements
0.0.1 April 18, 2020 #
- initial release