Package com.google.cloud.datastore
Interface DatastoreReader
- All Known Subinterfaces:
Datastore,DatastoreReaderWriter,Transaction
@InternalExtensionOnly
public interface DatastoreReader
An interface to represent Google Cloud Datastore read operations.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a list with a value for each given key (ordered by input).<T> QueryResults<T>Submits aQueryand returns its result.runAggregation(AggregationQuery query) Submits aAggregationQueryand returnsAggregationResults.runAggregation(AggregationQuery query, ExplainOptions explainOptions)
-
Method Details
-
get
- Throws:
DatastoreException- upon failure
-
get
Returns anEntityfor each givenKeythat exists in the Datastore. The order of the result is unspecified. Results are loaded lazily, so it is possible to get aDatastoreExceptionfrom the returnedIterator'shasNextornextmethods.- Throws:
DatastoreException- upon failure- See Also:
-
fetch
Returns a list with a value for each given key (ordered by input).nullvalues are returned for nonexistent keys. When possible prefer usingget(Key...)to avoid eagerly loading the results. -
run
Submits aQueryand returns its result.- Throws:
DatastoreException- upon failure
-
runAggregation
Submits aAggregationQueryand returnsAggregationResults.- Throws:
DatastoreException- upon failure
-
runAggregation
- Throws:
DatastoreException- upon failure
-