pub trait Cursor: Send {
// Required methods
fn next_batch(&mut self) -> Result<Option<Vec<NativeColumn>>>;
fn remaining_rows(&self) -> usize;
fn projection_types(&self) -> Vec<TypeId>;
}Expand description
A forward streaming scan cursor over typed native columns. Implemented by
the single-run NativePageCursor (page-plan fast path) and the multi-run
MultiRunCursor (k-way merge by RowId across N runs — Phase 16.1). The
SQL scan holds a Box<dyn Cursor> so both layouts stream lazily instead of
materializing every row up front.
Required Methods§
Sourcefn next_batch(&mut self) -> Result<Option<Vec<NativeColumn>>>
fn next_batch(&mut self) -> Result<Option<Vec<NativeColumn>>>
Decode the next batch of survivor rows as projected native columns, in
ascending RowId order. None when the stream is exhausted.
Sourcefn remaining_rows(&self) -> usize
fn remaining_rows(&self) -> usize
Exact count of surviving rows still to be yielded (without decoding).
Sourcefn projection_types(&self) -> Vec<TypeId>
fn projection_types(&self) -> Vec<TypeId>
The projected column types, in output order.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".