Class DatastoreConnection (2.15.0)

This interface defines virtual methods for each of the user-facing overload sets in DatastoreClient. This allows users to inject custom behavior (e.g., with a Google Mock object) when writing tests that use objects of type DatastoreClient.

To create a concrete instance, see MakeDatastoreConnection().

For mocking, see datastore_v1_mocks::MockDatastoreConnection.

Functions

virtual options()

Returns
TypeDescription
Options

virtual Lookup(google::datastore::v1::LookupRequest const &)

Parameter
NameDescription
request google::datastore::v1::LookupRequest const &
Returns
TypeDescription
StatusOr< google::datastore::v1::LookupResponse >

virtual RunQuery(google::datastore::v1::RunQueryRequest const &)

Parameter
NameDescription
request google::datastore::v1::RunQueryRequest const &
Returns
TypeDescription
StatusOr< google::datastore::v1::RunQueryResponse >

virtual RunAggregationQuery(google::datastore::v1::RunAggregationQueryRequest const &)

Parameter
NameDescription
request google::datastore::v1::RunAggregationQueryRequest const &
Returns
TypeDescription
StatusOr< google::datastore::v1::RunAggregationQueryResponse >

virtual BeginTransaction(google::datastore::v1::BeginTransactionRequest const &)

Parameter
NameDescription
request google::datastore::v1::BeginTransactionRequest const &
Returns
TypeDescription
StatusOr< google::datastore::v1::BeginTransactionResponse >

virtual Commit(google::datastore::v1::CommitRequest const &)

Parameter
NameDescription
request google::datastore::v1::CommitRequest const &
Returns
TypeDescription
StatusOr< google::datastore::v1::CommitResponse >

virtual Rollback(google::datastore::v1::RollbackRequest const &)

Parameter
NameDescription
request google::datastore::v1::RollbackRequest const &
Returns
TypeDescription
StatusOr< google::datastore::v1::RollbackResponse >

virtual AllocateIds(google::datastore::v1::AllocateIdsRequest const &)

Parameter
NameDescription
request google::datastore::v1::AllocateIdsRequest const &
Returns
TypeDescription
StatusOr< google::datastore::v1::AllocateIdsResponse >

virtual ReserveIds(google::datastore::v1::ReserveIdsRequest const &)

Parameter
NameDescription
request google::datastore::v1::ReserveIdsRequest const &
Returns
TypeDescription
StatusOr< google::datastore::v1::ReserveIdsResponse >