pub struct BatchWriter { /* private fields */ }Implementations§
Source§impl BatchWriter
impl BatchWriter
pub fn insert( &mut self, table_name: &str, values: Vec<CellValue>, ) -> Result<&mut Self, String>
pub fn pending_count(&self) -> usize
Sourcepub async fn flush(&mut self) -> DataFusionResult<u64>
pub async fn flush(&mut self) -> DataFusionResult<u64>
Flush pending rows to ingest and return the post-ingest consistency token.
Sourcepub async fn flush_with_receipt(
&mut self,
) -> DataFusionResult<Option<BatchReceipt>>
pub async fn flush_with_receipt( &mut self, ) -> DataFusionResult<Option<BatchReceipt>>
Flush pending rows to ingest and return metadata for the persisted batch.
pub fn prepare_flush(&mut self) -> DataFusionResult<Option<PreparedBatch>>
pub fn stage_flush( &self, prepared: &PreparedBatch, batch: &mut StoreWriteBatch, ) -> DataFusionResult<()>
pub fn mark_flush_persisted( &self, prepared: PreparedBatch, sequence_number: u64, ) -> BatchReceipt
pub fn mark_flush_failed(&self, prepared: PreparedBatch)
Trait Implementations§
Source§impl Debug for BatchWriter
impl Debug for BatchWriter
Source§impl StoreBatchUpload for BatchWriter
impl StoreBatchUpload for BatchWriter
type Prepared = PreparedBatch
type Receipt = BatchReceipt
type Error = DataFusionError
fn stage_upload( &self, prepared: &Self::Prepared, batch: &mut StoreWriteBatch, ) -> Result<(), Self::Error>
fn commit_error(&self, error: ClientError) -> Self::Error
fn mark_upload_persisted<'a>( &'a self, prepared: Self::Prepared, sequence_number: u64, ) -> BoxFuture<'a, Self::Receipt>
fn mark_upload_failed<'a>( &'a self, prepared: Self::Prepared, _error: String, ) -> BoxFuture<'a, ()>
fn commit_upload<'a>( &'a self, client: &'a StoreClient, prepared: Self::Prepared, ) -> Pin<Box<dyn Future<Output = Result<Self::Receipt, Self::Error>> + Send + 'a>>
Auto Trait Implementations§
impl !Freeze for BatchWriter
impl !RefUnwindSafe for BatchWriter
impl Send for BatchWriter
impl Sync for BatchWriter
impl Unpin for BatchWriter
impl UnsafeUnpin for BatchWriter
impl !UnwindSafe for BatchWriter
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more