Trait diesel::query_source::Queryable
[−]
[src]
pub trait Queryable<ST, DB> where DB: Backend + HasSqlType<ST> {
type Row: FromSqlRow<ST, DB>;
fn build(row: Self::Row) -> Self;
}
Trait indicating that a record can be queried from the database. This trait
can be derived automatically using diesel_codegen
. This trait can only be derived for
structs, not enums.
Associated Types
type Row: FromSqlRow<ST, DB>
Required Methods
Implementors
impl<T, ST, DB> Queryable<Nullable<ST>, DB> for Option<T> where T: Queryable<ST, DB>,
DB: Backend + HasSqlType<ST>,
Option<T::Row>: FromSqlRow<Nullable<ST>, DB>,
ST: NotNullimpl<DB> Queryable<Bool, DB> for bool where DB: Backend + HasSqlType<Bool>,
bool: FromSqlRow<Bool, DB>impl<DB> Queryable<SmallInt, DB> for i16 where DB: Backend + HasSqlType<SmallInt>,
i16: FromSqlRow<SmallInt, DB>impl<DB> Queryable<Integer, DB> for i32 where DB: Backend + HasSqlType<Integer>,
i32: FromSqlRow<Integer, DB>impl<DB> Queryable<BigInt, DB> for i64 where DB: Backend + HasSqlType<BigInt>,
i64: FromSqlRow<BigInt, DB>impl<DB> Queryable<Float, DB> for f32 where DB: Backend + HasSqlType<Float>,
f32: FromSqlRow<Float, DB>impl<DB> Queryable<Double, DB> for f64 where DB: Backend + HasSqlType<Double>,
f64: FromSqlRow<Double, DB>impl<DB> Queryable<Text, DB> for String where DB: Backend + HasSqlType<Text>,
String: FromSqlRow<Text, DB>impl<DB> Queryable<Binary, DB> for Vec<u8> where DB: Backend + HasSqlType<Binary>,
Vec<u8>: FromSqlRow<Binary, DB>impl<A, SA, DB> Queryable<(SA,), DB> for (A,) where DB: Backend,
A: Queryable<SA, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<(SA,)>impl<A, B, SA, SB, DB> Queryable<(SA, SB), DB> for (A, B) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<(SA, SB)>impl<A, B, C, SA, SB, SC, DB> Queryable<(SA, SB, SC), DB> for (A, B, C) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<(SA, SB, SC)>impl<A, B, C, D, SA, SB, SC, SD, DB> Queryable<(SA, SB, SC, SD), DB> for (A, B, C, D) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<(SA, SB, SC, SD)>impl<A, B, C, D, E, SA, SB, SC, SD, SE, DB> Queryable<(SA, SB, SC, SD, SE), DB> for (A, B, C, D, E) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<(SA, SB, SC, SD, SE)>impl<A, B, C, D, E, F, SA, SB, SC, SD, SE, SF, DB> Queryable<(SA, SB, SC, SD, SE, SF), DB> for (A, B, C, D, E, F) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF)>impl<A, B, C, D, E, F, G, SA, SB, SC, SD, SE, SF, SG, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG), DB> for (A, B, C, D, E, F, G) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG)>impl<A, B, C, D, E, F, G, H, SA, SB, SC, SD, SE, SF, SG, SH, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG, SH), DB> for (A, B, C, D, E, F, G, H) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
H: Queryable<SH, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<SH>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG, SH)>impl<A, B, C, D, E, F, G, H, I, SA, SB, SC, SD, SE, SF, SG, SH, SI, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG, SH, SI), DB> for (A, B, C, D, E, F, G, H, I) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
H: Queryable<SH, DB>,
I: Queryable<SI, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<SH>,
DB: HasSqlType<SI>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG, SH, SI)>impl<A, B, C, D, E, F, G, H, I, J, SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ), DB> for (A, B, C, D, E, F, G, H, I, J) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
H: Queryable<SH, DB>,
I: Queryable<SI, DB>,
J: Queryable<SJ, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<SH>,
DB: HasSqlType<SI>,
DB: HasSqlType<SJ>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ)>impl<A, B, C, D, E, F, G, H, I, J, K, SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK), DB> for (A, B, C, D, E, F, G, H, I, J, K) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
H: Queryable<SH, DB>,
I: Queryable<SI, DB>,
J: Queryable<SJ, DB>,
K: Queryable<SK, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<SH>,
DB: HasSqlType<SI>,
DB: HasSqlType<SJ>,
DB: HasSqlType<SK>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK)>impl<A, B, C, D, E, F, G, H, I, J, K, L, SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL), DB> for (A, B, C, D, E, F, G, H, I, J, K, L) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
H: Queryable<SH, DB>,
I: Queryable<SI, DB>,
J: Queryable<SJ, DB>,
K: Queryable<SK, DB>,
L: Queryable<SL, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<SH>,
DB: HasSqlType<SI>,
DB: HasSqlType<SJ>,
DB: HasSqlType<SK>,
DB: HasSqlType<SL>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL)>impl<A, B, C, D, E, F, G, H, I, J, K, L, M, SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM), DB> for (A, B, C, D, E, F, G, H, I, J, K, L, M) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
H: Queryable<SH, DB>,
I: Queryable<SI, DB>,
J: Queryable<SJ, DB>,
K: Queryable<SK, DB>,
L: Queryable<SL, DB>,
M: Queryable<SM, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<SH>,
DB: HasSqlType<SI>,
DB: HasSqlType<SJ>,
DB: HasSqlType<SK>,
DB: HasSqlType<SL>,
DB: HasSqlType<SM>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM)>impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN), DB> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
H: Queryable<SH, DB>,
I: Queryable<SI, DB>,
J: Queryable<SJ, DB>,
K: Queryable<SK, DB>,
L: Queryable<SL, DB>,
M: Queryable<SM, DB>,
N: Queryable<SN, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<SH>,
DB: HasSqlType<SI>,
DB: HasSqlType<SJ>,
DB: HasSqlType<SK>,
DB: HasSqlType<SL>,
DB: HasSqlType<SM>,
DB: HasSqlType<SN>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN)>impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN, SO, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN, SO), DB> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
H: Queryable<SH, DB>,
I: Queryable<SI, DB>,
J: Queryable<SJ, DB>,
K: Queryable<SK, DB>,
L: Queryable<SL, DB>,
M: Queryable<SM, DB>,
N: Queryable<SN, DB>,
O: Queryable<SO, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<SH>,
DB: HasSqlType<SI>,
DB: HasSqlType<SJ>,
DB: HasSqlType<SK>,
DB: HasSqlType<SL>,
DB: HasSqlType<SM>,
DB: HasSqlType<SN>,
DB: HasSqlType<SO>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN, SO)>impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SP, DB> Queryable<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SP), DB> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where DB: Backend,
A: Queryable<SA, DB>,
B: Queryable<SB, DB>,
C: Queryable<SC, DB>,
D: Queryable<SD, DB>,
E: Queryable<SE, DB>,
F: Queryable<SF, DB>,
G: Queryable<SG, DB>,
H: Queryable<SH, DB>,
I: Queryable<SI, DB>,
J: Queryable<SJ, DB>,
K: Queryable<SK, DB>,
L: Queryable<SL, DB>,
M: Queryable<SM, DB>,
N: Queryable<SN, DB>,
O: Queryable<SO, DB>,
P: Queryable<SP, DB>,
DB: HasSqlType<SA>,
DB: HasSqlType<SB>,
DB: HasSqlType<SC>,
DB: HasSqlType<SD>,
DB: HasSqlType<SE>,
DB: HasSqlType<SF>,
DB: HasSqlType<SG>,
DB: HasSqlType<SH>,
DB: HasSqlType<SI>,
DB: HasSqlType<SJ>,
DB: HasSqlType<SK>,
DB: HasSqlType<SL>,
DB: HasSqlType<SM>,
DB: HasSqlType<SN>,
DB: HasSqlType<SO>,
DB: HasSqlType<SP>,
DB: HasSqlType<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SP)>impl<DB> Queryable<Date, DB> for String where DB: Backend + HasSqlType<Date>,
String: FromSqlRow<Date, DB>impl<DB> Queryable<Time, DB> for String where DB: Backend + HasSqlType<Time>,
String: FromSqlRow<Time, DB>impl<DB> Queryable<Timestamp, DB> for String where DB: Backend + HasSqlType<Timestamp>,
String: FromSqlRow<Timestamp, DB>