MCPcopy Create free account
hub / github.com/apache/arrow / ParseActionEndSavepointRequest

Function ParseActionEndSavepointRequest

cpp/src/arrow/flight/sql/server.cc:386–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386arrow::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
410arrow::Result<ActionEndTransactionRequest> ParseActionEndTransactionRequest(
411 const Action& action) {

Callers

nothing calls this directly

Calls 2

UnpackProtoActionFunction · 0.85
InvalidFunction · 0.50

Tested by

no test coverage detected