Enum diesel::pg::data_types::PgNumeric
source · pub enum PgNumeric {
Positive {
weight: i16,
scale: u16,
digits: Vec<i16>,
},
Negative {
weight: i16,
scale: u16,
digits: Vec<i16>,
},
NaN,
}
Expand description
Represents a NUMERIC value, closely mirroring the PG wire protocol representation
Variants§
Trait Implementations§
source§impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric
impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric
§type Expression = Bound<Nullable<Numeric>, &'expr PgNumeric>
type Expression = Bound<Nullable<Numeric>, &'expr PgNumeric>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl AsExpression<Nullable<Numeric>> for PgNumeric
impl AsExpression<Nullable<Numeric>> for PgNumeric
§type Expression = Bound<Nullable<Numeric>, PgNumeric>
type Expression = Bound<Nullable<Numeric>, PgNumeric>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'expr> AsExpression<Numeric> for &'expr PgNumeric
impl<'expr> AsExpression<Numeric> for &'expr PgNumeric
§type Expression = Bound<Numeric, &'expr PgNumeric>
type Expression = Bound<Numeric, &'expr PgNumeric>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl AsExpression<Numeric> for PgNumeric
impl AsExpression<Numeric> for PgNumeric
§type Expression = Bound<Numeric, PgNumeric>
type Expression = Bound<Numeric, PgNumeric>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl PartialEq<PgNumeric> for PgNumeric
impl PartialEq<PgNumeric> for PgNumeric
source§impl<__ST, __DB> Queryable<__ST, __DB> for PgNumericwhere
__DB: Backend,
__ST: SingleValue,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> Queryable<__ST, __DB> for PgNumericwhere __DB: Backend, __ST: SingleValue, Self: FromSql<__ST, __DB>,
source§impl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumericwhere
__DB: Backend,
Self: ToSql<Numeric, __DB>,
impl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumericwhere __DB: Backend, Self: ToSql<Numeric, __DB>,
impl Eq for PgNumeric
impl StructuralEq for PgNumeric
impl StructuralPartialEq for PgNumeric
Auto Trait Implementations§
impl RefUnwindSafe for PgNumeric
impl Send for PgNumeric
impl Sync for PgNumeric
impl Unpin for PgNumeric
impl UnwindSafe for PgNumeric
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere T: Queryable<ST, DB>, ST: SqlTypeOrSelectable, DB: Backend, <T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
source§impl<T, ST, DB> FromStaticSqlRow<ST, DB> for Twhere
DB: Backend,
T: FromSql<ST, DB>,
ST: SingleValue,
impl<T, ST, DB> FromStaticSqlRow<ST, DB> for Twhere DB: Backend, T: FromSql<ST, DB>, ST: SingleValue,
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> AsExprOf<Self, T>where
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> AsExprOf<Self, T>where Self: AsExpression<T> + Sized, T: SqlType + TypedExpressionType,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T>where
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T>where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,
Convert
&self
to an expression for Diesel’s query builder. Read moresource§impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere ST: SqlTypeOrSelectable + TupleSize, T: Queryable<ST, DB>, DB: Backend,
source§const FIELD_COUNT: usize = const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE;
const FIELD_COUNT: usize = const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE;
The number of fields that this type will consume.