| 408 | } |
| 409 | |
| 410 | arrow::Result<ActionEndTransactionRequest> ParseActionEndTransactionRequest( |
| 411 | const Action& action) { |
| 412 | pb::sql::ActionEndTransactionRequest command; |
| 413 | RETURN_NOT_OK(flight::internal::UnpackProtoAction(action, &command)); |
| 414 | |
| 415 | ActionEndTransactionRequest result; |
| 416 | result.transaction_id = command.transaction_id(); |
| 417 | switch (command.action()) { |
| 418 | case pb::sql::ActionEndTransactionRequest::END_TRANSACTION_UNSPECIFIED: |
| 419 | return Status::Invalid( |
| 420 | "ActionEndTransactionRequest.action was END_TRANSACTION_UNSPECIFIED"); |
| 421 | case pb::sql::ActionEndTransactionRequest::END_TRANSACTION_COMMIT: |
| 422 | result.action = ActionEndTransactionRequest::kCommit; |
| 423 | break; |
| 424 | case pb::sql::ActionEndTransactionRequest::END_TRANSACTION_ROLLBACK: |
| 425 | result.action = ActionEndTransactionRequest::kRollback; |
| 426 | break; |
| 427 | default: |
| 428 | return Status::Invalid("Unknown value for ActionEndTransactionRequest.action: ", |
| 429 | command.action()); |
| 430 | } |
| 431 | return result; |
| 432 | } |
| 433 | |
| 434 | arrow::Result<Result> PackActionResult(const google::protobuf::Message& message) { |
| 435 | google::protobuf::Any any; |
nothing calls this directly
no test coverage detected