Skip to main content

Row

Trait Row 

Source
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§

Source

fn get_bool(&self, col: &str) -> Result<Option<bool>>

Source

fn get_i32(&self, col: &str) -> Result<Option<i32>>

Source

fn get_i64(&self, col: &str) -> Result<Option<i64>>

Source

fn get_u32(&self, col: &str) -> Result<Option<u32>>

Source

fn get_u64(&self, col: &str) -> Result<Option<u64>>

Source

fn get_f64(&self, col: &str) -> Result<Option<f64>>

Source

fn get_string(&self, col: &str) -> Result<Option<String>>

Source

fn get_bytes(&self, col: &str) -> Result<Option<Vec<u8>>>

Source

fn get_datetime(&self, col: &str) -> Result<Option<DateTime<Utc>>>

Source

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".

Implementors§