lidavidm commented on code in PR #13492:
URL: https://github.com/apache/arrow/pull/13492#discussion_r943563857
##########
format/FlightSql.proto:
##########
@@ -1450,8 +1512,72 @@ message ActionClosePreparedStatementRequest {
bytes prepared_statement_handle = 1;
}
+/*
+ * Request message for the "BeginTransaction" action.
+ * Begins a transaction.
+ */
+message ActionBeginTransactionRequest {
+ option (experimental) = true;
+}
+
+/*
+ * Request message for the "BeginSavepoint" action.
+ * Creates a savepoint within a transaction.
+ *
+ * Only supported if FLIGHT_SQL_TRANSACTION is
+ * FLIGHT_SQL_TRANSACTION_SUPPORT_SAVEPOINT.
+ */
+message ActionBeginSavepointRequest {
+ option (experimental) = true;
+
+ // The transaction to which a savepoint belongs.
+ bytes transaction_id = 1;
+ // Name for the savepoint.
+ string name = 2;
+}
+
+/*
+ * The result of a "BeginTransaction" or "BeginSavepoint" action.
+ *
+ * The transaction can be manipulated with the "EndTransaction" action, or
+ * automatically via server timeout. If the transaction times out, then it is
+ * automatically rolled back.
+ *
+ * The result should be wrapped in a google.protobuf.Any message.
+ */
+message ActionBeginTransactionResult {
+ option (experimental) = true;
+
+ // Opaque handle for the transaction or savepoint on the server.
+ bytes transaction_id = 1;
+}
+
+/*
+ * Request message for the "EndTransaction" action.
+ *
+ * With a transaction: commit (COMMIT) or rollback (ROLLBACK) the transaction.
+ * With a savepoint: remove (COMMIT) or rollback to (ROLLBACK) the savepoint.
+ *
+ * If the action completes successfully, the transaction/savepoint handle is
+ * invalidated.
+ */
+message ActionEndTransactionRequest {
+ option (experimental) = true;
+
+ enum EndTransaction {
+ END_TRANSACTION_UNSPECIFIED = 0;
+ // Commit the transaction or release the savepoint.
+ END_TRANSACTION_COMMIT = 1;
+ // Roll back the transaction or to a savepoint.
+ END_TRANSACTION_ROLLBACK = 2;
Review Comment:
I split them entirely just to avoid confusion (and so transaction/savepoint
handles no longer have to share a namespace)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]