pub struct SqliteRow<'a> { /* private fields */ }Expand description
One borrowed SQLite row. col(i) reads column i lazily and zero-copy:
a Str/Json cell is a &[u8] pointing straight into SQLite’s step buffer
(no allocation, no UTF-8 validation — bytewise BINARY compare on the hot
path; validate at the to_owned escape).
Implementations§
Source§impl<'a> SqliteRow<'a>
impl<'a> SqliteRow<'a>
Sourcepub fn new(row: &'a Row<'a>, types: &'a [ColType]) -> SqliteRow<'a>
pub fn new(row: &'a Row<'a>, types: &'a [ColType]) -> SqliteRow<'a>
Wrap a borrowed rusqlite row + its column type tags. Used by the
production owning cursor (table_source::OwnedSqliteRows), which — unlike
the borrow-the-caller’s-statement SqliteRowStream — owns the whole
conn→stmt→cursor chain and constructs each SqliteRow itself.
Trait Implementations§
Source§impl RowRef for SqliteRow<'_>
impl RowRef for SqliteRow<'_>
Source§fn try_to_owned_row(&self) -> Result<OwnedRow, RindleError>
fn try_to_owned_row(&self) -> Result<OwnedRow, RindleError>
Fallible forced per-row copy — one flat allocation for the whole row
(205-FLAT-ROW-SINGLE-BUFFER-DESIGN.md): the two-pass builder sizes the
buffer, validates TEXT/JSON UTF-8 (same eager timing as the old per-cell
try_to_owned), then writes cells in place. Invalid bytes become a runtime
error instead of a panic; lossy integer-to-f64 conversions are parked before
this point by the owning SQLite cursor.
Source§fn to_owned_row(&self) -> OwnedRow
fn to_owned_row(&self) -> OwnedRow
Infallible compatibility wrapper for direct tests and memory-equivalent
trait users. Production SQLite source code uses Self::try_to_owned_row.