diesel::sql_types

Struct Nullable

Source
pub struct Nullable<ST: NotNull>(/* private fields */);
Expand description

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

  • Any T which implements ToSql<ST>
  • Option<T> for any T which implements ToSql<ST>

§FromSql impls

  • Option<T> for any T which implements FromSql<ST>

Trait Implementations§

Source§

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

Source§

type Rhs = Nullable<<T as Add>::Rhs>

The SQL type which can be added to this one
Source§

type Output = Nullable<<T as Add>::Output>

The SQL type of the result of adding Rhs to Self
Source§

impl<'a, 'b, ST, T> AsExpression<Nullable<Array<ST>>> for &'a &'b [T]

Source§

type Expression = Bound<Nullable<Array<ST>>, &'a &'b [T]>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'a, 'b, ST, T> AsExpression<Nullable<Array<ST>>> for &'a &'b Vec<T>

Source§

type Expression = Bound<Nullable<Array<ST>>, &'a &'b Vec<T>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'a, 'b, ST, T> AsExpression<Nullable<Array<ST>>> for &'a [T]

Source§

type Expression = Bound<Nullable<Array<ST>>, &'a [T]>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'a, 'b, ST, T> AsExpression<Nullable<Array<ST>>> for &'a Vec<T>

Source§

type Expression = Bound<Nullable<Array<ST>>, &'a Vec<T>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'a, 'b, ST, T> AsExpression<Nullable<Array<ST>>> for Vec<T>

Source§

type Expression = Bound<Nullable<Array<ST>>, Vec<T>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<BigInt>, &'expr2 &'expr i64>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<BigInt>> for &'expr i64

Source§

type Expression = Bound<Nullable<BigInt>, &'expr i64>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<BigInt>> for i64

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Binary>, &'expr2 &'expr [u8]>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Binary>, &'expr2 &'expr Vec<u8>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Binary>, &'expr [u8]>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Binary>, &'expr Vec<u8>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Binary>> for Vec<u8>

Source§

type Expression = Bound<Nullable<Binary>, Vec<u8>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Bool>, &'expr2 &'expr bool>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Bool>> for &'expr bool

Source§

type Expression = Bound<Nullable<Bool>, &'expr bool>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Bool>> for bool

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Cidr>> for &'expr2 &'expr IpNetwork

Source§

type Expression = Bound<Nullable<Cidr>, &'expr2 &'expr IpNetwork>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Cidr>> for &'expr IpNetwork

Source§

type Expression = Bound<Nullable<Cidr>, &'expr IpNetwork>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Cidr>> for IpNetwork

Source§

type Expression = Bound<Nullable<Cidr>, IpNetwork>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Date>, &'expr2 &'expr NaiveDate>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Date>> for &'expr2 &'expr PgDate

Source§

type Expression = Bound<Nullable<Date>, &'expr2 &'expr PgDate>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Date>> for &'expr NaiveDate

Source§

type Expression = Bound<Nullable<Date>, &'expr NaiveDate>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Date>> for &'expr PgDate

Source§

type Expression = Bound<Nullable<Date>, &'expr PgDate>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Date>> for NaiveDate

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Date>> for PgDate

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Double>, &'expr2 &'expr f64>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Double>> for &'expr f64

Source§

type Expression = Bound<Nullable<Double>, &'expr f64>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Double>> for f64

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Float>, &'expr2 &'expr f32>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Float>> for &'expr f32

Source§

type Expression = Bound<Nullable<Float>, &'expr f32>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Float>> for f32

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Inet>> for &'expr2 &'expr IpNetwork

Source§

type Expression = Bound<Nullable<Inet>, &'expr2 &'expr IpNetwork>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Inet>> for &'expr IpNetwork

Source§

type Expression = Bound<Nullable<Inet>, &'expr IpNetwork>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Inet>> for IpNetwork

Source§

type Expression = Bound<Nullable<Inet>, IpNetwork>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Integer>, &'expr2 &'expr i32>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Integer>> for &'expr i32

Source§

type Expression = Bound<Nullable<Integer>, &'expr i32>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Integer>> for i32

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Interval>> for &'expr2 &'expr PgInterval

Source§

type Expression = Bound<Nullable<Interval>, &'expr2 &'expr PgInterval>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Interval>> for &'expr PgInterval

Source§

type Expression = Bound<Nullable<Interval>, &'expr PgInterval>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Interval>> for PgInterval

