@@ -21,6 +21,7 @@ import "google/api/client.proto";
21
21
import "google/api/field_behavior.proto" ;
22
22
import "google/datastore/v1/entity.proto" ;
23
23
import "google/datastore/v1/query.proto" ;
24
+ import "google/protobuf/timestamp.proto" ;
24
25
25
26
option csharp_namespace = "Google.Cloud.Datastore.V1" ;
26
27
option go_package = "google.golang.org/genproto/googleapis/datastore/v1;datastore" ;
@@ -138,6 +139,9 @@ message LookupResponse {
138
139
// order of results in this field is undefined and has no relation to the
139
140
// order of the keys in the input.
140
141
repeated Key deferred = 3 ;
142
+
143
+ // The time at which these entities were read or found missing.
144
+ google.protobuf.Timestamp read_time = 7 ;
141
145
}
142
146
143
147
// The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
@@ -259,6 +263,9 @@ message CommitResponse {
259
263
// The number of index entries updated during the commit, or zero if none were
260
264
// updated.
261
265
int32 index_updates = 4 ;
266
+
267
+ // The transaction commit timestamp. Not set for non-transactional commits.
268
+ google.protobuf.Timestamp commit_time = 8 ;
262
269
}
263
270
264
271
// The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
@@ -332,6 +339,11 @@ message Mutation {
332
339
// to. If this does not match the current version on the server, the
333
340
// mutation conflicts.
334
341
int64 base_version = 8 ;
342
+
343
+ // The update time of the entity that this mutation is being applied
344
+ // to. If this does not match the current update time on the server, the
345
+ // mutation conflicts.
346
+ google.protobuf.Timestamp update_time = 11 ;
335
347
}
336
348
}
337
349
@@ -348,6 +360,12 @@ message MutationResult {
348
360
// than the version of any possible future entity.
349
361
int64 version = 4 ;
350
362
363
+ // The update time of the entity on the server after processing the mutation.
364
+ // If the mutation doesn't change anything on the server, then the timestamp
365
+ // will be the update timestamp of the current entity. This field will not be
366
+ // set after a 'delete'.
367
+ google.protobuf.Timestamp update_time = 6 ;
368
+
351
369
// Whether a conflict was detected for this mutation. Always false when a
352
370
// conflict detection strategy field is not set in the mutation.
353
371
bool conflict_detected = 5 ;
@@ -386,6 +404,11 @@ message ReadOptions {
386
404
// transaction identifier is returned by a call to
387
405
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
388
406
bytes transaction = 2 ;
407
+
408
+ // Reads entities as they were at the given time. This may not be older
409
+ // than 270 seconds. This value is only supported for Cloud Firestore in
410
+ // Datastore mode.
411
+ google.protobuf.Timestamp read_time = 4 ;
389
412
}
390
413
}
391
414
@@ -403,7 +426,9 @@ message TransactionOptions {
403
426
404
427
// Options specific to read-only transactions.
405
428
message ReadOnly {
406
-
429
+ // Reads entities at the given time.
430
+ // This may not be older than 60 seconds.
431
+ google.protobuf.Timestamp read_time = 1 ;
407
432
}
408
433
409
434
// The `mode` of the transaction, indicating whether write operations are
0 commit comments