Rindle docs and package mapSkip to main content

SqliteRow

Struct SqliteRow 

Source
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>

Source

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<'_>

Source§

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

Infallible compatibility wrapper for direct tests and memory-equivalent trait users. Production SQLite source code uses Self::try_to_owned_row.

Source§

fn col(&self, c: ColId) -> Value<'_>

Read column c, zero-copy.
Source§

fn len(&self) -> usize

Number of columns.
§

fn is_empty(&self) -> bool

Auto Trait Implementations§

§

impl<'a> Freeze for SqliteRow<'a>

§

impl<'a> !RefUnwindSafe for SqliteRow<'a>

§

impl<'a> !Send for SqliteRow<'a>

§

impl<'a> !Sync for SqliteRow<'a>

§

impl<'a> Unpin for SqliteRow<'a>

§

impl<'a> UnsafeUnpin for SqliteRow<'a>

§

impl<'a> !UnwindSafe for SqliteRow<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,