Source§

type Expression = Bound<Nullable<Interval>, PgInterval>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Json>> for &'expr2 &'expr Value

Source§

type Expression = Bound<Nullable<Json>, &'expr2 &'expr Value>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Json>> for &'expr Value

Source§

type Expression = Bound<Nullable<Json>, &'expr Value>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Json>> for Value

Source§

type Expression = Bound<Nullable<Json>, Value>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Jsonb>> for &'expr2 &'expr Value

Source§

type Expression = Bound<Nullable<Jsonb>, &'expr2 &'expr Value>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Jsonb>> for &'expr Value

Source§

type Expression = Bound<Nullable<Jsonb>, &'expr Value>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Jsonb>> for Value

Source§

type Expression = Bound<Nullable<Jsonb>, Value>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<MacAddr>> for &'expr2 &'expr [u8; 6]

Source§

type Expression = Bound<Nullable<MacAddr>, &'expr2 &'expr [u8; 6]>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<MacAddr>> for &'expr [u8; 6]

Source§

type Expression = Bound<Nullable<MacAddr>, &'expr [u8; 6]>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<MacAddr>> for [u8; 6]

Source§

type Expression = Bound<Nullable<MacAddr>, [u8; 6]>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Money>> for &'expr2 &'expr PgMoney

Source§

type Expression = Bound<Nullable<Money>, &'expr2 &'expr PgMoney>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Money>> for &'expr PgMoney

Source§

type Expression = Bound<Nullable<Money>, &'expr PgMoney>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Money>> for PgMoney

Source§

type Expression = Bound<Nullable<Money>, PgMoney>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Numeric>> for &'expr2 &'expr PgNumeric

Source§

type Expression = Bound<Nullable<Numeric>, &'expr2 &'expr PgNumeric>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric

Source§

type Expression = Bound<Nullable<Numeric>, &'expr PgNumeric>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Numeric>> for PgNumeric

Source§

type Expression = Bound<Nullable<Numeric>, PgNumeric>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Oid>> for &'expr2 &'expr u32

Source§

type Expression = Bound<Nullable<Oid>, &'expr2 &'expr u32>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Oid>> for &'expr u32

Source§

type Expression = Bound<Nullable<Oid>, &'expr u32>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Oid>> for u32

Source§

type Expression = Bound<Nullable<Oid>, u32>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'a, ST, T> AsExpression<Nullable<Range<ST>>> for &'a (Bound<T>, Bound<T>)

Source§

type Expression = Bound<Nullable<Range<ST>>, &'a (Bound<T>, Bound<T>)>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<ST, T> AsExpression<Nullable<Range<ST>>> for (Bound<T>, Bound<T>)

Source§

type Expression = Bound<Nullable<Range<ST>>, (Bound<T>, Bound<T>)>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<ST>, &'a Option<T>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<ST>, Option<T>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<SmallInt>, &'expr2 &'expr i16>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<SmallInt>> for &'expr i16

Source§

type Expression = Bound<Nullable<SmallInt>, &'expr i16>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<SmallInt>> for i16

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Text>, &'expr2 &'expr String>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Text>, &'expr2 &'expr str>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Text>> for &'expr String

Source§

type Expression = Bound<Nullable<Text>, &'expr String>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Text>> for &'expr str

Source§

type Expression = Bound<Nullable<Text>, &'expr str>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Text>> for String

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Time>, &'expr2 &'expr NaiveTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Time>> for &'expr2 &'expr PgTime

Source§

type Expression = Bound<Nullable<Time>, &'expr2 &'expr PgTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Time>> for &'expr NaiveTime

Source§

type Expression = Bound<Nullable<Time>, &'expr NaiveTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Time>> for &'expr PgTime

Source§

type Expression = Bound<Nullable<Time>, &'expr PgTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Time>> for NaiveTime

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Time>> for PgTime

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Timestamp>, &'expr2 &'expr NaiveDateTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Timestamp>> for &'expr2 &'expr PgTimestamp

Source§

type Expression = Bound<Nullable<Timestamp>, &'expr2 &'expr PgTimestamp>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

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

Source§

type Expression = Bound<Nullable<Timestamp>, &'expr2 &'expr SystemTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Timestamp>> for &'expr NaiveDateTime

Source§

type Expression = Bound<Nullable<Timestamp>, &'expr NaiveDateTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Timestamp>> for &'expr PgTimestamp

Source§

type Expression = Bound<Nullable<Timestamp>, &'expr PgTimestamp>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Timestamp>> for &'expr SystemTime

Source§

type Expression = Bound<Nullable<Timestamp>, &'expr SystemTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Timestamp>> for NaiveDateTime

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Timestamp>> for PgTimestamp

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Timestamp>> for SystemTime

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Timestamp>> for now

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr, Tz: TimeZone> AsExpression<Nullable<Timestamptz>> for &'expr2 &'expr DateTime<Tz>

Source§

type Expression = Bound<Nullable<Timestamptz>, &'expr2 &'expr DateTime<Tz>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Timestamptz>> for &'expr2 &'expr NaiveDateTime

Source§

type Expression = Bound<Nullable<Timestamptz>, &'expr2 &'expr NaiveDateTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Timestamptz>> for &'expr2 &'expr PgTimestamp

Source§

type Expression = Bound<Nullable<Timestamptz>, &'expr2 &'expr PgTimestamp>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr, Tz: TimeZone> AsExpression<Nullable<Timestamptz>> for &'expr DateTime<Tz>

Source§

type Expression = Bound<Nullable<Timestamptz>, &'expr DateTime<Tz>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Timestamptz>> for &'expr NaiveDateTime

Source§

type Expression = Bound<Nullable<Timestamptz>, &'expr NaiveDateTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Timestamptz>> for &'expr PgTimestamp

Source§

type Expression = Bound<Nullable<Timestamptz>, &'expr PgTimestamp>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<Tz: TimeZone> AsExpression<Nullable<Timestamptz>> for DateTime<Tz>

Source§

type Expression = Bound<Nullable<Timestamptz>, DateTime<Tz>>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Timestamptz>> for NaiveDateTime

Source§

type Expression = Bound<Nullable<Timestamptz>, NaiveDateTime>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Timestamptz>> for PgTimestamp

Source§

type Expression = Bound<Nullable<Timestamptz>, PgTimestamp>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Timestamptz>> for now

Source§

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

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Uuid>> for &'expr2 &'expr Uuid

Source§

type Expression = Bound<Nullable<Uuid>, &'expr2 &'expr Uuid>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr2, 'expr> AsExpression<Nullable<Uuid>> for &'expr2 &'expr Uuid

Source§

type Expression = Bound<Nullable<Uuid>, &'expr2 &'expr Uuid>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Uuid>> for &'expr Uuid

Source§

type Expression = Bound<Nullable<Uuid>, &'expr Uuid>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<'expr> AsExpression<Nullable<Uuid>> for &'expr Uuid

Source§

type Expression = Bound<Nullable<Uuid>, &'expr Uuid>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Uuid>> for Uuid

Source§

type Expression = Bound<Nullable<Uuid>, Uuid>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl AsExpression<Nullable<Uuid>> for Uuid

Source§

type Expression = Bound<Nullable<Uuid>, Uuid>

The expression being returned
Source§

fn as_expression(self) -> Self::Expression

Perform the conversion
Source§

impl<ST: Clone + NotNull> Clone for Nullable<ST>

Source§

fn clone(&self) -> Nullable<ST>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<ST: Debug + NotNull> Debug for Nullable<ST>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<ST: Default + NotNull> Default for Nullable<ST>

Source§

fn default() -> Nullable<ST>

Returns the “default value” for a type. Read more
Source§

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

Source§

type Rhs = Nullable<<T as Div>::Rhs>

The SQL type which this one can be divided by
Source§

type Output = Nullable<<T as Div>::Output>

The SQL type of the result of dividing Self by Rhs
Source§

impl<T> Foldable for Nullable<T>
where T: Foldable + NotNull,

Source§

type Sum = <T as Foldable>::Sum

The SQL type of sum(this_type)
Source§

type Avg = <T as Foldable>::Avg

The SQL type of avg(this_type)
Source§

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

Source§

fn from_sql(bytes: Option<&DB::RawValue>) -> Result<Self>

See the trait documentation.
Source§

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

Source§

const FIELDS_NEEDED: usize = T::FIELDS_NEEDED

The number of fields that this type will consume. Must be equal to the number of times you would call row.take() in build_from_row
Source§

fn build_from_row<R: Row<DB>>(row: &mut R) -> Result<Self>

See the trait documentation.
Source§

impl<T: NotNull> IntoNullable for Nullable<T>

Source§

