diff --git a/google/datastore/README.md b/google/datastore/README.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/google/datastore/README.md @@ -0,0 +1 @@ + diff --git a/google/datastore/v1/datastore.proto b/google/datastore/v1/datastore.proto index 11acab6b..e0a9f42b 100644 --- a/google/datastore/v1/datastore.proto +++ b/google/datastore/v1/datastore.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -135,6 +135,9 @@ message RunQueryResponse { message BeginTransactionRequest { // The ID of the project against which to make the request. string project_id = 8; + + // Options for a new transaction. + TransactionOptions transaction_options = 10; } // The response for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]. @@ -316,3 +319,27 @@ message ReadOptions { bytes transaction = 2; } } + +// Options for beginning a new transaction. +message TransactionOptions { + // Options specific to read / write transactions. + message ReadWrite { + // The transaction identifier of the transaction being retried. + bytes previous_transaction = 1; + } + + // Options specific to read-only transactions. + message ReadOnly { + + } + + // The `mode` of the transaction, indicating whether write operations are + // supported. + oneof mode { + // The transaction should allow both reads and writes. + ReadWrite read_write = 1; + + // The transaction should only allow reads. + ReadOnly read_only = 2; + } +} diff --git a/google/datastore/v1/entity.proto b/google/datastore/v1/entity.proto index 6df3ef2a..de38b076 100644 --- a/google/datastore/v1/entity.proto +++ b/google/datastore/v1/entity.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/datastore/v1/query.proto b/google/datastore/v1/query.proto index 483e1256..f74a9946 100644 --- a/google/datastore/v1/query.proto +++ b/google/datastore/v1/query.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -273,7 +273,7 @@ message QueryResultBatch { // cursor. MORE_RESULTS_AFTER_CURSOR = 4; - // The query has been exhausted. + // The query is finished, and there are no more results. NO_MORE_RESULTS = 3; } diff --git a/google/datastore/v1beta3/datastore.proto b/google/datastore/v1beta3/datastore.proto index 577d96de..a84fd355 100644 --- a/google/datastore/v1beta3/datastore.proto +++ b/google/datastore/v1beta3/datastore.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -135,6 +135,9 @@ message RunQueryResponse { message BeginTransactionRequest { // The ID of the project against which to make the request. string project_id = 8; + + // Options for a new transaction. + TransactionOptions transaction_options = 10; } // The response for [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction]. @@ -316,3 +319,27 @@ message ReadOptions { bytes transaction = 2; } } + +// Options for beginning a new transaction. +message TransactionOptions { + // Options specific to read / write transactions. + message ReadWrite { + // The transaction identifier of the transaction being retried. + bytes previous_transaction = 1; + } + + // Options specific to read-only transactions. + message ReadOnly { + + } + + // The `mode` of the transaction, indicating whether write operations are + // supported. + oneof mode { + // The transaction should allow both reads and writes. + ReadWrite read_write = 1; + + // The transaction should only allow reads. + ReadOnly read_only = 2; + } +} diff --git a/google/datastore/v1beta3/entity.proto b/google/datastore/v1beta3/entity.proto index 4182ca43..81e5e4dd 100644 --- a/google/datastore/v1beta3/entity.proto +++ b/google/datastore/v1beta3/entity.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/datastore/v1beta3/query.proto b/google/datastore/v1beta3/query.proto index 61af6ad2..03f7986f 100644 --- a/google/datastore/v1beta3/query.proto +++ b/google/datastore/v1beta3/query.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -273,7 +273,7 @@ message QueryResultBatch { // cursor. MORE_RESULTS_AFTER_CURSOR = 4; - // The query has been exhausted. + // The query is finished, and there are no more results. NO_MORE_RESULTS = 3; }