DataStore class abstract
Abstract class for the storage system.
- Implementers
Constructors
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
-
clear(
{bool rebuildDb = false}) → Future< void> - Remove everything from storage.
-
close(
) → Future< void> - Close the storage system.
-
get(
String key, QueryParams queryParams) → Future< DatabaseData?> - Get data from storage.
-
getAndUpdate(
String key, QueryParams queryParams, DateTime lastUsedAt) → Future< DatabaseData?> - Get and udpate data in storage
-
insert(
DatabaseData data) → Future< void> - Insert data to storage.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
) → Future< void> - Open the storage system.
-
remove(
String key, QueryParams queryParams, {bool rebuildDb = false}) → Future< void> - Remove data from storage.
-
removeByKey(
String key, {bool rebuildDb = false}) → Future< void> -
Remove data from storage by
key
. -
removeOversized(
int maxCacheSize) → Future< List< DatabaseData> > -
Remove data from storage until the storage file size is less than
maxCacheSize
. -
removeStale(
DateTime staleDateTime) → Future< List< DatabaseData> > -
Remove data from storage where its last used datetime is before
staleDateTime
. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
DatabaseData data) → Future< void> - Update data to storage.
-
upsert(
DatabaseData data) → Future< void> - Insert or update data in storage.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited