public interface DatastoreReader
Modifier and Type | Method and Description |
---|---|
List<Entity> |
fetch(Key... keys)
Returns a list with a value for each given key (ordered by input).
|
Iterator<Entity> |
get(Key... keys)
|
Entity |
get(Key key)
|
<T> QueryResults<T> |
run(Query<T> query)
Submits a
Query and returns its result. |
default AggregationResults |
runAggregation(AggregationQuery query)
Submits a
AggregationQuery and returns AggregationResults . |
Entity get(Key key)
DatastoreException
- upon failureIterator<Entity> get(Key... keys)
Entity
for each given Key
that exists in the Datastore. The order of
the result is unspecified. Results are loaded lazily, so it is possible to get a DatastoreException
from the returned Iterator
's hasNext
or
next
methods.DatastoreException
- upon failureget(Key)
List<Entity> fetch(Key... keys)
null
values are
returned for nonexistent keys. When possible prefer using get(Key...)
to avoid eagerly
loading the results.<T> QueryResults<T> run(Query<T> query)
Query
and returns its result.DatastoreException
- upon failuredefault AggregationResults runAggregation(AggregationQuery query)
AggregationQuery
and returns AggregationResults
.DatastoreException
- upon failureCopyright © 2023 Google LLC. All rights reserved.