SqlType

Trait SqlType 

Source
pub trait SqlType: 'static {
    type IsNull: OneIsNullable<IsNullable> + OneIsNullable<NotNull>;
}
Expand description

A marker trait for SQL types

§Deriving

This trait is automatically implemented by #[derive(SqlType)] which sets IsNull to is_nullable::NotNull

Required Associated Types§

Source

type IsNull: OneIsNullable<IsNullable> + OneIsNullable<NotNull>

Is this type nullable?

This type should always be one of the structs in the ’is_nullable` module. See the documentation of those structs for more details.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> SqlType for (T₁, T₂, …, Tₙ)
where T: SqlType,

Implementors§

Source§

impl SqlType for BigInt

Source§

impl SqlType for Binary

Source§

impl SqlType for Bool

Source§

impl SqlType for CChar

Available on crate feature postgres_backend only.
Source§

impl SqlType for Cidr

Available on crate feature postgres_backend only.
Source§

impl SqlType for Citext

Available on crate feature postgres_backend only.
Source§

impl SqlType for Date

Source§

impl SqlType for Datetime

Available on crate feature mysql_backend only.
Source§

impl SqlType for Double

Source§

impl SqlType for Float

Source§

impl SqlType for Inet

Available on crate feature postgres_backend only.
Source§

impl SqlType for Integer

Source§

impl SqlType for Interval

Source§

impl SqlType for Json

Source§

impl SqlType for Jsonb

Source§

impl SqlType for MacAddr8

Available on crate feature postgres_backend only.
Source§

impl SqlType for MacAddr

Available on crate feature postgres_backend only.
Source§

impl SqlType for Money

Available on crate feature postgres_backend only.
Source§

impl SqlType for NullValueTreatmentEnum

Available on crate feature postgres_backend only.
Source§

impl SqlType for Numeric

Source§

impl SqlType for Oid

Available on crate feature postgres_backend only.
Source§

impl SqlType for PgLsn

Available on crate feature postgres_backend only.
Source§

impl SqlType for RangeBoundEnum

Available on crate feature postgres_backend only.
Source§

impl SqlType for SmallInt

Source§

impl SqlType for Text

Source§

impl SqlType for Time

Source§

impl SqlType for Timestamp

Source§

impl SqlType for diesel::sql_types::Timestamptz

Available on crate feature postgres_backend only.
Source§

impl SqlType for diesel::sql_types::TimestamptzSqlite

Available on crate feature sqlite only.
Source§

impl SqlType for TinyInt

Source§

impl SqlType for Uuid

Available on crate feature postgres_backend only.
Source§

impl<ST> SqlType for Nullable<ST>
where ST: SqlType,

Source§

impl<ST: 'static> SqlType for Array<ST>

Available on crate feature postgres_backend only.
Source§

impl<ST: 'static> SqlType for Multirange<ST>

Available on crate feature postgres_backend only.
Source§

impl<ST: 'static> SqlType for Range<ST>

Available on crate feature postgres_backend only.
Source§

impl<ST: 'static> SqlType for Record<ST>

Available on crate feature postgres_backend only.
Source§

impl<ST: 'static> SqlType for Unsigned<ST>

Available on crate feature mysql_backend only.