Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(gitignore): only ignore folders in the top level #1021

Merged
merged 18 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
**/*.log
**/node_modules
.coverage
coverage
.nyc_output
docs/
out/
build/
/.coverage
/coverage
/.nyc_output
/docs/
/out/
/build/
system-test/secrets.js
system-test/*key.json
*.lock
Expand Down
4 changes: 2 additions & 2 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2022 Google LLC',
copyright: 'Copyright 2023 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/datastore',
Expand Down
133 changes: 107 additions & 26 deletions protos/google/datastore/v1/datastore.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package google.datastore.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/routing.proto";
import "google/datastore/v1/aggregation_result.proto";
import "google/datastore/v1/entity.proto";
import "google/datastore/v1/query.proto";
Expand Down Expand Up @@ -51,6 +52,10 @@ service Datastore {
post: "/v1/projects/{project_id}:lookup"
body: "*"
};
option (google.api.routing) = {
routing_parameters { field: "project_id" }
routing_parameters { field: "database_id" }
};
option (google.api.method_signature) = "project_id,read_options,keys";
}

Expand All @@ -60,22 +65,36 @@ service Datastore {
post: "/v1/projects/{project_id}:runQuery"
body: "*"
};
option (google.api.routing) = {
routing_parameters { field: "project_id" }
routing_parameters { field: "database_id" }
};
}

// Runs an aggregation query.
rpc RunAggregationQuery(RunAggregationQueryRequest) returns (RunAggregationQueryResponse) {
rpc RunAggregationQuery(RunAggregationQueryRequest)
returns (RunAggregationQueryResponse) {
option (google.api.http) = {
post: "/v1/projects/{project_id}:runAggregationQuery"
body: "*"
};
option (google.api.routing) = {
routing_parameters { field: "project_id" }
routing_parameters { field: "database_id" }
};
}

// Begins a new transaction.
rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) {
rpc BeginTransaction(BeginTransactionRequest)
returns (BeginTransactionResponse) {
option (google.api.http) = {
post: "/v1/projects/{project_id}:beginTransaction"
body: "*"
};
option (google.api.routing) = {
routing_parameters { field: "project_id" }
routing_parameters { field: "database_id" }
};
option (google.api.method_signature) = "project_id";
}

Expand All @@ -86,7 +105,12 @@ service Datastore {
post: "/v1/projects/{project_id}:commit"
body: "*"
};
option (google.api.method_signature) = "project_id,mode,transaction,mutations";
option (google.api.routing) = {
routing_parameters { field: "project_id" }
routing_parameters { field: "database_id" }
};
option (google.api.method_signature) =
"project_id,mode,transaction,mutations";
option (google.api.method_signature) = "project_id,mode,mutations";
}

Expand All @@ -96,6 +120,10 @@ service Datastore {
post: "/v1/projects/{project_id}:rollback"
body: "*"
};
option (google.api.routing) = {
routing_parameters { field: "project_id" }
routing_parameters { field: "database_id" }
};
option (google.api.method_signature) = "project_id,transaction";
}

Expand All @@ -106,6 +134,10 @@ service Datastore {
post: "/v1/projects/{project_id}:allocateIds"
body: "*"
};
option (google.api.routing) = {
routing_parameters { field: "project_id" }
routing_parameters { field: "database_id" }
};
option (google.api.method_signature) = "project_id,keys";
}

Expand All @@ -116,6 +148,10 @@ service Datastore {
post: "/v1/projects/{project_id}:reserveIds"
body: "*"
};
option (google.api.routing) = {
routing_parameters { field: "project_id" }
routing_parameters { field: "database_id" }
};
option (google.api.method_signature) = "project_id,keys";
}
}
Expand Down Expand Up @@ -155,6 +191,13 @@ message LookupResponse {
// order of the keys in the input.
repeated Key deferred = 3;

// The identifier of the transaction that was started as part of this Lookup
// request.
//
// Set only when [ReadOptions.begin_transaction][] was set in
// [LookupRequest.read_options][google.datastore.v1.LookupRequest.read_options].
bytes transaction = 5;

// The time at which these entities were read or found missing.
google.protobuf.Timestamp read_time = 7;
}
Expand Down Expand Up @@ -189,16 +232,25 @@ message RunQueryRequest {
}
}

// The response for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
// The response for
// [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
message RunQueryResponse {
// A batch of query results (always present).
QueryResultBatch batch = 1;

// The parsed form of the `GqlQuery` from the request, if it was set.
Query query = 2;

// The identifier of the transaction that was started as part of this
// RunQuery request.
//
// Set only when [ReadOptions.begin_transaction][] was set in
// [RunQueryRequest.read_options][google.datastore.v1.RunQueryRequest.read_options].
bytes transaction = 5;
}

// The request for [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
// The request for
// [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
message RunAggregationQueryRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
Expand Down Expand Up @@ -228,16 +280,25 @@ message RunAggregationQueryRequest {
}
}

// The response for [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
// The response for
// [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
message RunAggregationQueryResponse {
// A batch of aggregation results. Always present.
AggregationResultBatch batch = 1;

// The parsed form of the `GqlQuery` from the request, if it was set.
AggregationQuery query = 2;

// The identifier of the transaction that was started as part of this
// RunAggregationQuery request.
//
// Set only when [ReadOptions.begin_transaction][] was set in
// [RunAggregationQueryRequest.read_options][google.datastore.v1.RunAggregationQueryRequest.read_options].
bytes transaction = 5;
}

// The request for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
// The request for
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
message BeginTransactionRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
Expand All @@ -252,7 +313,8 @@ message BeginTransactionRequest {
TransactionOptions transaction_options = 10;
}

// The response for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
// The response for
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
message BeginTransactionResponse {
// The transaction identifier (always present).
bytes transaction = 1;
Expand All @@ -274,11 +336,10 @@ message RollbackRequest {
bytes transaction = 1 [(google.api.field_behavior) = REQUIRED];
}

// The response for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback].
// (an empty message).
message RollbackResponse {

}
// The response for
// [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. (an empty
// message).
message RollbackResponse {}

// The request for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
message CommitRequest {
Expand Down Expand Up @@ -314,6 +375,13 @@ message CommitRequest {
// transaction identifier is returned by a call to
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
bytes transaction = 1;

// Options for beginning a new transaction for this request.
// The transaction is committed when the request completes. If specified,
// [TransactionOptions.mode][google.datastore.v1.TransactionOptions.mode]
// must be
// [TransactionOptions.ReadWrite][google.datastore.v1.TransactionOptions.ReadWrite].
TransactionOptions single_use_transaction = 10;
}

// The mutations to perform.
Expand Down Expand Up @@ -346,7 +414,8 @@ message CommitResponse {
google.protobuf.Timestamp commit_time = 8;
}

// The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
// The request for
// [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
message AllocateIdsRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
Expand All @@ -357,19 +426,21 @@ message AllocateIdsRequest {
// 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.
// 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];
}

// The response for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
// The response for
// [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
message AllocateIdsResponse {
// The keys specified in the request (in the same order), each with
// its key path completed with a newly allocated ID.
repeated Key keys = 1;
}

// The request for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
// The request for
// [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
message ReserveIdsRequest {
// Required. The ID of the project against which to make the request.
string project_id = 8 [(google.api.field_behavior) = REQUIRED];
Expand All @@ -380,15 +451,14 @@ message ReserveIdsRequest {
// database.
string database_id = 9;

// Required. A list of keys with complete key paths whose numeric IDs should not be
// auto-allocated.
// Required. A list of keys with complete key paths whose numeric IDs should
// not be auto-allocated.
repeated Key keys = 1 [(google.api.field_behavior) = REQUIRED];
}

// The response for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
message ReserveIdsResponse {

}
// The response for
// [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
message ReserveIdsResponse {}

// A mutation to apply to an entity.
message Mutation {
Expand Down Expand Up @@ -491,6 +561,15 @@ message ReadOptions {
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
bytes transaction = 2;

// Options for beginning a new transaction for this request.
//
// The new transaction identifier will be returned in the corresponding
// response as either
// [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
// or
// [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
TransactionOptions new_transaction = 3;

// Reads entities as they were at the given time. This may not be older
// than 270 seconds. This value is only supported for Cloud Firestore in
// Datastore mode.
Expand All @@ -501,8 +580,10 @@ message ReadOptions {
// Options for beginning a new transaction.
//
// Transactions can be created explicitly with calls to
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction] or implicitly by setting
// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] in read requests.
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]
// or implicitly by setting
// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction]
// in read requests.
message TransactionOptions {
// Options specific to read / write transactions.
message ReadWrite {
Expand Down
Loading