pub struct MultiReader { /* private fields */ }Expand description
Manual reader for 5+ result sets — or when typed tuples are insufficient.
Each read_* call consumes the next result set in order. Calling more
times than there are result sets returns an empty result (not an error).
Implementations§
Source§impl MultiReader
impl MultiReader
Sourcepub fn read_list<T: SqlEntity>(&mut self) -> Result<Vec<T>, SqlError>
pub fn read_list<T: SqlEntity>(&mut self) -> Result<Vec<T>, SqlError>
Read all rows of the next result set as Vec<T>.
Sourcepub fn read_single<T: SqlEntity>(&mut self) -> Result<Option<T>, SqlError>
pub fn read_single<T: SqlEntity>(&mut self) -> Result<Option<T>, SqlError>
Read the first row of the next result set as Option<T>.
Sourcepub fn read_required<T: SqlEntity>(&mut self) -> Result<T, SqlError>
pub fn read_required<T: SqlEntity>(&mut self) -> Result<T, SqlError>
Read the first row of the next result set, error if missing.
Sourcepub fn read_scalar<S>(&mut self) -> Result<Option<S>, SqlError>
pub fn read_scalar<S>(&mut self) -> Result<Option<S>, SqlError>
Read a scalar from the first column of the first row of the next set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultiReader
impl RefUnwindSafe for MultiReader
impl Send for MultiReader
impl Sync for MultiReader
impl Unpin for MultiReader
impl UnsafeUnpin for MultiReader
impl UnwindSafe for MultiReader
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