pub struct QueryRowsBuilder { /* private fields */ }Expand description
Builds immutable query results without retaining one map or vector per row.
The first named row binds column names to stable ordinals. Later rows are
consumed in the same deterministic BTreeMap order and their values move
directly into bounded row segments when cardinality is unknown. Explicit
capacity constructors retain the flat-buffer path.
Implementations§
Source§impl QueryRowsBuilder
impl QueryRowsBuilder
pub fn new() -> Self
pub fn with_row_capacity(row_capacity: usize) -> Self
pub fn with_schema(schema: QuerySchema, row_capacity: usize) -> Self
pub fn push_values( &mut self, values: impl IntoIterator<Item = Value>, ) -> Result<()>
Sourcepub fn try_push_values(
&mut self,
values: impl IntoIterator<Item = Result<Value>>,
) -> Result<()>
pub fn try_push_values( &mut self, values: impl IntoIterator<Item = Result<Value>>, ) -> Result<()>
Appends one fallible row into immutable-result storage.
A conversion error or width mismatch rolls the partial row back.
pub fn push_named_row(&mut self, row: Row) -> Result<()>
pub fn finish(self) -> QueryRows
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryRowsBuilder
impl RefUnwindSafe for QueryRowsBuilder
impl Send for QueryRowsBuilder
impl Sync for QueryRowsBuilder
impl Unpin for QueryRowsBuilder
impl UnsafeUnpin for QueryRowsBuilder
impl UnwindSafe for QueryRowsBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more