Interface for WorkDB database operations.
This interface defines all CRUD operations available for the database. Implementations should provide platform-specific storage backends.
Example
class MyWorkDb implements IWorkDb {
// implement all methods
}
- Implementers
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearDatabase(
) → Future< void> - Clears all data from the database.
-
create(
ItemWithId input) → Future< void> - Creates a new item in the database.
-
createMultiple(
List< ItemWithId> inputs) → Future<void> - Creates multiple items in the database.
-
createOrUpdate(
ItemWithId input) → Future< void> - Creates an item if it doesn't exist, or updates it if it does.
-
createOrUpdateMultiple(
List< ItemWithId> inputs) → Future<void> - Creates or updates multiple items in the database.
-
delete(
ItemId input) → Future< void> - Deletes an item from the database.
-
deleteCollection(
String collection) → Future< void> - Deletes an entire collection from the database.
-
getCollections(
) → Future< List< String> > - Returns a list of all collection names in the database.
-
getItemsInCollection(
String collection) → Future< List< String> > - Returns a list of all item IDs in a collection.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
retrieve(
ItemId input) → Future< ItemOutput?> - Retrieves an item from the database.
-
retrieveMultiple(
List< ItemId> ids) → Future<List< ItemOutput?> > - Retrieves multiple items from the database.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
ItemWithId input) → Future< void> - Updates an existing item in the database.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited