| 384 | } |
| 385 | |
| 386 | arrow::Result<ActionEndSavepointRequest> ParseActionEndSavepointRequest( |
| 387 | const Action& action) { |
| 388 | pb::sql::ActionEndSavepointRequest command; |
| 389 | RETURN_NOT_OK(flight::internal::UnpackProtoAction(action, &command)); |
| 390 | |
| 391 | ActionEndSavepointRequest result; |
| 392 | result.savepoint_id = command.savepoint_id(); |
| 393 | switch (command.action()) { |
| 394 | case pb::sql::ActionEndSavepointRequest::END_SAVEPOINT_UNSPECIFIED: |
| 395 | return Status::Invalid( |
| 396 | "ActionEndSavepointRequest.action was END_SAVEPOINT_UNSPECIFIED"); |
| 397 | case pb::sql::ActionEndSavepointRequest::END_SAVEPOINT_RELEASE: |
| 398 | result.action = ActionEndSavepointRequest::kRelease; |
| 399 | break; |
| 400 | case pb::sql::ActionEndSavepointRequest::END_SAVEPOINT_ROLLBACK: |
| 401 | result.action = ActionEndSavepointRequest::kRollback; |
| 402 | break; |
| 403 | default: |
| 404 | return Status::Invalid("Unknown value for ActionEndSavepointRequest.action: ", |
| 405 | command.action()); |
| 406 | } |
| 407 | return result; |
| 408 | } |
| 409 | |
| 410 | arrow::Result<ActionEndTransactionRequest> ParseActionEndTransactionRequest( |
| 411 | const Action& action) { |
nothing calls this directly
no test coverage detected