MCPcopy Create free account
hub / github.com/apache/arrow-rs / end_transaction

Method end_transaction

arrow-flight/src/sql/client.rs:425–441  ·  view source on GitHub ↗

Request to commit/rollback a transaction.

(
        &mut self,
        transaction_id: Bytes,
        action: EndTransaction,
    )

Source from the content-addressed store, hash-verified

423
424 /// Request to commit/rollback a transaction.
425 pub async fn end_transaction(
426 &mut self,
427 transaction_id: Bytes,
428 action: EndTransaction,
429 ) -> Result<()> {
430 let cmd = ActionEndTransactionRequest {
431 transaction_id,
432 action: action as i32,
433 };
434 let action = Action {
435 r#type: END_TRANSACTION.to_string(),
436 body: cmd.as_any().encode_to_vec().into(),
437 };
438 let req = self.set_request_headers(action.into_request())?;
439 let _ = self.flight_client.do_action(req).await?.into_inner();
440 Ok(())
441 }
442
443 /// Explicitly shut down and clean up the client.
444 pub async fn close(&mut self) -> Result<()> {

Callers 1

Calls 4

set_request_headersMethod · 0.80
as_anyMethod · 0.45
into_innerMethod · 0.45
do_actionMethod · 0.45

Tested by 1