pub struct Row /* private fields */ Implementations
Create a new row from a map of column values
Source
pub fn get<T: DeserializeOwned>(&self, column: &str) -> SqlOpResult<T>
Get a column value, returning an error if the column doesn’t exist or can’t be converted.
T- The Rust type to convert to. Supported types:- Integers:
i8,i16,i32,i64,u8,u16,u32,u64 - Floats:
f32,f64 - Boolean:
bool - String:
String - Any type implementing
DeserializeOwned
- Integers:
Source
pub fn get_opt<T: DeserializeOwned>( &self, column: &str, ) -> SqlOpResult<Option<T>>
Get a column value as an Option, returning None if the value is null.
Returns an error only if the column doesn’t exist.
Get the raw JSON value for a column
Source
pub fn has_column(&self, column: &str) -> bool
Check if a column exists in this row