Struct diesel::types::Nullable [] [src]

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

  • 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

impl Add for Nullable<SmallInt>
[src]

The SQL type which can be added to this one

The SQL type of the result of adding Rhs to Self

impl Sub for Nullable<SmallInt>
[src]

The SQL type which can be subtracted from this one

The SQL type of the result of subtracting Rhs from Self

impl Mul for Nullable<SmallInt>
[src]

The SQL type which this can be multiplied by

The SQL type of the result of multiplying Self by Rhs

impl Div for Nullable<SmallInt>
[src]

The SQL type which this one can be divided by

The SQL type of the result of dividing Self by Rhs

impl Add for Nullable<Integer>
[src]

The SQL type which can be added to this one

The SQL type of the result of adding Rhs to Self

impl Sub for Nullable<Integer>
[src]

The SQL type which can be subtracted from this one

The SQL type of the result of subtracting Rhs from Self

impl Mul for Nullable<Integer>
[src]

The SQL type which this can be multiplied by

The SQL type of the result of multiplying Self by Rhs

impl Div for Nullable<Integer>
[src]

The SQL type which this one can be divided by

The SQL type of the result of dividing Self by Rhs

impl Add for Nullable<BigInt>
[src]

The SQL type which can be added to this one

The SQL type of the result of adding Rhs to Self

impl Sub for Nullable<BigInt>
[src]

The SQL type which can be subtracted from this one

The SQL type of the result of subtracting Rhs from Self

impl Mul for Nullable<BigInt>
[src]

The SQL type which this can be multiplied by

The SQL type of the result of multiplying Self by Rhs

impl Div for Nullable<BigInt>
[src]

The SQL type which this one can be divided by

The SQL type of the result of dividing Self by Rhs

impl Add for Nullable<Float>
[src]

The SQL type which can be added to this one

The SQL type of the result of adding Rhs to Self

impl Sub for Nullable<Float>
[src]

The SQL type which can be subtracted from this one

The SQL type of the result of subtracting Rhs from Self

impl Mul for Nullable<Float>
[src]

The SQL type which this can be multiplied by

The SQL type of the result of multiplying Self by Rhs

impl Div for Nullable<Float>
[src]

The SQL type which this one can be divided by

The SQL type of the result of dividing Self by Rhs

impl Add for Nullable<Double>
[src]

The SQL type which can be added to this one

The SQL type of the result of adding Rhs to Self

impl Sub for Nullable<Double>
[src]

The SQL type which can be subtracted from this one

The SQL type of the result of subtracting Rhs from Self

impl Mul for Nullable<Double>
[src]

The SQL type which this can be multiplied by

The SQL type of the result of multiplying Self by Rhs

impl Div for Nullable<Double>
[src]

The SQL type which this one can be divided by

The SQL type of the result of dividing Self by Rhs

impl Add for Nullable<Numeric>
[src]

The SQL type which can be added to this one

The SQL type of the result of adding Rhs to Self

impl Sub for Nullable<Numeric>
[src]

The SQL type which can be subtracted from this one

The SQL type of the result of subtracting Rhs from Self

impl Mul for Nullable<Numeric>
[src]

The SQL type which this can be multiplied by

The SQL type of the result of multiplying Self by Rhs

impl Div for Nullable<Numeric>
[src]

The SQL type which this one can be divided by

The SQL type of the result of dividing Self by Rhs

impl Add for Nullable<Time>
[src]

The SQL type which can be added to this one

The SQL type of the result of adding Rhs to Self

impl Sub for Nullable<Time>
[src]

The SQL type which can be subtracted from this one

The SQL type of the result of subtracting Rhs from Self

impl Add for Nullable<Date>
[src]

The SQL type which can be added to this one

The SQL type of the result of adding Rhs to Self

impl Sub for Nullable<Date>
[src]

The SQL type which can be subtracted from this one

The SQL type of the result of subtracting Rhs from Self

impl Add for Nullable<Timestamp>
[src]

The SQL type which can be added to this one

The SQL type of the result of adding Rhs to Self

impl Sub for Nullable<Timestamp>
[src]

The SQL type which can be subtracted from this one

The SQL type of the result of subtracting Rhs from Self

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

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

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

HAS_STATIC_QUERY_ID: bool = <T>::HAS_STATIC_QUERY_ID

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

[src]

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

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

The SQL type of sum(this_type)

The SQL type of avg(this_type)

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

[src]

Formats the value using the given formatter.

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

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

[src]

Returns the "default value" for a type. Read more

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

The nullable representation of this type. Read more

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