1- // Copyright 2025 Google LLC
1+ // Copyright 2026 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -135,6 +135,9 @@ message SpannerAction {
135135
136136 // Query cancellation action for testing the cancellation of a query.
137137 QueryCancellationAction query_cancellation = 51 ;
138+
139+ // Action to adapt a message.
140+ AdaptMessageAction adapt_message = 52 ;
138141 }
139142}
140143
@@ -185,12 +188,22 @@ message DmlAction {
185188 // Whether to autocommit the transaction after executing the DML statement,
186189 // if the Executor supports autocommit.
187190 optional bool autocommit_if_supported = 2 ;
191+
192+ // Whether to set this DML statement as the last statement in the
193+ // transaction. The transaction should be committed after processing this DML
194+ // statement.
195+ optional bool last_statement = 3 ;
188196}
189197
190198// Batch of DML statements invoked using batched execution.
191199message BatchDmlAction {
192200 // DML statements.
193201 repeated QueryAction updates = 1 ;
202+
203+ // Whether to set this request with the last statement option in the
204+ // transaction. The transaction should be committed after processing this
205+ // request.
206+ optional bool last_statements = 2 ;
194207}
195208
196209// Value represents a single value that can be read or written to/from
@@ -396,7 +409,8 @@ message StartTransactionAction {
396409 // testing.
397410 string transaction_seed = 3 ;
398411
399- // Execution options (e.g., whether transaction is opaque, optimistic).
412+ // Execution options (e.g., whether transaction is opaque, optimistic,
413+ // excluded from change streams).
400414 optional TransactionExecutionOptions execution_options = 4 ;
401415}
402416
@@ -460,10 +474,29 @@ message ColumnMetadata {
460474 google.spanner.v1.Type type = 2 ;
461475}
462476
463- // Options for executing the transaction.
464477message TransactionExecutionOptions {
465478 // Whether optimistic concurrency should be used to execute this transaction.
466479 bool optimistic = 1 ;
480+
481+ // Whether traffic from this transaction will be excluded from tracking change
482+ // streams with allow_txn_exclusion=true.
483+ bool exclude_from_change_streams = 2 ;
484+
485+ // Whether serializable isolation with optimistic mode concurrency should be
486+ // used to execute this transaction.
487+ bool serializable_optimistic = 3 ;
488+
489+ // Whether snapshot isolation with optimistic mode concurrency should be used
490+ // to execute this transaction.
491+ bool snapshot_isolation_optimistic = 4 ;
492+
493+ // Whether snapshot isolation with pessimistic mode concurrency should be used
494+ // to execute this transaction.
495+ bool snapshot_isolation_pessimistic = 5 ;
496+
497+ // Whether to exclude mutations of this transaction from the allowed tracking
498+ // change streams.
499+ bool exclude_txn_from_change_streams = 6 ;
467500}
468501
469502// FinishTransactionAction defines an action of finishing a transaction.
@@ -573,6 +606,9 @@ message AdminAction {
573606
574607 // Action that changes quorum of a Cloud Spanner database.
575608 ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28 ;
609+
610+ // Action that adds splits to a Cloud Spanner database.
611+ AddSplitPointsAction add_split_points = 29 ;
576612 }
577613}
578614
@@ -663,6 +699,9 @@ message CreateCloudInstanceAction {
663699
664700 // labels.
665701 map <string , string > labels = 5 ;
702+
703+ // The edition of the instance.
704+ google.spanner.admin.instance.v1.Instance.Edition edition = 8 ;
666705}
667706
668707// Action that updates a Cloud Spanner instance.
@@ -693,6 +732,9 @@ message UpdateCloudInstanceAction {
693732
694733 // labels.
695734 map <string , string > labels = 6 ;
735+
736+ // The edition of the instance.
737+ google.spanner.admin.instance.v1.Instance.Edition edition = 8 ;
696738}
697739
698740// Action that deletes a Cloud Spanner instance.
@@ -787,6 +829,29 @@ message ChangeQuorumCloudDatabaseAction {
787829 repeated string serving_locations = 2 ;
788830}
789831
832+ // A single Adapt message request.
833+ message AdaptMessageAction {
834+ // The fully qualified uri of the database to send AdaptMessage to.
835+ string database_uri = 1 ;
836+
837+ // The protocol to use for the request.
838+ string protocol = 2 ;
839+
840+ // The payload of the request.
841+ bytes payload = 3 ;
842+
843+ // Attachments to be sent with the request.
844+ map <string , string > attachments = 4 ;
845+
846+ // The query to be sent with the request.
847+ string query = 5 ;
848+
849+ // If true, the action will send a Prepare request first and then an
850+ // Execute request right after to execute the query. This is only supported
851+ // for Cloud Client path.
852+ bool prepare_then_execute = 6 ;
853+ }
854+
790855// Action that lists Cloud Spanner databases.
791856message ListCloudDatabasesAction {
792857 // Cloud project ID, e.g. "spanner-cloud-systest".
@@ -805,7 +870,7 @@ message ListCloudDatabasesAction {
805870 string page_token = 4 ;
806871}
807872
808- // Action that lists Cloud Spanner databases .
873+ // Action that lists Cloud Spanner instances .
809874message ListCloudInstancesAction {
810875 // Cloud project ID, e.g. "spanner-cloud-systest".
811876 string project_id = 1 ;
@@ -1067,6 +1132,21 @@ message CancelOperationAction {
10671132 string operation = 1 ;
10681133}
10691134
1135+ // Action that adds a split point to a Cloud Spanner database.
1136+ message AddSplitPointsAction {
1137+ // Cloud project ID, e.g. "spanner-cloud-systest".
1138+ string project_id = 1 ;
1139+
1140+ // Cloud instance ID (not path), e.g. "test-instance".
1141+ string instance_id = 2 ;
1142+
1143+ // Cloud database ID (not full path), e.g. "db0".
1144+ string database_id = 3 ;
1145+
1146+ // The split points to add.
1147+ repeated google.spanner.admin.database.v1.SplitPoints split_points = 4 ;
1148+ }
1149+
10701150// Starts a batch read-only transaction in executor. Successful outcomes of this
10711151// action will contain batch_txn_id--the identificator that can be used to start
10721152// the same transaction in other Executors to parallelize partition processing.
@@ -1260,6 +1340,10 @@ message SpannerActionOutcome {
12601340
12611341 // Change stream records returned by a change stream query.
12621342 repeated ChangeStreamRecord change_stream_records = 10 ;
1343+
1344+ // If not zero, it indicates the read timestamp to use for validating
1345+ // the SnapshotIsolation transaction.
1346+ optional int64 snapshot_isolation_txn_read_timestamp = 11 ;
12631347}
12641348
12651349// AdminResult contains admin action results, for database/backup/operation.
0 commit comments