[][src]Struct diesel::sql_types::Nullable

pub struct Nullable<ST: NotNull>(_);

The nullable SQL type.

This wraps another SQL type to indicate that it can be null. By default all values are assumed to be NOT NULL.

ToSql impls

FromSql impls

Trait Implementations

impl<T, ST, DB> Queryable<Nullable<ST>, DB> for Option<T> where
    T: Queryable<ST, DB>,
    DB: Backend,
    Option<T::Row>: FromSqlRow<Nullable<ST>, DB>,
    ST: NotNull
[src]

type Row = Option<T::Row>

The Rust type you'd like to map from. Read more

impl<T, ST, DB> FromSql<Nullable<ST>, DB> for Option<T> where
    T: FromSql<ST, DB>,
    DB: Backend,
    ST: NotNull
[src]

impl<T, ST, DB> FromSqlRow<Nullable<ST>, DB> for Option<T> where
    T: FromSqlRow<ST, DB>,
    DB: Backend,
    ST: NotNull
[src]

impl AsExpression<Nullable<Timestamp>> for now[src]

type Expression = Coerce<now, Nullable<Timestamp>>

The expression being returned

impl<'expr> AsExpression<Nullable<Timestamp>> for &'expr SystemTime[src]

type Expression = Bound<Nullable<Timestamp>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Timestamp>> for &'expr2 &'expr SystemTime[src]

type Expression = Bound<Nullable<Timestamp>, Self>

The expression being returned

impl AsExpression<Nullable<Timestamp>> for SystemTime[src]

type Expression = Bound<Nullable<Timestamp>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Date>> for &'expr NaiveDate[src]

type Expression = Bound<Nullable<Date>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Date>> for &'expr2 &'expr NaiveDate[src]

type Expression = Bound<Nullable<Date>, Self>

The expression being returned

impl AsExpression<Nullable<Date>> for NaiveDate[src]

type Expression = Bound<Nullable<Date>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Time>> for &'expr NaiveTime[src]

type Expression = Bound<Nullable<Time>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Time>> for &'expr2 &'expr NaiveTime[src]

type Expression = Bound<Nullable<Time>, Self>

The expression being returned

impl AsExpression<Nullable<Time>> for NaiveTime[src]

type Expression = Bound<Nullable<Time>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Timestamp>> for &'expr NaiveDateTime[src]

type Expression = Bound<Nullable<Timestamp>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Timestamp>> for &'expr2 &'expr NaiveDateTime[src]

type Expression = Bound<Nullable<Timestamp>, Self>

The expression being returned

impl AsExpression<Nullable<Timestamp>> for NaiveDateTime[src]

type Expression = Bound<Nullable<Timestamp>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Datetime>> for &'expr NaiveDateTime[src]

type Expression = Bound<Nullable<Datetime>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Datetime>> for &'expr2 &'expr NaiveDateTime[src]

type Expression = Bound<Nullable<Datetime>, Self>

The expression being returned

impl AsExpression<Nullable<Datetime>> for NaiveDateTime[src]

type Expression = Bound<Nullable<Datetime>, Self>

The expression being returned

impl<T, ST> AsExpression<Nullable<ST>> for Option<T> where
    ST: NotNull
[src]

type Expression = Bound<Nullable<ST>, Self>

The expression being returned

impl<'a, T, ST> AsExpression<Nullable<ST>> for &'a Option<T> where
    ST: NotNull
[src]

type Expression = Bound<Nullable<ST>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Bool>> for &'expr bool[src]

type Expression = Bound<Nullable<Bool>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Bool>> for &'expr2 &'expr bool[src]

type Expression = Bound<Nullable<Bool>, Self>

The expression being returned

impl AsExpression<Nullable<Bool>> for bool[src]

type Expression = Bound<Nullable<Bool>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<TinyInt>> for &'expr i8[src]

type Expression = Bound<Nullable<TinyInt>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<TinyInt>> for &'expr2 &'expr i8[src]

type Expression = Bound<Nullable<TinyInt>, Self>

The expression being returned

impl AsExpression<Nullable<TinyInt>> for i8[src]

type Expression = Bound<Nullable<TinyInt>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<SmallInt>> for &'expr i16[src]

type Expression = Bound<Nullable<SmallInt>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<SmallInt>> for &'expr2 &'expr i16[src]

type Expression = Bound<Nullable<SmallInt>, Self>

The expression being returned

impl AsExpression<Nullable<SmallInt>> for i16[src]

type Expression = Bound<Nullable<SmallInt>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Integer>> for &'expr i32[src]

type Expression = Bound<Nullable<Integer>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Integer>> for &'expr2 &'expr i32[src]

type Expression = Bound<Nullable<Integer>, Self>

The expression being returned

impl AsExpression<Nullable<Integer>> for i32[src]

type Expression = Bound<Nullable<Integer>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<BigInt>> for &'expr i64[src]

type Expression = Bound<Nullable<BigInt>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<BigInt>> for &'expr2 &'expr i64[src]

type Expression = Bound<Nullable<BigInt>, Self>

The expression being returned

impl AsExpression<Nullable<BigInt>> for i64[src]

type Expression = Bound<Nullable<BigInt>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Unsigned<TinyInt>>> for &'expr u8[src]

type Expression = Bound<Nullable<Unsigned<TinyInt>>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Unsigned<TinyInt>>> for &'expr2 &'expr u8[src]

type Expression = Bound<Nullable<Unsigned<TinyInt>>, Self>

The expression being returned

impl AsExpression<Nullable<Unsigned<TinyInt>>> for u8[src]

type Expression = Bound<Nullable<Unsigned<TinyInt>>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Unsigned<SmallInt>>> for &'expr u16[src]

type Expression = Bound<Nullable<Unsigned<SmallInt>>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Unsigned<SmallInt>>> for &'expr2 &'expr u16[src]

type Expression = Bound<Nullable<Unsigned<SmallInt>>, Self>

The expression being returned

impl AsExpression<Nullable<Unsigned<SmallInt>>> for u16[src]

type Expression = Bound<Nullable<Unsigned<SmallInt>>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Unsigned<Integer>>> for &'expr u32[src]

type Expression = Bound<Nullable<Unsigned<Integer>>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Unsigned<Integer>>> for &'expr2 &'expr u32[src]

type Expression = Bound<Nullable<Unsigned<Integer>>, Self>

The expression being returned

impl AsExpression<Nullable<Unsigned<Integer>>> for u32[src]

type Expression = Bound<Nullable<Unsigned<Integer>>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Unsigned<BigInt>>> for &'expr u64[src]

type Expression = Bound<Nullable<Unsigned<BigInt>>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Unsigned<BigInt>>> for &'expr2 &'expr u64[src]

type Expression = Bound<Nullable<Unsigned<BigInt>>, Self>

The expression being returned

impl AsExpression<Nullable<Unsigned<BigInt>>> for u64[src]

type Expression = Bound<Nullable<Unsigned<BigInt>>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Float>> for &'expr f32[src]

type Expression = Bound<Nullable<Float>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Float>> for &'expr2 &'expr f32[src]

type Expression = Bound<Nullable<Float>, Self>

The expression being returned

impl AsExpression<Nullable<Float>> for f32[src]

type Expression = Bound<Nullable<Float>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Double>> for &'expr f64[src]

type Expression = Bound<Nullable<Double>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Double>> for &'expr2 &'expr f64[src]

type Expression = Bound<Nullable<Double>, Self>

The expression being returned

impl AsExpression<Nullable<Double>> for f64[src]

type Expression = Bound<Nullable<Double>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Text>> for &'expr String[src]

type Expression = Bound<Nullable<Text>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Text>> for &'expr2 &'expr String[src]

type Expression = Bound<Nullable<Text>, Self>

The expression being returned

impl AsExpression<Nullable<Text>> for String[src]

type Expression = Bound<Nullable<Text>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Text>> for &'expr str[src]

type Expression = Bound<Nullable<Text>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Text>> for &'expr2 &'expr str[src]

type Expression = Bound<Nullable<Text>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Binary>> for &'expr Vec<u8>[src]

type Expression = Bound<Nullable<Binary>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Binary>> for &'expr2 &'expr Vec<u8>[src]

type Expression = Bound<Nullable<Binary>, Self>

The expression being returned

impl AsExpression<Nullable<Binary>> for Vec<u8>[src]

type Expression = Bound<Nullable<Binary>, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Binary>> for &'expr [u8][src]

type Expression = Bound<Nullable<Binary>, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Nullable<Binary>> for &'expr2 &'expr [u8][src]

type Expression = Bound<Nullable<Binary>, Self>

The expression being returned

impl<T> QueryId for Nullable<T> where
    T: QueryId + NotNull
[src]

type QueryId = T::QueryId

A type which uniquely represents Self in a SQL query. Read more

fn query_id() -> Option<TypeId>[src]

Returns the type id of Self::QueryId if Self::HAS_STATIC_QUERY_ID. Returns None otherwise. Read more

impl<__DB> ToSql<Nullable<Timestamp>, __DB> for SystemTime where
    __DB: Backend,
    Self: ToSql<Timestamp, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Date>, __DB> for NaiveDate where
    __DB: Backend,
    Self: ToSql<Date, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Time>, __DB> for NaiveTime where
    __DB: Backend,
    Self: ToSql<Time, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Timestamp>, __DB> for NaiveDateTime where
    __DB: Backend,
    Self: ToSql<Timestamp, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Datetime>, __DB> for NaiveDateTime where
    __DB: Backend,
    Self: ToSql<Datetime, __DB>, 
[src]

impl<T, ST, DB> ToSql<Nullable<ST>, DB> for Option<T> where
    T: ToSql<ST, DB>,
    DB: Backend,
    ST: NotNull
[src]

impl<__DB> ToSql<Nullable<Bool>, __DB> for bool where
    __DB: Backend,
    Self: ToSql<Bool, __DB>, 
[src]

