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. See the codegen documentation for more.
Associated Types
type Row: FromSqlRow<ST, DB>
Required Methods
fn build(row: Self::Row) -> Self
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: NotNull
impl<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<VarChar, DB> for String where DB: Backend + HasSqlType<VarChar>, String: FromSqlRow<VarChar, 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<T, ST> Queryable<Array<ST>, Pg> for Vec<T> where T: FromSql<ST, Pg> + Queryable<ST, Pg>, Pg: HasSqlType<ST>
impl<DB> Queryable<Date, DB> for PgDate where DB: Backend + HasSqlType<Date>, PgDate: FromSqlRow<Date, DB>
impl<DB> Queryable<Time, DB> for PgTime where DB: Backend + HasSqlType<Time>, PgTime: FromSqlRow<Time, DB>
impl<DB> Queryable<Timestamp, DB> for PgTimestamp where DB: Backend + HasSqlType<Timestamp>, PgTimestamp: FromSqlRow<Timestamp, DB>
impl<DB> Queryable<Interval, DB> for PgInterval where DB: Backend + HasSqlType<Interval>, PgInterval: FromSqlRow<Interval, DB>
impl<DB> Queryable<Oid, DB> for u32 where DB: Backend + HasSqlType<Oid>, u32: FromSqlRow<Oid, DB>
impl<DB> Queryable<Numeric, DB> for PgNumeric where DB: Backend + HasSqlType<Numeric>, PgNumeric: FromSqlRow<Numeric, DB>