Trait rocket_db_pools::diesel::prelude::Queryable

source ·
pub trait Queryable<ST, DB>: Sized
where DB: Backend,
{ type Row: FromStaticSqlRow<ST, DB>; // Required method fn build(row: Self::Row) -> Result<Self, Box<dyn Error + Sync + Send>>; }
Expand description

Trait indicating that a record can be queried from the database.

Types which implement Queryable represent the result of a SQL query. This does not necessarily mean they represent a single database table.

Diesel represents the return type of a query as a tuple. The purpose of this trait is to convert from a tuple of Rust values that have been deserialized into your struct.

This trait can be derived

§How to resolve compiler errors while loading data from the database

In case you getting uncomprehensable compiler errors while loading data from the database you might want to consider using #[derive(Selectable)] + #[diesel(check_for_backend(YourBackendType))] to check for mismatching fields at compile time. This drastically improves the quality of the generated error messages by pointing to concrete mismatches at field level. You need to specify the concrete database backend this specific struct is indented to be used with, as otherwise rustc cannot correctly identify the required deserialization implementation.

§Interaction with NULL/Option

Nullable types can be queried into Option. This is valid for single fields, tuples, and structures with Queryable.

With tuples and structs, the process for deserializing an Option<(A,B,C)> is to attempt to deserialize A, B and C, and if either of these return an UnexpectedNullError, the Option will be deserialized as None. If all succeed, the Option will be deserialized as Some((a,b,c)).

§Examples

§Simple mapping from query to struct

If we just want to map a query to our struct, we can use derive.

#[derive(Queryable, PartialEq, Debug)]
struct User {
    id: i32,
    name: String,
}

let first_user = users.order_by(id).first(connection)?;
let expected = User { id: 1, name: "Sean".into() };
assert_eq!(expected, first_user);

§Interaction with NULL/Option

§Single field

table! {
    animals {
        id -> Integer,
        species -> VarChar,
        legs -> Integer,
        name -> Nullable<VarChar>,
    }
}
#[derive(Queryable, PartialEq, Debug)]
struct Animal {
    id: i32,
    name: Option<String>,
}

let all_animals = animals.select((id, name)).order_by(id).load(connection)?;
let expected = vec![Animal { id: 1, name: Some("Jack".to_owned()) }, Animal { id: 2, name: None }];
assert_eq!(expected, all_animals);

§Multiple fields

#[derive(Queryable, PartialEq, Debug)]
struct UserWithPost {
    id: i32,
    post: Option<Post>,
}
#[derive(Queryable, PartialEq, Debug)]
struct Post {
    id: i32,
    title: String,
}

let all_posts = users::table
    .left_join(posts::table)
    .select((
        users::id,
        (posts::id, posts::title).nullable()
    ))
    .order_by((users::id, posts::id))
    .load(connection)?;
let expected = vec![
    UserWithPost { id: 1, post: Some(Post { id: 1, title: "My first post".to_owned() }) },
    UserWithPost { id: 1, post: Some(Post { id: 2, title: "About Rust".to_owned() }) },
    UserWithPost { id: 2, post: Some(Post { id: 3, title: "My first post too".to_owned() }) },
    UserWithPost { id: 3, post: None },
];
assert_eq!(expected, all_posts);

§deserialize_as attribute

If we want to do additional work during deserialization, we can use deserialize_as to use a different implementation.

struct LowercaseString(String);

impl Into<String> for LowercaseString {
    fn into(self) -> String {
        self.0
    }
}

impl<DB> Queryable<Text, DB> for LowercaseString
where
    DB: Backend,
    String: FromSql<Text, DB>,
{
    type Row = String;

    fn build(s: String) -> deserialize::Result<Self> {
        Ok(LowercaseString(s.to_lowercase()))
    }
}

#[derive(Queryable, PartialEq, Debug)]
struct User {
    id: i32,
    #[diesel(deserialize_as = LowercaseString)]
    name: String,
}

let first_user = users.first(connection)?;
let expected = User { id: 1, name: "sean".into() };
assert_eq!(expected, first_user);

§Manual implementation

Alternatively, we can implement the trait for our struct manually.

use schema::users;
use diesel::deserialize::{self, Queryable};

type DB = diesel::sqlite::Sqlite;

#[derive(PartialEq, Debug)]
struct User {
    id: i32,
    name: String,
}

impl Queryable<users::SqlType, DB> for User {
    type Row = (i32, String);

    fn build(row: Self::Row) -> deserialize::Result<Self> {
        Ok(User {
            id: row.0,
            name: row.1.to_lowercase(),
        })
    }
}

let first_user = users.first(connection)?;
let expected = User { id: 1, name: "sean".into() };
assert_eq!(expected, first_user);

Required Associated Types§

source

type Row: FromStaticSqlRow<ST, DB>

The Rust type you’d like to map from.

This is typically a tuple of all of your struct’s fields.

Required Methods§

source

fn build(row: Self::Row) -> Result<Self, Box<dyn Error + Sync + Send>>

Construct an instance of this type

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Queryable<Binary, Mysql> for *const [u8]

source§

impl Queryable<Binary, Pg> for *const [u8]

source§

impl Queryable<Binary, Sqlite> for *const [u8]

source§

impl Queryable<Text, Mysql> for *const str

source§

impl Queryable<Text, Pg> for *const str

source§

impl Queryable<Text, Sqlite> for *const str

source§

impl<'a, T, ST, DB> Queryable<ST, DB> for Cow<'a, T>
where T: 'a + ToOwned + ?Sized, ST: SingleValue, DB: Backend, Cow<'a, T>: FromSql<ST, DB>,

source§

type Row = Cow<'a, T>

source§

fn build( row: <Cow<'a, T> as Queryable<ST, DB>>::Row, ) -> Result<Cow<'a, T>, Box<dyn Error + Sync + Send>>

source§

impl<ST, T, DB> Queryable<ST, DB> for Option<T>
where ST: SingleValue<IsNull = IsNullable>, DB: Backend, Option<T>: FromSql<ST, DB>,

source§

type Row = Option<T>

source§

fn build( row: <Option<T> as Queryable<ST, DB>>::Row, ) -> Result<Option<T>, Box<dyn Error + Sync + Send>>

source§

impl<T0, ST0> Queryable<Record<(ST0,)>, Pg> for (T0,)

source§

impl<T0, T1, ST0, ST1> Queryable<Record<(ST0, ST1)>, Pg> for (T0, T1)

source§

impl<T0, T1, T2, ST0, ST1, ST2> Queryable<Record<(ST0, ST1, ST2)>, Pg> for (T0, T1, T2)

source§

impl<T0, T1, T2, T3, ST0, ST1, ST2, ST3> Queryable<Record<(ST0, ST1, ST2, ST3)>, Pg> for (T0, T1, T2, T3)

source§

impl<T0, T1, T2, T3, T4, ST0, ST1, ST2, ST3, ST4> Queryable<Record<(ST0, ST1, ST2, ST3, ST4)>, Pg> for (T0, T1, T2, T3, T4)

source§

impl<T0, T1, T2, T3, T4, T5, ST0, ST1, ST2, ST3, ST4, ST5> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5)>, Pg> for (T0, T1, T2, T3, T4, T5)

source§

impl<T0, T1, T2, T3, T4, T5, T6, ST0, ST1, ST2, ST3, ST4, ST5, ST6> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6)>, Pg> for (T0, T1, T2, T3, T4, T5, T6)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15> Queryable<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15), __DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14), __DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13), __DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12), __DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11), __DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10), __DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9), __DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8), __DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7), __DB> for (T0, T1, T2, T3, T4, T5, T6, T7)

source§

impl<T0, T1, T2, T3, T4, T5, T6, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6), __DB> for (T0, T1, T2, T3, T4, T5, T6)

source§

impl<T0, T1, T2, T3, T4, T5, __DB, ST0, ST1, ST2, ST3, ST4, ST5> Queryable<(ST0, ST1, ST2, ST3, ST4, ST5), __DB> for (T0, T1, T2, T3, T4, T5)

source§

impl<T0, T1, T2, T3, T4, __DB, ST0, ST1, ST2, ST3, ST4> Queryable<(ST0, ST1, ST2, ST3, ST4), __DB> for (T0, T1, T2, T3, T4)

source§

impl<T0, T1, T2, T3, __DB, ST0, ST1, ST2, ST3> Queryable<(ST0, ST1, ST2, ST3), __DB> for (T0, T1, T2, T3)

source§

impl<T0, T1, T2, __DB, ST0, ST1, ST2> Queryable<(ST0, ST1, ST2), __DB> for (T0, T1, T2)

source§

impl<T0, T1, __DB, ST0, ST1> Queryable<(ST0, ST1), __DB> for (T0, T1)

source§

impl<T0, __DB, ST0> Queryable<(ST0,), __DB> for (T0,)
where __DB: Backend, (T0,): FromStaticSqlRow<(ST0,), __DB>,

source§

type Row = (T0,)

source§

fn build( row: <(T0,) as Queryable<(ST0,), __DB>>::Row, ) -> Result<(T0,), Box<dyn Error + Sync + Send>>

source§

impl<T, ST> Queryable<Range<ST>, Pg> for (Bound<T>, Bound<T>)
where T: FromSql<ST, Pg>,

source§

type Row = (Bound<T>, Bound<T>)

source§

fn build( row: (Bound<T>, Bound<T>), ) -> Result<(Bound<T>, Bound<T>), Box<dyn Error + Sync + Send>>

source§

impl<T, __DB, __ST> Queryable<__ST, __DB> for Vec<T>
where __DB: Backend, __ST: SingleValue, Vec<T>: FromSql<__ST, __DB>,

source§

type Row = Vec<T>

source§

fn build( row: <Vec<T> as Queryable<__ST, __DB>>::Row, ) -> Result<Vec<T>, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for bool
where __DB: Backend, __ST: SingleValue, bool: FromSql<__ST, __DB>,

source§

type Row = bool

source§

fn build( row: <bool as Queryable<__ST, __DB>>::Row, ) -> Result<bool, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for f32
where __DB: Backend, __ST: SingleValue, f32: FromSql<__ST, __DB>,

source§

type Row = f32

source§

fn build( row: <f32 as Queryable<__ST, __DB>>::Row, ) -> Result<f32, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for f64
where __DB: Backend, __ST: SingleValue, f64: FromSql<__ST, __DB>,

source§

type Row = f64

source§

fn build( row: <f64 as Queryable<__ST, __DB>>::Row, ) -> Result<f64, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for i8
where __DB: Backend, __ST: SingleValue, i8: FromSql<__ST, __DB>,

source§

type Row = i8

source§

fn build( row: <i8 as Queryable<__ST, __DB>>::Row, ) -> Result<i8, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for i16
where __DB: Backend, __ST: SingleValue, i16: FromSql<__ST, __DB>,

source§

type Row = i16

source§

fn build( row: <i16 as Queryable<__ST, __DB>>::Row, ) -> Result<i16, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for i32
where __DB: Backend, __ST: SingleValue, i32: FromSql<__ST, __DB>,

source§

type Row = i32

source§

fn build( row: <i32 as Queryable<__ST, __DB>>::Row, ) -> Result<i32, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for i64
where __DB: Backend, __ST: SingleValue, i64: FromSql<__ST, __DB>,

source§

type Row = i64

source§

fn build( row: <i64 as Queryable<__ST, __DB>>::Row, ) -> Result<i64, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for u8
where __DB: Backend, __ST: SingleValue, u8: FromSql<__ST, __DB>,

source§

type Row = u8

source§

fn build( row: <u8 as Queryable<__ST, __DB>>::Row, ) -> Result<u8, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for u16
where __DB: Backend, __ST: SingleValue, u16: FromSql<__ST, __DB>,

source§

type Row = u16

source§

fn build( row: <u16 as Queryable<__ST, __DB>>::Row, ) -> Result<u16, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for u32
where __DB: Backend, __ST: SingleValue, u32: FromSql<__ST, __DB>,

source§

type Row = u32

source§

fn build( row: <u32 as Queryable<__ST, __DB>>::Row, ) -> Result<u32, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for u64
where __DB: Backend, __ST: SingleValue, u64: FromSql<__ST, __DB>,

source§

type Row = u64

source§

fn build( row: <u64 as Queryable<__ST, __DB>>::Row, ) -> Result<u64, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for String
where __DB: Backend, __ST: SingleValue, String: FromSql<__ST, __DB>,

source§

type Row = String

source§

fn build( row: <String as Queryable<__ST, __DB>>::Row, ) -> Result<String, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for SystemTime
where __DB: Backend, __ST: SingleValue, SystemTime: FromSql<__ST, __DB>,

source§

type Row = SystemTime

source§

fn build( row: <SystemTime as Queryable<__ST, __DB>>::Row, ) -> Result<SystemTime, Box<dyn Error + Sync + Send>>

source§

impl<__DB, __ST> Queryable<__ST, __DB> for [u8; 6]
where __DB: Backend, __ST: SingleValue, [u8; 6]: FromSql<__ST, __DB>,

source§

type Row = [u8; 6]

source§

fn build( row: <[u8; 6] as Queryable<__ST, __DB>>::Row, ) -> Result<[u8; 6], Box<dyn Error + Sync + Send>>

source§

impl<__T, __DB, ST0> Queryable<Nullable<(ST0,)>, __DB> for Option<__T>

source§

type Row = Option<__T>

source§

fn build( row: <Option<__T> as Queryable<Nullable<(ST0,)>, __DB>>::Row, ) -> Result<Option<__T>, Box<dyn Error + Sync + Send>>

source§

impl<__T, __DB, ST0, ST1> Queryable<Nullable<(ST0, ST1)>, __DB> for Option<__T>

source§

type Row = Option<__T>

source§

fn build( row: <Option<__T> as Queryable<Nullable<(ST0, ST1)>, __DB>>::Row, ) -> Result<Option<__T>, Box<dyn Error + Sync + Send>>

source§

impl<__T, __DB, ST0, ST1, ST2> Queryable<Nullable<(ST0, ST1, ST2)>, __DB> for Option<__T>

source§

type Row = Option<__T>

source§

fn build( row: <Option<__T> as Queryable<Nullable<(ST0, ST1, ST2)>, __DB>>::Row, ) -> Result<Option<__T>, Box<dyn Error + Sync + Send>>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3> Queryable<Nullable<(ST0, ST1, ST2, ST3)>, __DB> for Option<__T>

source§

type Row = Option<__T>

source§

fn build( row: <Option<__T> as Queryable<Nullable<(ST0, ST1, ST2, ST3)>, __DB>>::Row, ) -> Result<Option<__T>, Box<dyn Error + Sync + Send>>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4)>, __DB> for Option<__T>

source§

type Row = Option<__T>

source§

fn build( row: <Option<__T> as Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4)>, __DB>>::Row, ) -> Result<Option<__T>, Box<dyn Error + Sync + Send>>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14)>, __DB> for Option<__T>

source§

impl<__T, __DB, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15> Queryable<Nullable<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15)>, __DB> for Option<__T>

Implementors§

source§

impl<'a, __DB, __ST> Queryable<__ST, __DB> for MigrationVersion<'a>
where __DB: Backend, __ST: SingleValue, MigrationVersion<'a>: FromSql<__ST, __DB>,

source§

impl<__DB, __ST> Queryable<__ST, __DB> for PgNumeric
where __DB: Backend, __ST: SingleValue, PgNumeric: FromSql<__ST, __DB>,

source§

impl<__DB, __ST> Queryable<__ST, __DB> for MysqlTime
where __DB: Backend, __ST: SingleValue, MysqlTime: FromSql<__ST, __DB>,

source§

impl<__DB, __ST> Queryable<__ST, __DB> for PgDate
where __DB: Backend, __ST: SingleValue, PgDate: FromSql<__ST, __DB>,

source§

impl<__DB, __ST> Queryable<__ST, __DB> for PgInterval
where __DB: Backend, __ST: SingleValue, PgInterval: FromSql<__ST, __DB>,

source§

impl<__DB, __ST> Queryable<__ST, __DB> for PgTime
where __DB: Backend, __ST: SingleValue, PgTime: FromSql<__ST, __DB>,

source§

impl<__DB, __ST> Queryable<__ST, __DB> for PgTimestamp
where __DB: Backend, __ST: SingleValue, PgTimestamp: FromSql<__ST, __DB>,

source§

impl<__DB, __ST> Queryable<__ST, __DB> for PgMoney
where __DB: Backend, __ST: SingleValue, PgMoney: FromSql<__ST, __DB>,