Struct cassandra_cpp::Batch
source · pub struct Batch(/* private fields */);
Expand description
A group of statements that are executed as a single batch. Note: Batches are not supported by the binary protocol version 1.
Implementations§
source§impl Batch
impl Batch
sourcepub async fn execute(self) -> Result<CassResult>
pub async fn execute(self) -> Result<CassResult>
Executes this batch.
sourcepub fn set_consistency(&mut self, consistency: Consistency) -> Result<&mut Self>
pub fn set_consistency(&mut self, consistency: Consistency) -> Result<&mut Self>
Sets the batch’s consistency level
sourcepub fn set_serial_consistency(
&mut self,
consistency: Consistency
) -> Result<&mut Self>
pub fn set_serial_consistency( &mut self, consistency: Consistency ) -> Result<&mut Self>
Sets the batch’s serial consistency level.
Default: Not set
sourcepub fn set_timestamp(&mut self, timestamp: i64) -> Result<&Self>
pub fn set_timestamp(&mut self, timestamp: i64) -> Result<&Self>
Sets the batch’s timestamp.
sourcepub fn set_retry_policy(
&mut self,
retry_policy: RetryPolicy
) -> Result<&mut Self>
pub fn set_retry_policy( &mut self, retry_policy: RetryPolicy ) -> Result<&mut Self>
Sets the batch’s retry policy.
sourcepub fn set_custom_payload(
&mut self,
custom_payload: CustomPayload
) -> Result<&mut Self>
pub fn set_custom_payload( &mut self, custom_payload: CustomPayload ) -> Result<&mut Self>
Sets the batch’s custom payload.
sourcepub fn add_statement(&mut self, statement: Statement) -> Result<&Self>
pub fn add_statement(&mut self, statement: Statement) -> Result<&Self>
Adds a statement to a batch.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Batch
impl Send for Batch
impl Sync for Batch
impl Unpin for Batch
impl UnwindSafe for Batch
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