feat: Add "or" query support (only in the preview API surface)

docs: Clarify wording around default database_id usage

PiperOrigin-RevId: 462444231
pull/728/head
Google APIs 3 years ago committed by Copybara-Service
parent 0d62617327
commit b9cbfce171
  1. 4
      google/datastore/v1/BUILD.bazel
  2. 43
      google/datastore/v1/datastore.proto
  3. 9
      google/datastore/v1/datastore_grpc_service_config.json
  4. 1
      google/datastore/v1/datastore_v1.yaml
  5. 4
      google/datastore/v1/entity.proto
  6. 6
      google/datastore/v1/query.proto

@ -124,6 +124,10 @@ go_gapic_library(
transport = "grpc+rest",
deps = [
":datastore_go_proto",
"//google/longrunning:longrunning_go_gapic",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go//longrunning:go_default_library",
"@com_google_cloud_go//longrunning/autogen:go_default_library",
],
)

@ -116,6 +116,12 @@ message LookupRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string '' to refer the default
// database.
string database_id = 9;
// The options for this lookup request.
ReadOptions read_options = 1;
@ -149,6 +155,12 @@ message RunQueryRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string '' to refer the default
// database.
string database_id = 9;
// Entities are partitioned into subsets, identified by a partition ID.
// Queries are scoped to a single partition.
// This partition ID is normalized with the standard default context
@ -163,7 +175,7 @@ message RunQueryRequest {
// The query to run.
Query query = 3;
// The GQL query to run.
// The GQL query to run. This query must be a non-aggregation query.
GqlQuery gql_query = 7;
}
}
@ -182,6 +194,12 @@ message BeginTransactionRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string '' to refer the default
// database.
string database_id = 9;
// Options for a new transaction.
TransactionOptions transaction_options = 10;
}
@ -197,6 +215,12 @@ message RollbackRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string '' to refer the default
// database.
string database_id = 9;
// Required. The transaction identifier, returned by a call to
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
bytes transaction = 1 [(google.api.field_behavior) = REQUIRED];
@ -227,6 +251,12 @@ message CommitRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string '' to refer the default
// database.
string database_id = 9;
// The type of commit to perform. Defaults to `TRANSACTIONAL`.
Mode mode = 5;
@ -273,6 +303,12 @@ message AllocateIdsRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string '' to refer the default
// database.
string database_id = 9;
// Required. A list of keys with incomplete key paths for which to allocate IDs.
// No key may be reserved/read-only.
repeated Key keys = 1 [(google.api.field_behavior) = REQUIRED];
@ -290,7 +326,10 @@ message ReserveIdsRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
// If not empty, the ID of the database against which to make the request.
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string '' to refer the default
// database.
string database_id = 9;
// Required. A list of keys with complete key paths whose numeric IDs should not be

@ -10,6 +10,10 @@
"service": "google.datastore.v1.Datastore",
"method": "RunQuery"
},
{
"service": "google.datastore.v1.Datastore",
"method": "RunAggregationQuery"
},
{
"service": "google.datastore.v1.Datastore",
"method": "ReserveIds"
@ -20,10 +24,7 @@
"initialBackoff": "0.100s",
"maxBackoff": "60s",
"backoffMultiplier": 1.3,
"retryableStatusCodes": [
"UNAVAILABLE",
"DEADLINE_EXCEEDED"
]
"retryableStatusCodes": ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
}
},
{

@ -5,6 +5,7 @@ title: Cloud Datastore API
apis:
- name: google.datastore.v1.Datastore
- name: google.longrunning.Operations
documentation:
summary: |-

@ -51,6 +51,10 @@ message PartitionId {
// The ID of the project to which the entities belong.
string project_id = 2;
// If not empty, the ID of the database to which the entities
// belong.
string database_id = 3;
// If not empty, the ID of the namespace to which the entities belong.
string namespace_id = 4;
}

@ -16,6 +16,7 @@ syntax = "proto3";
package google.datastore.v1;
import "google/api/field_behavior.proto";
import "google/datastore/v1/entity.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
@ -184,7 +185,10 @@ message CompositeFilter {
Operator op = 1;
// The list of filters to combine.
// Must contain at least one filter.
//
// Requires:
//
// * At least one filter is present.
repeated Filter filters = 2;
}

Loading…
Cancel
Save