pub trait Row {
// Required methods
fn get_bool(&self, col: &str) -> Result<Option<bool>>;
fn get_i32(&self, col: &str) -> Result<Option<i32>>;
fn get_i64(&self, col: &str) -> Result<Option<i64>>;
fn get_u32(&self, col: &str) -> Result<Option<u32>>;
fn get_u64(&self, col: &str) -> Result<Option<u64>>;
fn get_f64(&self, col: &str) -> Result<Option<f64>>;
fn get_string(&self, col: &str) -> Result<Option<String>>;
fn get_bytes(&self, col: &str) -> Result<Option<Vec<u8>>>;
fn get_datetime(&self, col: &str) -> Result<Option<DateTime<Utc>>>;
fn get_naive_date(&self, col: &str) -> Result<Option<NaiveDate>>;
}Expand description
A single result row, addressed by column name. Every getter returns
Option so a NULL is distinguishable from a missing/zero value; the
non-Option FromColumn impls turn a None into a decode error.
Implementors back this with whatever their driver hands back — a
sea_orm::QueryResult, a parsed D1 JSON object, etc.
Required Methods§
fn get_bool(&self, col: &str) -> Result<Option<bool>>
fn get_i32(&self, col: &str) -> Result<Option<i32>>
fn get_i64(&self, col: &str) -> Result<Option<i64>>
fn get_u32(&self, col: &str) -> Result<Option<u32>>
fn get_u64(&self, col: &str) -> Result<Option<u64>>
fn get_f64(&self, col: &str) -> Result<Option<f64>>
fn get_string(&self, col: &str) -> Result<Option<String>>
fn get_bytes(&self, col: &str) -> Result<Option<Vec<u8>>>
fn get_datetime(&self, col: &str) -> Result<Option<DateTime<Utc>>>
fn get_naive_date(&self, col: &str) -> Result<Option<NaiveDate>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".