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§
Sourcetype IsNull: OneIsNullable<IsNullable> + OneIsNullable<NotNull>
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,
impl<T> SqlType for (T₁, T₂, …, Tₙ)where
T: SqlType,
Implementors§
Source§impl SqlType for NullValueTreatmentEnum
Available on crate feature postgres_backend only.
impl SqlType for NullValueTreatmentEnum
Available on crate feature
postgres_backend only.Source§impl SqlType for RangeBoundEnum
Available on crate feature postgres_backend only.
impl SqlType for RangeBoundEnum
Available on crate feature
postgres_backend only.Source§impl SqlType for diesel::sql_types::Timestamptz
Available on crate feature postgres_backend only.
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.
impl SqlType for diesel::sql_types::TimestamptzSqlite
Available on crate feature
sqlite only.Source§impl<ST: 'static> SqlType for Multirange<ST>
Available on crate feature postgres_backend only.
impl<ST: 'static> SqlType for Multirange<ST>
Available on crate feature
postgres_backend only.