DatastoreShell class

Provides a useful interface over the package:googleapis DatastoreApi object.


DatastoreShell(DatastoreApi api, String project)
Constructs the shell using the given api object and project identifier.


api DatastoreApi
The underlying API object.
hashCode int
The hash code for this object. [...]
read-only, inherited
isTransactional bool
nonTransactionalShell DatastoreShell
The non-transactional shell instance.
project String
The project identifier.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
transactionId String
The transaction id this instance uses for all operations.


beginMutation() MutationBatch
Starts a mutation batch.
beginTransaction() Future<DatastoreShell>
Returns a DatastoreShell instance that runs every operation in the newly created transaction. [...]
getAll(Iterable<Key> keys, {ReadConsistency readConsistency}) Future<Map<Key, Entity>>
Retrieves multiple entities by their keys. The resulting map contains all existing entities, but no entries for the non-existing ones.
getRaw(Iterable<Key> keys, {ReadConsistency readConsistency}) Future<LookupResponse>
Starts a lookup for a list of keys and returns with the raw API response.
getRawKeys(Iterable<Key> rawKeys, {ReadConsistency readConsistency}) Future<LookupResponse>
getSingle(Key key, {ReadConsistency readConsistency}) Future<Entity>
Retrieves a single entity by key. Throws (asynchronously) EntityNotFoundError if the entity does not exist.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
prepareQuery(Query query) PreparedQuery
Prepares a query. Currently it's not much more than a simple wrapper, later it may emulate running multiple queries at once and merging their responses. [...]
rollback() Future<Null>
runTransaction<T>(Future<T> transactionBody(DatastoreShell transactionShell), {int retryCount = 16, Duration firstRetryDuration = const Duration(milliseconds: 10), bool delayOnConflict = false, bool backDownOnConflict = false, Duration stepDownRetryDuration(Duration previousDuration) = defaultExponentialStepDown, void errorCallback(WrappedServerError error)}) Future<T>
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]

Static Methods

defaultExponentialStepDown(Duration previousDuration) Duration
wrapAndThrow(DetailedApiRequestError error) → void