ClearableDatabase class abstract interface

A Database that deletes its own storage for Firestore.clearPersistence.

By default clearPersistence deletes the file at Database.path and SQLite's side files next to it, which is all a database in a file system needs. Implement this interface when the database is kept somewhere else, for example in IndexedDB in a browser: clearPersistence then calls clearStorage instead and deletes no file.

Implemented types

Properties

hashCode → int
The hash code for this object.
no setterinherited
path → String
The path (or, where there is no file system, the name) this database was opened with.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearStorage() → Future<void>
Deletes everything this database stored. Called after close, at most once; the database is not used afterwards. An error fails clearPersistence with FirestoreErrorCode.unknown.
close() → void
Closes the connection. Firestore calls it when the instance terminates.
inherited
delete(String statement, [List<Object?>? arguments]) → Future<int>
DELETE query Returns the number of changes made
inherited
execute(String statement, [List<Object?>? arguments]) → Future<void>
Runs SQLite statement without return values
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String statement, [List<Object?>? arguments]) → Future<List<Map<String, dynamic>>>
SELECT query
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited