sea_orm

Trait TryGetable

Source
pub trait TryGetable: Sized {
    // Required method
    fn try_get_by<I: ColIdx>(
        res: &QueryResult,
        index: I,
    ) -> Result<Self, TryGetError>;

    // Provided methods
    fn try_get(
        res: &QueryResult,
        pre: &str,
        col: &str,
    ) -> Result<Self, TryGetError> { ... }
    fn try_get_by_index(
        res: &QueryResult,
        index: usize,
    ) -> Result<Self, TryGetError> { ... }
}
Expand description

An interface to get a value from the query result

Required Methodsยง

Source

fn try_get_by<I: ColIdx>( res: &QueryResult, index: I, ) -> Result<Self, TryGetError>

Get a value from the query result with an ColIdx

Provided Methodsยง

Source

fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>

Get a value from the query result with prefixed column name

Source

fn try_get_by_index( res: &QueryResult, index: usize, ) -> Result<Self, TryGetError>

Get a value from the query result based on the order in the select expressions

Dyn Compatibilityยง

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Typesยง

Sourceยง

impl TryGetable for bool

Sourceยง

impl TryGetable for f32

Sourceยง

impl TryGetable for f64

Sourceยง

impl TryGetable for i8

Sourceยง

impl TryGetable for i16

Sourceยง

impl TryGetable for i32

Sourceยง

impl TryGetable for i64

Sourceยง

impl TryGetable for u8

Sourceยง

impl TryGetable for u16

Sourceยง

impl TryGetable for u32

Sourceยง

impl TryGetable for u64

Sourceยง

impl TryGetable for String

Sourceยง

impl TryGetable for Vec<Value>

Sourceยง

impl TryGetable for Vec<bool>

Sourceยง

impl TryGetable for Vec<f32>

Sourceยง

impl TryGetable for Vec<f64>

Sourceยง

impl TryGetable for Vec<i8>

Sourceยง

impl TryGetable for Vec<i16>

Sourceยง

impl TryGetable for Vec<i32>

Sourceยง

impl TryGetable for Vec<i64>

Sourceยง

impl TryGetable for Vec<u8>

Sourceยง

impl TryGetable for Vec<u32>

Sourceยง

impl TryGetable for Vec<BigDecimal>

Sourceยง

impl TryGetable for Vec<NaiveDate>

Sourceยง

impl TryGetable for Vec<NaiveDateTime>

Sourceยง

impl TryGetable for Vec<NaiveTime>

Sourceยง

impl TryGetable for Vec<Decimal>

Sourceยง

impl TryGetable for Vec<Date>

Sourceยง

impl TryGetable for Vec<PrimitiveDateTime>

Sourceยง

impl TryGetable for Vec<OffsetDateTime>

Sourceยง

impl TryGetable for Vec<Time>

Sourceยง

impl TryGetable for Vec<Uuid>

Sourceยง

impl TryGetable for Vec<String>

Sourceยง

impl TryGetable for Vec<DateTime<FixedOffset>>

Sourceยง

impl TryGetable for Vec<DateTime<Local>>

Sourceยง

impl TryGetable for Vec<DateTime<Utc>>

Sourceยง

impl TryGetable for Vec<Braced>

Sourceยง

impl TryGetable for Vec<Hyphenated>

Sourceยง

impl TryGetable for Vec<Simple>

Sourceยง

impl TryGetable for Vec<Urn>

Sourceยง

impl TryGetable for DateTime<FixedOffset>

Sourceยง

impl TryGetable for DateTime<Local>

Sourceยง

impl TryGetable for DateTime<Utc>

Sourceยง

impl TryGetable for Braced

Sourceยง

impl TryGetable for Hyphenated

Sourceยง

impl TryGetable for Simple

Sourceยง

impl TryGetable for Urn

Sourceยง

impl<T> TryGetable for Vec<T>
where T: TryGetableArray,

Sourceยง

fn try_get_by<I: ColIdx>( res: &QueryResult, index: I, ) -> Result<Self, TryGetError>

Sourceยง

impl<T: TryGetable> TryGetable for Option<T>

Sourceยง

fn try_get_by<I: ColIdx>( res: &QueryResult, index: I, ) -> Result<Self, TryGetError>

Implementorsยง