@google-cloud/datastore-api 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +111 -0
  2. package/build/protos/google/datastore/admin/v1/datastore_admin.proto +506 -0
  3. package/build/protos/google/datastore/admin/v1/index.proto +122 -0
  4. package/build/protos/google/datastore/admin/v1/migration.proto +124 -0
  5. package/build/protos/google/datastore/v1/aggregation_result.proto +62 -0
  6. package/build/protos/google/datastore/v1/datastore.proto +851 -0
  7. package/build/protos/google/datastore/v1/entity.proto +217 -0
  8. package/build/protos/google/datastore/v1/query.proto +622 -0
  9. package/build/protos/google/datastore/v1/query_profile.proto +91 -0
  10. package/build/protos/protos.d.ts +18507 -0
  11. package/build/protos/protos.js +1 -0
  12. package/build/protos/protos.json +1 -0
  13. package/build/src/index.d.ts +14 -0
  14. package/build/src/index.js +30 -0
  15. package/build/src/index.js.map +1 -0
  16. package/build/src/v1/datastore_admin_client.d.ts +631 -0
  17. package/build/src/v1/datastore_admin_client.js +954 -0
  18. package/build/src/v1/datastore_admin_client.js.map +1 -0
  19. package/build/src/v1/datastore_admin_client_config.json +56 -0
  20. package/build/src/v1/datastore_admin_proto_list.json +5 -0
  21. package/build/src/v1/datastore_client.d.ts +451 -0
  22. package/build/src/v1/datastore_client.js +806 -0
  23. package/build/src/v1/datastore_client.js.map +1 -0
  24. package/build/src/v1/datastore_client_config.json +66 -0
  25. package/build/src/v1/datastore_proto_list.json +7 -0
  26. package/build/src/v1/gapic_metadata.json +87 -0
  27. package/build/src/v1/index.d.ts +2 -0
  28. package/build/src/v1/index.js +25 -0
  29. package/build/src/v1/index.js.map +1 -0
  30. package/package.json +65 -0
