pub struct Row { /* private fields */ }Expand description
A single row from a query result.
Provides zero-copy column access — data is decoded on demand from the
underlying Bytes buffer.
Implementations§
Source§impl Row
impl Row
pub fn new(columns: DataRowColumns, description: Arc<RowDescription>) -> Self
Sourcepub fn get_by_name<T: FromSql>(&self, name: &str) -> T
pub fn get_by_name<T: FromSql>(&self, name: &str) -> T
Get a typed column value by name.
§Panics
Panics if the column name doesn’t exist or the value cannot be decoded.
Sourcepub fn try_get<T: FromSql>(&self, idx: usize) -> Result<T>
pub fn try_get<T: FromSql>(&self, idx: usize) -> Result<T>
Try to get a typed column value by index.
Sourcepub fn try_get_by_name<T: FromSql>(&self, name: &str) -> Result<T>
pub fn try_get_by_name<T: FromSql>(&self, name: &str) -> Result<T>
Try to get a typed column value by name.
Sourcepub fn get_raw(&self, idx: usize) -> Option<Bytes>
pub fn get_raw(&self, idx: usize) -> Option<Bytes>
Get raw bytes for a column. Returns None for NULL.
pub fn is_empty(&self) -> bool
Sourcepub fn description(&self) -> &RowDescription
pub fn description(&self) -> &RowDescription
Get the row description (column metadata).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Row
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnsafeUnpin for Row
impl UnwindSafe for Row
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