Skip to main content

QueryRowConsumer

Trait QueryRowConsumer 

Source
pub trait QueryRowConsumer {
    // Required methods
    fn begin(
        &self,
        columns: &[String],
        schema: &RowSchema,
    ) -> Result<(), SQLError>;
    fn consume(
        &self,
        row: OwnedPhysicalRow,
    ) -> Result<QueryConsumerControl, SQLError>;

    // Provided methods
    fn collect_native_materialized(
        &self,
        _operator: &mut dyn PhysicalOperator,
        _cancellation: &CancellationToken,
    ) -> ExecResult<bool> { ... }
    fn consume_batch(
        &self,
        batch: Batch,
    ) -> Result<QueryConsumerControl, SQLError> { ... }
    fn input_demand(&self) -> Option<NonZeroUsize> { ... }
    fn streams_set_inputs(&self) -> bool { ... }
    fn uses_directional_scan(&self) -> bool { ... }
    fn directional_scan_prepared(
        &self,
        _support: BackwardScanSupport,
    ) -> Result<(), SQLError> { ... }
    fn scan_direction(&self) -> PhysicalScanDirection { ... }
    fn direction_exhausted(&self) -> Result<QueryConsumerControl, SQLError> { ... }
    fn rewound(&self) -> Result<QueryConsumerControl, SQLError> { ... }
}

Required Methods§

Source

fn begin(&self, columns: &[String], schema: &RowSchema) -> Result<(), SQLError>

Source

fn consume( &self, row: OwnedPhysicalRow, ) -> Result<QueryConsumerControl, SQLError>

Provided Methods§

Source

fn collect_native_materialized( &self, _operator: &mut dyn PhysicalOperator, _cancellation: &CancellationToken, ) -> ExecResult<bool>

Let a complete native result consumer collect borrowed values after begin and input open. The default declines without consuming input; arbitrary callbacks retain their ordinary row-delivery boundary.

Source

fn consume_batch(&self, batch: Batch) -> Result<QueryConsumerControl, SQLError>

Source

fn input_demand(&self) -> Option<NonZeroUsize>

Requested output rows before this consumer receives control. The default retains row-level demand for stop and error boundaries. A consumer that accepts all input without per-row observable effects or failures may return None; native batches additionally require the producer’s ordering guarantee.

Source

fn streams_set_inputs(&self) -> bool

Whether UNION ALL may deliver directly from each child instead of its ordinary set operator.

Source

fn uses_directional_scan(&self) -> bool

Source

fn directional_scan_prepared( &self, _support: BackwardScanSupport, ) -> Result<(), SQLError>

Source

fn scan_direction(&self) -> PhysicalScanDirection

Source

fn direction_exhausted(&self) -> Result<QueryConsumerControl, SQLError>

Source

fn rewound(&self) -> Result<QueryConsumerControl, SQLError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§