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§
fn begin(&self, columns: &[String], schema: &RowSchema) -> Result<(), SQLError>
fn consume( &self, row: OwnedPhysicalRow, ) -> Result<QueryConsumerControl, SQLError>
Provided Methods§
Sourcefn collect_native_materialized(
&self,
_operator: &mut dyn PhysicalOperator,
_cancellation: &CancellationToken,
) -> ExecResult<bool>
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.
fn consume_batch(&self, batch: Batch) -> Result<QueryConsumerControl, SQLError>
Sourcefn input_demand(&self) -> Option<NonZeroUsize>
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.
Sourcefn streams_set_inputs(&self) -> bool
fn streams_set_inputs(&self) -> bool
Whether UNION ALL may deliver directly from each child instead of its ordinary set operator.
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>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".