impl<__DB> ToSql<Nullable<TinyInt>, __DB> for i8 where
    __DB: Backend,
    Self: ToSql<TinyInt, __DB>, 
[src]

impl<__DB> ToSql<Nullable<SmallInt>, __DB> for i16 where
    __DB: Backend,
    Self: ToSql<SmallInt, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Integer>, __DB> for i32 where
    __DB: Backend,
    Self: ToSql<Integer, __DB>, 
[src]

impl<__DB> ToSql<Nullable<BigInt>, __DB> for i64 where
    __DB: Backend,
    Self: ToSql<BigInt, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Unsigned<TinyInt>>, __DB> for u8 where
    __DB: Backend,
    Self: ToSql<Unsigned<TinyInt>, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Unsigned<SmallInt>>, __DB> for u16 where
    __DB: Backend,
    Self: ToSql<Unsigned<SmallInt>, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Unsigned<Integer>>, __DB> for u32 where
    __DB: Backend,
    Self: ToSql<Unsigned<Integer>, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Unsigned<BigInt>>, __DB> for u64 where
    __DB: Backend,
    Self: ToSql<Unsigned<BigInt>, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Float>, __DB> for f32 where
    __DB: Backend,
    Self: ToSql<Float, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Double>, __DB> for f64 where
    __DB: Backend,
    Self: ToSql<Double, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Text>, __DB> for String where
    __DB: Backend,
    Self: ToSql<Text, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Text>, __DB> for str where
    __DB: Backend,
    Self: ToSql<Text, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Binary>, __DB> for Vec<u8> where
    __DB: Backend,
    Self: ToSql<Binary, __DB>, 
[src]

impl<__DB> ToSql<Nullable<Binary>, __DB> for [u8] where
    __DB: Backend,
    Self: ToSql<Binary, __DB>, 
[src]

impl<T> Foldable for Nullable<T> where
    T: Foldable + NotNull
[src]

type Sum = T::Sum

The SQL type of sum(this_type)

type Avg = T::Avg

The SQL type of avg(this_type)

impl<T> Add for Nullable<T> where
    T: Add + NotNull,
    T::Rhs: NotNull,
    T::Output: NotNull
[src]

type Rhs = Nullable<T::Rhs>

The SQL type which can be added to this one

type Output = Nullable<T::Output>

The SQL type of the result of adding Rhs to Self

impl<T> Sub for Nullable<T> where
    T: Sub + NotNull,
    T::Rhs: NotNull,
    T::Output: NotNull
[src]

type Rhs = Nullable<T::Rhs>

The SQL type which can be subtracted from this one

type Output = Nullable<T::Output>

The SQL type of the result of subtracting Rhs from Self

impl<T> Mul for Nullable<T> where
    T: Mul + NotNull,
    T::Rhs: NotNull,
    T::Output: NotNull
[src]

type Rhs = Nullable<T::Rhs>

The SQL type which this can be multiplied by

type Output = Nullable<T::Output>

The SQL type of the result of multiplying Self by Rhs

impl<T> Div for Nullable<T> where
    T: Div + NotNull,
    T::Rhs: NotNull,
    T::Output: NotNull
[src]

type Rhs = Nullable<T::Rhs>

The SQL type which this one can be divided by

type Output = Nullable<T::Output>

The SQL type of the result of dividing Self by Rhs

impl<T: SqlOrd + NotNull> SqlOrd for Nullable<T>[src]

impl<T, DB> HasSqlType<Nullable<T>> for DB where
    DB: Backend + HasSqlType<T>,
    T: NotNull
[src]

impl<T: NotNull> IntoNullable for Nullable<T>[src]

type Nullable = Nullable<T>

The nullable representation of this type. Read more

impl<T: NotNull + SingleValue> SingleValue for Nullable<T>[src]

impl<ST: Copy + NotNull> Copy for Nullable<ST>[src]

impl<ST: Default + NotNull> Default for Nullable<ST>[src]

impl<ST: Clone + NotNull> Clone for Nullable<ST>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<ST: Debug + NotNull> Debug for Nullable<ST>[src]

Auto Trait Implementations

impl<ST> Unpin for Nullable<ST> where
    ST: Unpin

impl<ST> Sync for Nullable<ST> where
    ST: Sync

impl<ST> Send for Nullable<ST> where
    ST: Send

impl<ST> UnwindSafe for Nullable<ST> where
    ST: UnwindSafe

impl<ST> RefUnwindSafe for Nullable<ST> where
    ST: RefUnwindSafe

Blanket Implementations

impl<T> IntoSql for T[src]

fn into_sql<T>(self) -> AsExprOf<Self, T> where
    Self: AsExpression<T> + Sized
[src]

Convert self to an expression for Diesel's query builder. Read more

fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
    &'a Self: AsExpression<T>, 
[src]

Convert &self to an expression for Diesel's query builder. Read more

impl<T> IntoNullable for T where
    T: NotNull
[src]

type Nullable = Nullable<T>

The nullable representation of this type. Read more

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, DB> HasSqlType<Nullable<T>> for DB where
    DB: Backend + HasSqlType<T>,
    T: NotNull
[src]