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

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

A positive number

Fields of Positive

How many digits come before the decimal point?

How many significant digits are there?

The digits in this number, stored in base 10000

A negative number

Fields of Negative

How many digits come before the decimal point?

How many significant digits are there?

The digits in this number, stored in base 10000

Not a number

Trait Implementations

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

See the trait documentation.

FIELDS_NEEDED: usize = 1

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<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
    __DB: Backend,
    Self: FromSql<__ST, __DB>, 
[src]

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

Construct an instance of this type

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

The expression being returned

Perform the conversion

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

The expression being returned

Perform the conversion

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

See the trait documentation.

impl AsExpression<Numeric> for PgNumeric
[src]

The expression being returned

Perform the conversion

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

The expression being returned

Perform the conversion

impl Debug for PgNumeric
[src]

Formats the value using the given formatter. Read more

impl Clone for PgNumeric
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for PgNumeric
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for PgNumeric
[src]

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

See the trait documentation.

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

See the trait documentation.

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

Performs the conversion.

impl From<BigDecimal> for PgNumeric
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for PgNumeric

impl Sync for PgNumeric