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
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> FromSqlRow<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>,
[src]
impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>,
fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
[src]
fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
See the trait documentation.
const FIELDS_NEEDED: usize
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]
impl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>,
type Row = Self
The Rust type you'd like to map from. Read more
fn build(row: Self::Row) -> Self
[src]
fn build(row: Self::Row) -> Self
Construct an instance of this type
impl<'expr> AsExpression<Numeric> for &'expr PgNumeric
[src]
impl<'expr> AsExpression<Numeric> for &'expr PgNumeric
type Expression = Bound<Numeric, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric
[src]
impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric
type Expression = Bound<Nullable<Numeric>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumeric where
__DB: Backend,
Self: ToSql<Numeric, __DB>,
[src]
impl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumeric where
__DB: Backend,
Self: ToSql<Numeric, __DB>,
impl AsExpression<Numeric> for PgNumeric
[src]
impl AsExpression<Numeric> for PgNumeric
type Expression = Bound<Numeric, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl AsExpression<Nullable<Numeric>> for PgNumeric
[src]
impl AsExpression<Nullable<Numeric>> for PgNumeric
type Expression = Bound<Nullable<Numeric>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl Debug for PgNumeric
[src]
impl Debug for PgNumeric
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for PgNumeric
[src]
impl Clone for PgNumeric
fn clone(&self) -> PgNumeric
[src]
fn clone(&self) -> PgNumeric
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for PgNumeric
[src]
impl PartialEq for PgNumeric
fn eq(&self, other: &PgNumeric) -> bool
[src]
fn eq(&self, other: &PgNumeric) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &PgNumeric) -> bool
[src]
fn ne(&self, other: &PgNumeric) -> bool
This method tests for !=
.
impl Eq for PgNumeric
[src]
impl Eq for PgNumeric
impl FromSql<Numeric, Pg> for PgNumeric
[src]
impl FromSql<Numeric, Pg> for PgNumeric
impl ToSql<Numeric, Pg> for PgNumeric
[src]
impl ToSql<Numeric, Pg> for PgNumeric