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

    // 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>(res: &QueryResult, index: I) -> Result<Self, TryGetError>where I: ColIdx,

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

Implementations on Foreign Types§

source§

impl TryGetable for String

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<String, TryGetError>where I: ColIdx,

source§

impl TryGetable for Simple

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Simple, TryGetError>where I: ColIdx,

source§

impl TryGetable for u64

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<u64, TryGetError>where I: ColIdx,

source§

impl TryGetable for i16

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<i16, TryGetError>where I: ColIdx,

source§

impl TryGetable for u32

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<u32, TryGetError>where I: ColIdx,

source§

impl TryGetable for bool

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<bool, TryGetError>where I: ColIdx,

source§

impl TryGetable for u16

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<u16, TryGetError>where I: ColIdx,

source§

impl TryGetable for Vec<u8, Global>

source§

fn try_get_by<I>( res: &QueryResult, idx: I ) -> Result<Vec<u8, Global>, TryGetError>where I: ColIdx,

source§

impl TryGetable for DateTime<FixedOffset>

source§

impl TryGetable for Hyphenated

source§

impl TryGetable for DateTime<Utc>

source§

fn try_get_by<I>( res: &QueryResult, idx: I ) -> Result<DateTime<Utc>, TryGetError>where I: ColIdx,

source§

impl TryGetable for Urn

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Urn, TryGetError>where I: ColIdx,

source§

impl<T> TryGetable for Vec<T, Global>where T: ActiveEnum, <T as ActiveEnum>::ValueVec: TryGetable,

source§

fn try_get_by<I>( res: &QueryResult, index: I ) -> Result<Vec<T, Global>, TryGetError>where I: ColIdx,

source§

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

source§

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

source§

impl TryGetable for Braced

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Braced, TryGetError>where I: ColIdx,

source§

impl TryGetable for i64

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<i64, TryGetError>where I: ColIdx,

source§

impl TryGetable for i8

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<i8, TryGetError>where I: ColIdx,

source§

impl TryGetable for f64

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<f64, TryGetError>where I: ColIdx,

source§

impl TryGetable for f32

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<f32, TryGetError>where I: ColIdx,

source§

impl TryGetable for u8

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<u8, TryGetError>where I: ColIdx,

source§

impl TryGetable for DateTime<Local>

source§

fn try_get_by<I>( res: &QueryResult, idx: I ) -> Result<DateTime<Local>, TryGetError>where I: ColIdx,

source§

impl TryGetable for i32

source§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<i32, TryGetError>where I: ColIdx,

Implementors§