Trait diesel::types::HasSqlType
[−]
[src]
pub trait HasSqlType<ST>: TypeMetadata { fn metadata(lookup: &Self::MetadataLookup) -> Self::TypeMetadata; fn row_metadata(
out: &mut Vec<Self::TypeMetadata>,
lookup: &Self::MetadataLookup
) { ... } }
Indicates that a SQL type exists for a backend.
Required Methods
fn metadata(lookup: &Self::MetadataLookup) -> Self::TypeMetadata
Fetch the metadata for the given type
This method may use lookup
to do dynamic runtime lookup. Implementors
of this method should not do dynamic lookup unless absolutely necessary
Provided Methods
fn row_metadata(
out: &mut Vec<Self::TypeMetadata>,
lookup: &Self::MetadataLookup
)
out: &mut Vec<Self::TypeMetadata>,
lookup: &Self::MetadataLookup
)
Fetch the metadata for a tuple representing an entire row
The default implementation of this method simply calls Self::metadata
.
You generally should not need to override this method.
However, if you are writing an implementation of HasSqlType
that
simply delegates to an inner type (for example, Nullable
does this),
then you should ensure that you delegate this method as well.
Implementors
impl<T, DB> HasSqlType<Nullable<T>> for DB where
DB: Backend + HasSqlType<T>,
T: NotNull,impl HasSqlType<Bool> for Pg
impl HasSqlType<Bool> for Sqlite
impl HasSqlType<Bool> for Mysql
impl HasSqlType<SmallInt> for Pg
impl HasSqlType<SmallInt> for Sqlite
impl HasSqlType<SmallInt> for Mysql
impl HasSqlType<Integer> for Pg
impl HasSqlType<Integer> for Sqlite
impl HasSqlType<Integer> for Mysql
impl HasSqlType<BigInt> for Pg
impl HasSqlType<BigInt> for Sqlite
impl HasSqlType<BigInt> for Mysql
impl HasSqlType<Float> for Pg
impl HasSqlType<Float> for Sqlite
impl HasSqlType<Float> for Mysql
impl HasSqlType<Double> for Pg
impl HasSqlType<Double> for Sqlite
impl HasSqlType<Double> for Mysql
impl HasSqlType<Text> for Pg
impl HasSqlType<Text> for Sqlite
impl HasSqlType<Text> for Mysql
impl HasSqlType<Binary> for Pg
impl HasSqlType<Binary> for Sqlite
impl HasSqlType<Binary> for Mysql
impl<A, DB> HasSqlType<(A,)> for DB where
DB: HasSqlType<A>,
DB: Backend,impl<A, B, DB> HasSqlType<(A, B)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: Backend,impl<A, B, C, DB> HasSqlType<(A, B, C)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: Backend,impl<A, B, C, D, DB> HasSqlType<(A, B, C, D)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: Backend,impl<A, B, C, D, E, DB> HasSqlType<(A, B, C, D, E)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: Backend,impl<A, B, C, D, E, F, DB> HasSqlType<(A, B, C, D, E, F)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: Backend,impl<A, B, C, D, E, F, G, DB> HasSqlType<(A, B, C, D, E, F, G)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: Backend,impl<A, B, C, D, E, F, G, H, DB> HasSqlType<(A, B, C, D, E, F, G, H)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: HasSqlType<H>,
DB: Backend,impl<A, B, C, D, E, F, G, H, I, DB> HasSqlType<(A, B, C, D, E, F, G, H, I)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: HasSqlType<H>,
DB: HasSqlType<I>,
DB: Backend,impl<A, B, C, D, E, F, G, H, I, J, DB> HasSqlType<(A, B, C, D, E, F, G, H, I, J)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: HasSqlType<H>,
DB: HasSqlType<I>,
DB: HasSqlType<J>,
DB: Backend,impl<A, B, C, D, E, F, G, H, I, J, K, DB> HasSqlType<(A, B, C, D, E, F, G, H, I, J, K)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: HasSqlType<H>,
DB: HasSqlType<I>,
DB: HasSqlType<J>,
DB: HasSqlType<K>,
DB: Backend,impl<A, B, C, D, E, F, G, H, I, J, K, L, DB> HasSqlType<(A, B, C, D, E, F, G, H, I, J, K, L)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: HasSqlType<H>,
DB: HasSqlType<I>,
DB: HasSqlType<J>,
DB: HasSqlType<K>,
DB: HasSqlType<L>,
DB: Backend,impl<A, B, C, D, E, F, G, H, I, J, K, L, M, DB> HasSqlType<(A, B, C, D, E, F, G, H, I, J, K, L, M)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: HasSqlType<H>,
DB: HasSqlType<I>,
DB: HasSqlType<J>,
DB: HasSqlType<K>,
DB: HasSqlType<L>,
DB: HasSqlType<M>,
DB: Backend,impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, DB> HasSqlType<(A, B, C, D, E, F, G, H, I, J, K, L, M, N)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: HasSqlType<H>,
DB: HasSqlType<I>,
DB: HasSqlType<J>,
DB: HasSqlType<K>,
DB: HasSqlType<L>,
DB: HasSqlType<M>,
DB: HasSqlType<N>,
DB: Backend,impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, DB> HasSqlType<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: HasSqlType<H>,
DB: HasSqlType<I>,
DB: HasSqlType<J>,
DB: HasSqlType<K>,
DB: HasSqlType<L>,
DB: HasSqlType<M>,
DB: HasSqlType<N>,
DB: HasSqlType<O>,
DB: Backend,impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, DB> HasSqlType<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)> for DB where
DB: HasSqlType<A>,
DB: HasSqlType<B>,
DB: HasSqlType<C>,
DB: HasSqlType<D>,
DB: HasSqlType<E>,
DB: HasSqlType<F>,
DB: HasSqlType<G>,
DB: HasSqlType<H>,
DB: HasSqlType<I>,
DB: HasSqlType<J>,
DB: HasSqlType<K>,
DB: HasSqlType<L>,
DB: HasSqlType<M>,
DB: HasSqlType<N>,
DB: HasSqlType<O>,
DB: HasSqlType<P>,
DB: Backend,impl HasSqlType<BigDecimal> for Mysql
impl HasSqlType<Tinyint> for Mysql
impl HasSqlType<Date> for Mysql
impl HasSqlType<Time> for Mysql
impl HasSqlType<Timestamp> for Mysql
impl HasSqlType<Datetime> for Mysql
impl HasSqlType<Numeric> for Mysql
impl<T> HasSqlType<Array<T>> for Pg where
Pg: HasSqlType<T>,impl HasSqlType<Int4range> for Pg
impl HasSqlType<Numrange> for Pg
impl HasSqlType<Tsrange> for Pg
impl HasSqlType<Tstzrange> for Pg
impl HasSqlType<Daterange> for Pg
impl HasSqlType<Int8range> for Pg
impl HasSqlType<Date> for Pg
impl HasSqlType<Time> for Pg
impl HasSqlType<Timestamp> for Pg
impl HasSqlType<Timestamptz> for Pg
impl HasSqlType<Interval> for Pg
impl HasSqlType<MacAddr> for Pg
impl HasSqlType<Inet> for Pg
impl HasSqlType<Cidr> for Pg
impl HasSqlType<Oid> for Pg
impl HasSqlType<Numeric> for Pg
impl HasSqlType<Uuid> for Pg
impl HasSqlType<Json> for Pg
impl HasSqlType<Jsonb> for Pg
impl HasSqlType<Money> for Pg
impl HasSqlType<Date> for Sqlite
impl HasSqlType<Time> for Sqlite
impl HasSqlType<Timestamp> for Sqlite