DatastoreDB class

Constructors

DatastoreDB(Datastore datastore, {ModelDB? modelDB, Partition? defaultPartition})

Properties

datastore → Datastore
final
defaultPartition → Partition
Gets the default Partition.
no setter
emptyKey → Key
Gets the empty key using the default Partition.
no setter
hashCode → int
The hash code for this object.
no setterinherited
modelDB → ModelDB
The ModelDB used to serialize/deserialize objects.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

commit({List<Model>? inserts, List<Key>? deletes}) → Future
Add inserts to the datastore and remove deletes from it.
lookup<T extends Model>(List<Key> keys) → Future<List<T?>>
Looks up keys in the datastore and returns a list of Model objects.
lookupOrNull<T extends Model>(Key key) → Future<T?>
Looks up a single key in the datastore, and returns the associated Model object.
lookupValue<T extends Model>(Key key, {T orElse()?}) → Future<T>
Looks up a single key in the datastore, and returns the associated Model object.
newPartition(String namespace) → Partition
Creates a new Partition with namespace namespace.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query<T extends Model>({Partition? partition, Key? ancestorKey}) → Query<T>
Build a query for kind models.
toString() → String
A string representation of this object.
inherited
withTransaction<T>(TransactionHandler<T> transactionHandler) → Future<T>
Begins a new a new transaction.

Operators

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