pub trait PendingRowsBatcher: Send + Sync {
// Required methods
fn acquire<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<OwnedSemaphorePermit>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit<'life0, 'async_trait>(
&'life0 self,
table_info: TableInfoRef,
batch: RecordBatch,
ctx: QueryContextRef,
permit: Arc<OwnedSemaphorePermit>,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Accepts prepared table writes without coupling the inserter to a batcher implementation. Schema creation, alteration and default evaluation remain the caller’s responsibility.
Required Methods§
Sourcefn acquire<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<OwnedSemaphorePermit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acquire<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<OwnedSemaphorePermit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Acquires one slot per original request, shared by all of its table submissions.
Sourcefn submit<'life0, 'async_trait>(
&'life0 self,
table_info: TableInfoRef,
batch: RecordBatch,
ctx: QueryContextRef,
permit: Arc<OwnedSemaphorePermit>,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit<'life0, 'async_trait>(
&'life0 self,
table_info: TableInfoRef,
batch: RecordBatch,
ctx: QueryContextRef,
permit: Arc<OwnedSemaphorePermit>,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submits rows according to the acknowledgement policy, retaining the slot until writing completes even when the response acknowledges queue admission only. Cancelling the response wait does not retract an already enqueued submission.