type Nullable = Nullable<T>

The nullable representation of this type. Read more
Source§

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

Source§

type Rhs = Nullable<<T as Mul>::Rhs>

The SQL type which this can be multiplied by
Source§

type Output = Nullable<<T as Mul>::Output>

The SQL type of the result of multiplying Self by Rhs
Source§

impl<T> QueryId for Nullable<T>
where T: QueryId + NotNull,

Source§

const HAS_STATIC_QUERY_ID: bool = T::HAS_STATIC_QUERY_ID

Can the SQL generated by Self be uniquely identified by its type? Read more
Source§

type QueryId = <T as QueryId>::QueryId

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

fn query_id() -> Option<TypeId>

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

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,

Source§

type Row = Option<<T as Queryable<ST, DB>>::Row>

The Rust type you’d like to map from. Read more
Source§

fn build(row: Self::Row) -> Self

Construct an instance of this type
Source§

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

Source§

type Rhs = Nullable<<T as Sub>::Rhs>

The SQL type which can be subtracted from this one
Source§

type Output = Nullable<<T as Sub>::Output>

The SQL type of the result of subtracting Rhs from Self
Source§

impl<ST, T> ToSql<Nullable<Array<ST>>, Pg> for [T]
where [T]: ToSql<Array<ST>, Pg>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, Pg>) -> Result

See the trait documentation.
Source§

impl<ST, T> ToSql<Nullable<Array<ST>>, Pg> for Vec<T>
where Vec<T>: ToSql<Array<ST>, Pg>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, Pg>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Cidr>, __DB> for IpNetwork
where __DB: Backend, Self: ToSql<Cidr, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Date>, __DB> for PgDate
where __DB: Backend, Self: ToSql<Date, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Inet>, __DB> for IpNetwork
where __DB: Backend, Self: ToSql<Inet, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Interval>, __DB> for PgInterval
where __DB: Backend, Self: ToSql<Interval, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Json>, __DB> for Value
where __DB: Backend, Self: ToSql<Json, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Jsonb>, __DB> for Value
where __DB: Backend, Self: ToSql<Jsonb, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<MacAddr>, __DB> for [u8; 6]
where __DB: Backend, Self: ToSql<MacAddr, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Money>, __DB> for PgMoney
where __DB: Backend, Self: ToSql<Money, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumeric
where __DB: Backend, Self: ToSql<Numeric, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Oid>, __DB> for u32
where __DB: Backend, Self: ToSql<Oid, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<ST, T> ToSql<Nullable<Range<ST>>, Pg> for (Bound<T>, Bound<T>)
where (Bound<T>, Bound<T>): ToSql<Range<ST>, Pg>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, Pg>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Time>, __DB> for PgTime
where __DB: Backend, Self: ToSql<Time, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Timestamp>, __DB> for PgTimestamp
where __DB: Backend, Self: ToSql<Timestamp, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

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

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<Tz: TimeZone, __DB> ToSql<Nullable<Timestamptz>, __DB> for DateTime<Tz>
where __DB: Backend, Self: ToSql<Timestamptz, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Timestamptz>, __DB> for NaiveDateTime
where __DB: Backend, Self: ToSql<Timestamptz, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Timestamptz>, __DB> for PgTimestamp
where __DB: Backend, Self: ToSql<Timestamptz, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Uuid>, __DB> for Uuid
where __DB: Backend, Self: ToSql<Uuid, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<__DB> ToSql<Nullable<Uuid>, __DB> for Uuid
where __DB: Backend, Self: ToSql<Uuid, __DB>,

Source§

fn to_sql<W: Write>(&self, out: &mut Output<'_, W, __DB>) -> Result

See the trait documentation.
Source§

impl<ST: Copy + NotNull> Copy for Nullable<ST>

Source§

impl<T: NotNull + SingleValue> SingleValue for Nullable<T>

Source§

impl<T: SqlOrd + NotNull> SqlOrd for Nullable<T>

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn metadata( lookup: &<DB as TypeMetadata>::MetadataLookup, ) -> <DB as TypeMetadata>::TypeMetadata

Fetch the metadata for the given type Read more
Source§

fn row_metadata( out: &mut Vec<<DB as TypeMetadata>::TypeMetadata>, lookup: &<DB as TypeMetadata>::MetadataLookup, )

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoSql for T

Source§

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

Convert self to an expression for Diesel’s query builder. Read more
Source§

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

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.