pub struct BatchPrepareStateMachine { /* private fields */ }Expand description
State machine for batch prepare (Parse + Describe)* + Sync.
Prepares multiple statements in a single round-trip by sending all Parse and DescribeStatement messages followed by a single Sync.
Implementations§
Source§impl BatchPrepareStateMachine
impl BatchPrepareStateMachine
Sourcepub fn new(buffer_set: &mut BufferSet, queries: &[&str], start_idx: u64) -> Self
pub fn new(buffer_set: &mut BufferSet, queries: &[&str], start_idx: u64) -> Self
Create a new batch prepare state machine.
Writes all Parse + DescribeStatement messages followed by Sync to the buffer.
Sourcepub fn take_statements(&mut self) -> Vec<PreparedStatement>
pub fn take_statements(&mut self) -> Vec<PreparedStatement>
Take the prepared statements after completion.
Sourcepub fn transaction_status(&self) -> TransactionStatus
pub fn transaction_status(&self) -> TransactionStatus
Get the transaction status after completion.
Auto Trait Implementations§
impl Freeze for BatchPrepareStateMachine
impl RefUnwindSafe for BatchPrepareStateMachine
impl Send for BatchPrepareStateMachine
impl Sync for BatchPrepareStateMachine
impl Unpin for BatchPrepareStateMachine
impl UnwindSafe for BatchPrepareStateMachine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more