[][src]Enum diesel::pg::data_types::PgNumeric

pub enum PgNumeric {
    Positive {
        weight: i16,
        scale: u16,
        digits: Vec<i16>,
    },
    Negative {
        weight: i16,
        scale: u16,
        digits: Vec<i16>,
    },
    NaN,
}

Represents a NUMERIC value, closely mirroring the PG wire protocol representation

Variants

Positive

A positive number

Fields of Positive

weight: i16

How many digits come before the decimal point?

scale: u16

How many significant digits are there?

digits: Vec<i16>

The digits in this number, stored in base 10000

Negative

A negative number

Fields of Negative

weight: i16

How many digits come before the decimal point?

scale: u16

How many significant digits are there?

digits: Vec<i16>

The digits in this number, stored in base 10000

NaN

Not a number

Trait Implementations

impl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
    __DB: Backend,
    Self: FromSql<__ST, __DB>, 
[src]

type Row = Self

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

impl FromSql<Numeric, Pg> for PgNumeric
[src]

impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgNumeric where
    __DB: Backend,
    Self: FromSql<__ST, __DB>, 
[src]

const FIELDS_NEEDED: usize[src]

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 Read more

impl<'expr> AsExpression<Numeric> for &'expr PgNumeric
[src]

type Expression = Bound<Numeric, Self>

The expression being returned

impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric
[src]

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

The expression being returned

impl AsExpression<Numeric> for PgNumeric
[src]

type Expression = Bound<Numeric, Self>

The expression being returned

impl AsExpression<Nullable<Numeric>> for PgNumeric
[src]

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

The expression being returned

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

impl ToSql<Numeric, Pg> for PgNumeric
[src]

impl<'a> From<&'a BigDecimal> for PgNumeric
[src]

impl From<BigDecimal> for PgNumeric
[src]

impl Eq for PgNumeric
[src]

impl PartialEq<PgNumeric> for PgNumeric
[src]

impl Clone for PgNumeric
[src]

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

Performs copy-assignment from source. Read more

impl Debug for PgNumeric
[src]

Auto Trait Implementations

impl Send for PgNumeric

impl Sync for PgNumeric

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> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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