Datastore class abstract

Interface used to talk to the Google Cloud Datastore service.

It can be used to insert/update/delete Entitys, lookup/query Entitys and allocate IDs from the auto ID allocation policy.

Constructors

Datastore(Client client, String project)
Access Datastore using an authenticated client.
factory
Datastore.withRetry(Datastore delegate, {int? maxAttempts})
Retry Datastore operations where the issue seems to be transient.
factory

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

allocateIds(List<Key> keys) Future<List<Key>>
Allocate integer IDs for the partially populated keys given as argument.
beginTransaction({bool crossEntityGroup = false}) Future<Transaction>
Starts a new transaction and returns an opaque value representing it.
commit({List<Entity> inserts, List<Entity> autoIdInserts, List<Key> deletes, Transaction transaction}) Future<CommitResult>
Make modifications to the datastore.
lookup(List<Key> keys, {Transaction transaction}) Future<List<Entity?>>
Looks up the fully populated keys in the datastore and returns either the Entity corresponding to the Key or null. The order in the returned Entitys is the same as in keys.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(Query query, {Partition partition, Transaction transaction}) Future<Page<Entity>>
Runs a query on the dataset and returns a Page of matching Entitys.
rollback(Transaction transaction) Future
Roll a started transaction back.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

Scopes → const List<String>
List of required OAuth2 scopes for Datastore operation.