@@ -0,0 +1,622 @@
1
+ // Copyright 2026 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.datastore.v1;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/datastore/v1/entity.proto";
21
+ import "google/protobuf/timestamp.proto";
22
+ import "google/protobuf/wrappers.proto";
23
+
24
+ option csharp_namespace = "Google.Cloud.Datastore.V1";
25
+ option go_package = "cloud.google.com/go/datastore/apiv1/datastorepb;datastorepb";
26
+ option java_multiple_files = true;
27
+ option java_outer_classname = "QueryProto";
28
+ option java_package = "com.google.datastore.v1";
29
+ option php_namespace = "Google\\Cloud\\Datastore\\V1";
30
+ option ruby_package = "Google::Cloud::Datastore::V1";
31
+
32
+ // The result of fetching an entity from Datastore.
33
+ message EntityResult {
34
+ // Specifies what data the 'entity' field contains.
35
+ // A `ResultType` is either implied (for example, in `LookupResponse.missing`
36
+ // from `datastore.proto`, it is always `KEY_ONLY`) or specified by context
37
+ // (for example, in message `QueryResultBatch`, field `entity_result_type`
38
+ // specifies a `ResultType` for all the values in field `entity_results`).
39
+ enum ResultType {
40
+ // Unspecified. This value is never used.
41
+ RESULT_TYPE_UNSPECIFIED = 0;
42
+
43
+ // The key and properties.
44
+ FULL = 1;
45
+
46
+ // A projected subset of properties. The entity may have no key.
47
+ PROJECTION = 2;
48
+
49
+ // Only the key.
50
+ KEY_ONLY = 3;
51
+ }
52
+
53
+ // The resulting entity.
54
+ Entity entity = 1;
55
+
56
+ // The version of the entity, a strictly positive number that monotonically
57
+ // increases with changes to the entity.
58
+ //
59
+ // This field is set for
60
+ // [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
61
+ //
62
+ // For [missing][google.datastore.v1.LookupResponse.missing] entities in
63
+ // `LookupResponse`, this is the version of the snapshot that was used to look
64
+ // up the entity, and it is always set except for eventually consistent reads.
65
+ int64 version = 4;
66
+
67
+ // The time at which the entity was created.
68
+ // This field is set for
69
+ // [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
70
+ // If this entity is missing, this field will not be set.
71
+ google.protobuf.Timestamp create_time = 6;
72
+
73
+ // The time at which the entity was last changed.
74
+ // This field is set for
75
+ // [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
76
+ // If this entity is missing, this field will not be set.
77
+ google.protobuf.Timestamp update_time = 5;
78
+
79
+ // A cursor that points to the position after the result entity.
80
+ // Set only when the `EntityResult` is part of a `QueryResultBatch` message.
81
+ bytes cursor = 3;
82
+ }
83
+
84
+ // A query for entities.
85
+ //
86
+ // The query stages are executed in the following order:
87
+ // 1. kind
88
+ // 2. filter
89
+ // 3. projection
90
+ // 4. order + start_cursor + end_cursor
91
+ // 5. offset
92
+ // 6. limit
93
+ // 7. find_nearest
94
+ message Query {
95
+ // The projection to return. Defaults to returning all properties.
96
+ repeated Projection projection = 2;
97
+
98
+ // The kinds to query (if empty, returns entities of all kinds).
99
+ // Currently at most 1 kind may be specified.
100
+ repeated KindExpression kind = 3;
101
+
102
+ // The filter to apply.
103
+ Filter filter = 4;
104
+
105
+ // The order to apply to the query results (if empty, order is unspecified).
106
+ repeated PropertyOrder order = 5;
107
+
108
+ // The properties to make distinct. The query results will contain the first
109
+ // result for each distinct combination of values for the given properties
110
+ // (if empty, all results are returned).
111
+ //
112
+ // Requires:
113
+ //
114
+ // * If `order` is specified, the set of distinct on properties must appear
115
+ // before the non-distinct on properties in `order`.
116
+ repeated PropertyReference distinct_on = 6;
117
+
118
+ // A starting point for the query results. Query cursors are
119
+ // returned in query result batches and
120
+ // [can only be used to continue the same
121
+ // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
122
+ bytes start_cursor = 7;
123
+
124
+ // An ending point for the query results. Query cursors are
125
+ // returned in query result batches and
126
+ // [can only be used to limit the same
127
+ // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
128
+ bytes end_cursor = 8;
129
+
130
+ // The number of results to skip. Applies before limit, but after all other
131
+ // constraints. Optional. Must be >= 0 if specified.
132
+ int32 offset = 10;
133
+
134
+ // The maximum number of results to return. Applies after all other
135
+ // constraints. Optional.
136
+ // Unspecified is interpreted as no limit.
137
+ // Must be >= 0 if specified.
138
+ google.protobuf.Int32Value limit = 12;
139
+
140
+ // Optional. A potential Nearest Neighbors Search.
141
+ //
142
+ // Applies after all other filters and ordering.
143
+ //
144
+ // Finds the closest vector embeddings to the given query vector.
145
+ FindNearest find_nearest = 13 [(google.api.field_behavior) = OPTIONAL];
146
+ }
147
+
148
+ // Datastore query for running an aggregation over a
149
+ // [Query][google.datastore.v1.Query].
150
+ message AggregationQuery {
151
+ // Defines an aggregation that produces a single result.
152
+ message Aggregation {
153
+ // Count of entities that match the query.
154
+ //
155
+ // The `COUNT(*)` aggregation function operates on the entire entity
156
+ // so it does not require a field reference.
157
+ message Count {
158
+ // Optional. Optional constraint on the maximum number of entities to
159
+ // count.
160
+ //
161
+ // This provides a way to set an upper bound on the number of entities
162
+ // to scan, limiting latency, and cost.
163
+ //
164
+ // Unspecified is interpreted as no bound.
165
+ //
166
+ // If a zero value is provided, a count result of zero should always be
167
+ // expected.
168
+ //
169
+ // High-Level Example:
170
+ //
171
+ // ```
172
+ // AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k );
173
+ // ```
174
+ //
175
+ // Requires:
176
+ //
177
+ // * Must be non-negative when present.
178
+ google.protobuf.Int64Value up_to = 1
179
+ [(google.api.field_behavior) = OPTIONAL];
180
+ }
181
+
182
+ // Sum of the values of the requested property.
183
+ //
184
+ // * Only numeric values will be aggregated. All non-numeric values
185
+ // including `NULL` are skipped.
186
+ //
187
+ // * If the aggregated values contain `NaN`, returns `NaN`. Infinity math
188
+ // follows IEEE-754 standards.
189
+ //
190
+ // * If the aggregated value set is empty, returns 0.
191
+ //
192
+ // * Returns a 64-bit integer if all aggregated numbers are integers and the
193
+ // sum result does not overflow. Otherwise, the result is returned as a
194
+ // double. Note that even if all the aggregated values are integers, the
195
+ // result is returned as a double if it cannot fit within a 64-bit signed
196
+ // integer. When this occurs, the returned value will lose precision.
197
+ //
198
+ // * When underflow occurs, floating-point aggregation is non-deterministic.
199
+ // This means that running the same query repeatedly without any changes to
200
+ // the underlying values could produce slightly different results each
201
+ // time. In those cases, values should be stored as integers over
202
+ // floating-point numbers.
203
+ message Sum {
204
+ // The property to aggregate on.
205
+ PropertyReference property = 1;
206
+ }
207
+
208
+ // Average of the values of the requested property.
209
+ //
210
+ // * Only numeric values will be aggregated. All non-numeric values
211
+ // including `NULL` are skipped.
212
+ //
213
+ // * If the aggregated values contain `NaN`, returns `NaN`. Infinity math
214
+ // follows IEEE-754 standards.
215
+ //
216
+ // * If the aggregated value set is empty, returns `NULL`.
217
+ //
218
+ // * Always returns the result as a double.
219
+ message Avg {
220
+ // The property to aggregate on.
221
+ PropertyReference property = 1;
222
+ }
223
+
224
+ // The type of aggregation to perform, required.
225
+ oneof operator {
226
+ // Count aggregator.
227
+ Count count = 1;
228
+
229
+ // Sum aggregator.
230
+ Sum sum = 2;
231
+
232
+ // Average aggregator.
233
+ Avg avg = 3;
234
+ }
235
+
236
+ // Optional. Optional name of the property to store the result of the
237
+ // aggregation.
238
+ //
239
+ // If not provided, Datastore will pick a default name following the format
240
+ // `property_<incremental_id++>`. For example:
241
+ //
242
+ // ```
243
+ // AGGREGATE
244
+ // COUNT_UP_TO(1) AS count_up_to_1,
245
+ // COUNT_UP_TO(2),
246
+ // COUNT_UP_TO(3) AS count_up_to_3,
247
+ // COUNT(*)
248
+ // OVER (
249
+ // ...
250
+ // );
251
+ // ```
252
+ //
253
+ // becomes:
254
+ //
255
+ // ```
256
+ // AGGREGATE
257
+ // COUNT_UP_TO(1) AS count_up_to_1,
258
+ // COUNT_UP_TO(2) AS property_1,
259
+ // COUNT_UP_TO(3) AS count_up_to_3,
260
+ // COUNT(*) AS property_2
261
+ // OVER (
262
+ // ...
263
+ // );
264
+ // ```
265
+ //
266
+ // Requires:
267
+ //
268
+ // * Must be unique across all aggregation aliases.
269
+ // * Conform to [entity property
270
+ // name][google.datastore.v1.Entity.properties] limitations.
271
+ string alias = 7 [(google.api.field_behavior) = OPTIONAL];
272
+ }
273
+
274
+ // The base query to aggregate over.
275
+ oneof query_type {
276
+ // Nested query for aggregation
277
+ Query nested_query = 1;
278
+ }
279
+
280
+ // Optional. Series of aggregations to apply over the results of the
281
+ // `nested_query`.
282
+ //
283
+ // Requires:
284
+ //
285
+ // * A minimum of one and maximum of five aggregations per query.
286
+ repeated Aggregation aggregations = 3
287
+ [(google.api.field_behavior) = OPTIONAL];
288
+ }
289
+
290
+ // A representation of a kind.
291
+ message KindExpression {
292
+ // The name of the kind.
293
+ string name = 1;
294
+ }
295
+
296
+ // A reference to a property relative to the kind expressions.
297
+ message PropertyReference {
298
+ // A reference to a property.
299
+ //
300
+ // Requires:
301
+ //
302
+ // * MUST be a dot-delimited (`.`) string of segments, where each segment
303
+ // conforms to [entity property name][google.datastore.v1.Entity.properties]
304
+ // limitations.
305
+ string name = 2;
306
+ }
307
+
308
+ // A representation of a property in a projection.
309
+ message Projection {
310
+ // The property to project.
311
+ PropertyReference property = 1;
312
+ }
313
+
314
+ // The desired order for a specific property.
315
+ message PropertyOrder {
316
+ // The sort direction.
317
+ enum Direction {
318
+ // Unspecified. This value must not be used.
319
+ DIRECTION_UNSPECIFIED = 0;
320
+
321
+ // Ascending.
322
+ ASCENDING = 1;
323
+
324
+ // Descending.
325
+ DESCENDING = 2;
326
+ }
327
+
328
+ // The property to order by.
329
+ PropertyReference property = 1;
330
+
331
+ // The direction to order by. Defaults to `ASCENDING`.
332
+ Direction direction = 2;
333
+ }
334
+
335
+ // A holder for any type of filter.
336
+ message Filter {
337
+ // The type of filter.
338
+ oneof filter_type {
339
+ // A composite filter.
340
+ CompositeFilter composite_filter = 1;
341
+
342
+ // A filter on a property.
343
+ PropertyFilter property_filter = 2;
344
+ }
345
+ }
346
+
347
+ // A filter that merges multiple other filters using the given operator.
348
+ message CompositeFilter {
349
+ // A composite filter operator.
350
+ enum Operator {
351
+ // Unspecified. This value must not be used.
352
+ OPERATOR_UNSPECIFIED = 0;
353
+
354
+ // The results are required to satisfy each of the combined filters.
355
+ AND = 1;
356
+
357
+ // Documents are required to satisfy at least one of the combined filters.
358
+ OR = 2;
359
+ }
360
+
361
+ // The operator for combining multiple filters.
362
+ Operator op = 1;
363
+
364
+ // The list of filters to combine.
365
+ //
366
+ // Requires:
367
+ //
368
+ // * At least one filter is present.
369
+ repeated Filter filters = 2;
370
+ }
371
+
372
+ // A filter on a specific property.
373
+ message PropertyFilter {
374
+ // A property filter operator.
375
+ enum Operator {
376
+ // Unspecified. This value must not be used.
377
+ OPERATOR_UNSPECIFIED = 0;
378
+
379
+ // The given `property` is less than the given `value`.
380
+ //
381
+ // Requires:
382
+ //
383
+ // * That `property` comes first in `order_by`.
384
+ LESS_THAN = 1;
385
+
386
+ // The given `property` is less than or equal to the given `value`.
387
+ //
388
+ // Requires:
389
+ //
390
+ // * That `property` comes first in `order_by`.
391
+ LESS_THAN_OR_EQUAL = 2;
392
+
393
+ // The given `property` is greater than the given `value`.
394
+ //
395
+ // Requires:
396
+ //
397
+ // * That `property` comes first in `order_by`.
398
+ GREATER_THAN = 3;
399
+
400
+ // The given `property` is greater than or equal to the given `value`.
401
+ //
402
+ // Requires:
403
+ //
404
+ // * That `property` comes first in `order_by`.
405
+ GREATER_THAN_OR_EQUAL = 4;
406
+
407
+ // The given `property` is equal to the given `value`.
408
+ EQUAL = 5;
409
+
410
+ // The given `property` is equal to at least one value in the given array.
411
+ //
412
+ // Requires:
413
+ //
414
+ // * That `value` is a non-empty `ArrayValue`, subject to disjunction
415
+ // limits.
416
+ // * No `NOT_IN` is in the same query.
417
+ IN = 6;
418
+
419
+ // The given `property` is not equal to the given `value`.
420
+ //
421
+ // Requires:
422
+ //
423
+ // * No other `NOT_EQUAL` or `NOT_IN` is in the same query.
424
+ // * That `property` comes first in the `order_by`.
425
+ NOT_EQUAL = 9;
426
+
427
+ // Limit the result set to the given entity and its descendants.
428
+ //
429
+ // Requires:
430
+ //
431
+ // * That `value` is an entity key.
432
+ // * All evaluated disjunctions must have the same `HAS_ANCESTOR` filter.
433
+ HAS_ANCESTOR = 11;
434
+
435
+ // The value of the `property` is not in the given array.
436
+ //
437
+ // Requires:
438
+ //
439
+ // * That `value` is a non-empty `ArrayValue` with at most 10 values.
440
+ // * No other `OR`, `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query.
441
+ // * That `field` comes first in the `order_by`.
442
+ NOT_IN = 13;
443
+ }
444
+
445
+ // The property to filter by.
446
+ PropertyReference property = 1;
447
+
448
+ // The operator to filter by.
449
+ Operator op = 2;
450
+
451
+ // The value to compare the property to.
452
+ Value value = 3;
453
+ }
454
+
455
+ // Nearest Neighbors search config. The ordering provided by FindNearest
456
+ // supersedes the order_by stage. If multiple documents have the same vector
457
+ // distance, the returned document order is not guaranteed to be stable between
458
+ // queries.
459
+ message FindNearest {
460
+ // The distance measure to use when comparing vectors.
461
+ enum DistanceMeasure {
462
+ // Should not be set.
463
+ DISTANCE_MEASURE_UNSPECIFIED = 0;
464
+
465
+ // Measures the EUCLIDEAN distance between the vectors. See
466
+ // [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn
467
+ // more. The resulting distance decreases the more similar two vectors are.
468
+ EUCLIDEAN = 1;
469
+
470
+ // COSINE distance compares vectors based on the angle between them, which
471
+ // allows you to measure similarity that isn't based on the vectors
472
+ // magnitude. We recommend using DOT_PRODUCT with unit normalized vectors
473
+ // instead of COSINE distance, which is mathematically equivalent with
474
+ // better performance. See [Cosine
475
+ // Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn
476
+ // more about COSINE similarity and COSINE distance. The resulting COSINE
477
+ // distance decreases the more similar two vectors are.
478
+ COSINE = 2;
479
+
480
+ // Similar to cosine but is affected by the magnitude of the vectors. See
481
+ // [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more.
482
+ // The resulting distance increases the more similar two vectors are.
483
+ DOT_PRODUCT = 3;
484
+ }
485
+
486
+ // Required. An indexed vector property to search upon. Only documents which
487
+ // contain vectors whose dimensionality match the query_vector can be
488
+ // returned.
489
+ PropertyReference vector_property = 1
490
+ [(google.api.field_behavior) = REQUIRED];
491
+
492
+ // Required. The query vector that we are searching on. Must be a vector of no
493
+ // more than 2048 dimensions.
494
+ Value query_vector = 2 [(google.api.field_behavior) = REQUIRED];
495
+
496
+ // Required. The Distance Measure to use, required.
497
+ DistanceMeasure distance_measure = 3 [(google.api.field_behavior) = REQUIRED];
498
+
499
+ // Required. The number of nearest neighbors to return. Must be a positive
500
+ // integer of no more than 100.
501
+ google.protobuf.Int32Value limit = 4 [(google.api.field_behavior) = REQUIRED];
502
+
503
+ // Optional. Optional name of the field to output the result of the vector
504
+ // distance calculation. Must conform to [entity
505
+ // property][google.datastore.v1.Entity.properties] limitations.
506
+ string distance_result_property = 5 [(google.api.field_behavior) = OPTIONAL];
507
+
508
+ // Optional. Option to specify a threshold for which no less similar documents
509
+ // will be returned. The behavior of the specified `distance_measure` will
510
+ // affect the meaning of the distance threshold. Since DOT_PRODUCT distances
511
+ // increase when the vectors are more similar, the comparison is inverted.
512
+ //
513
+ // * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold
514
+ // * For DOT_PRODUCT: WHERE distance >= distance_threshold
515
+ google.protobuf.DoubleValue distance_threshold = 6
516
+ [(google.api.field_behavior) = OPTIONAL];
517
+ }
518
+
519
+ // A [GQL
520
+ // query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
521
+ message GqlQuery {
522
+ // A string of the format described
523
+ // [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
524
+ string query_string = 1;
525
+
526
+ // When false, the query string must not contain any literals and instead must
527
+ // bind all values. For example,
528
+ // `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
529
+ // `SELECT * FROM Kind WHERE a = @value` is.
530
+ bool allow_literals = 2;
531
+
532
+ // For each non-reserved named binding site in the query string, there must be
533
+ // a named parameter with that name, but not necessarily the inverse.
534
+ //
535
+ // Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
536
+ // `__.*__`, and must not be `""`.
537
+ map<string, GqlQueryParameter> named_bindings = 5;
538
+
539
+ // Numbered binding site @1 references the first numbered parameter,
540
+ // effectively using 1-based indexing, rather than the usual 0.
541
+ //
542
+ // For each binding site numbered i in `query_string`, there must be an i-th
543
+ // numbered parameter. The inverse must also be true.
544
+ repeated GqlQueryParameter positional_bindings = 4;
545
+ }
546
+
547
+ // A binding parameter for a GQL query.
548
+ message GqlQueryParameter {
549
+ // The type of parameter.
550
+ oneof parameter_type {
551
+ // A value parameter.
552
+ Value value = 2;
553
+
554
+ // A query cursor. Query cursors are returned in query
555
+ // result batches.
556
+ bytes cursor = 3;
557
+ }
558
+ }
559
+
560
+ // A batch of results produced by a query.
561
+ message QueryResultBatch {
562
+ // The possible values for the `more_results` field.
563
+ enum MoreResultsType {
564
+ // Unspecified. This value is never used.
565
+ MORE_RESULTS_TYPE_UNSPECIFIED = 0;
566
+
567
+ // There may be additional batches to fetch from this query.
568
+ NOT_FINISHED = 1;
569
+
570
+ // The query is finished, but there may be more results after the limit.
571
+ MORE_RESULTS_AFTER_LIMIT = 2;
572
+
573
+ // The query is finished, but there may be more results after the end
574
+ // cursor.
575
+ MORE_RESULTS_AFTER_CURSOR = 4;
576
+
577
+ // The query is finished, and there are no more results.
578
+ NO_MORE_RESULTS = 3;
579
+ }
580
+
581
+ // The number of results skipped, typically because of an offset.
582
+ int32 skipped_results = 6;
583
+
584
+ // A cursor that points to the position after the last skipped result.
585
+ // Will be set when `skipped_results` != 0.
586
+ bytes skipped_cursor = 3;
587
+
588
+ // The result type for every entity in `entity_results`.
589
+ EntityResult.ResultType entity_result_type = 1;
590
+
591
+ // The results for this batch.
592
+ repeated EntityResult entity_results = 2;
593
+
594
+ // A cursor that points to the position after the last result in the batch.
595
+ bytes end_cursor = 4;
596
+
597
+ // The state of the query after the current batch.
598
+ MoreResultsType more_results = 5;
599
+
600
+ // The version number of the snapshot this batch was returned from.
601
+ // This applies to the range of results from the query's `start_cursor` (or
602
+ // the beginning of the query if no cursor was given) to this batch's
603
+ // `end_cursor` (not the query's `end_cursor`).
604
+ //
605
+ // In a single transaction, subsequent query result batches for the same query
606
+ // can have a greater snapshot version number. Each batch's snapshot version
607
+ // is valid for all preceding batches.
608
+ // The value will be zero for eventually consistent queries.
609
+ int64 snapshot_version = 7;
610
+
611
+ // Read timestamp this batch was returned from.
612
+ // This applies to the range of results from the query's `start_cursor` (or
613
+ // the beginning of the query if no cursor was given) to this batch's
614
+ // `end_cursor` (not the query's `end_cursor`).
615
+ //
616
+ // In a single transaction, subsequent query result batches for the same query
617
+ // can have a greater timestamp. Each batch's read timestamp
618
+ // is valid for all preceding batches.
619
+ // This value will not be set for eventually consistent queries in Cloud
620
+ // Datastore.
621
+ google.protobuf.Timestamp read_time = 8;
622
+ }