pub struct OwnedSqlStreamPlan { /* private fields */ }Expand description
A preflight-validated local SQL stream plan.
Only a single table scan (or literal-only SELECT) followed by a row-local filter and a
slice is representable. The plan owns every catalog-derived value it needs after opening, so
no catalog lock or borrowed SQL transaction is retained by a live stream.
Implementations§
Source§impl OwnedSqlStreamPlan
impl OwnedSqlStreamPlan
Sourcepub fn preflight(database: &Database, sql: &str) -> Result<Self>
pub fn preflight(database: &Database, sql: &str) -> Result<Self>
Parse and validate the documented v0.8 local SELECT subset without opening a session.
Sourcepub fn preflight_in_transaction(
database: &Database,
overlay: &CatalogOverlay,
sql: &str,
) -> Result<Self>
pub fn preflight_in_transaction( database: &Database, overlay: &CatalogOverlay, sql: &str, ) -> Result<Self>
Parse and validate a local SELECT against an uncommitted catalog overlay.
The returned plan copies the table metadata it needs, so neither the catalog guard nor the overlay borrow survives into the cursor. This preserves transaction-local DDL visibility without coupling a live Python stream to a borrowed SQL transaction.
Sourcepub fn columns(&self) -> &[ColumnInfo]
pub fn columns(&self) -> &[ColumnInfo]
Return the output schema before a cursor is opened.
Sourcepub fn open_cursor(
&self,
transaction: &mut dyn OwnedKVTransaction,
) -> CoreResult<Box<dyn OwnedKVScan>>
pub fn open_cursor( &self, transaction: &mut dyn OwnedKVTransaction, ) -> CoreResult<Box<dyn OwnedKVScan>>
Open the physical cursor through the owned core transaction supplied by the session lease.
Sourcepub fn is_exhausted(&self) -> bool
pub fn is_exhausted(&self) -> bool
Whether the logical slice is already exhausted without another storage read.
Sourcepub fn process_entry(
&mut self,
key: Key,
value: Value,
) -> Result<OwnedSqlRowOutcome>
pub fn process_entry( &mut self, key: Key, value: Value, ) -> Result<OwnedSqlRowOutcome>
Decode, filter, slice, and project a single owned cursor entry.
Trait Implementations§
Source§impl Clone for OwnedSqlStreamPlan
impl Clone for OwnedSqlStreamPlan
Source§fn clone(&self) -> OwnedSqlStreamPlan
fn clone(&self) -> OwnedSqlStreamPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more