pub struct Row { /* private fields */ }Expand description
Implementations§
Source§impl Row
impl Row
Sourcepub fn get<T: FromValue>(&self, column: &str) -> Result<T>
pub fn get<T: FromValue>(&self, column: &str) -> Result<T>
Get a typed value by column name.
This is the primary way to extract values from query results. The type parameter determines how the value is converted.
§Supported Types
String- for text values (null becomes empty string)i64,i32- for integersf64- for floats (integers auto-convert)bool- for booleans (SQLite’s 1/0 auto-convert)Option<T>- for nullable values
§Errors
Returns Error::ColumnNotFound if the column doesn’t exist,
or Error::TypeError if the value can’t be converted.
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 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