Struct diesel::sql_types::Numeric [−][src]
pub struct Numeric;
The arbitrary precision numeric SQL type.
This type is only supported on PostgreSQL and MySQL.
On SQLite, Double should be used instead.
ToSql impls
bigdecimal::BigDecimalwithfeature = ["numeric"]
FromSql impls
bigdecimal::BigDecimalwithfeature = ["numeric"]
Trait Implementations
impl Foldable for Numeric[src]
impl Foldable for Numerictype Sum = Nullable<Numeric>
The SQL type of sum(this_type)
type Avg = Nullable<Numeric>
The SQL type of avg(this_type)
impl Add for Numeric[src]
impl Add for Numerictype Rhs = Numeric
The SQL type which can be added to this one
type Output = Numeric
The SQL type of the result of adding Rhs to Self
impl Sub for Numeric[src]
impl Sub for Numerictype Rhs = Numeric
The SQL type which can be subtracted from this one
type Output = Numeric
The SQL type of the result of subtracting Rhs from Self
impl Mul for Numeric[src]
impl Mul for Numerictype Rhs = Numeric
The SQL type which this can be multiplied by
type Output = Numeric
The SQL type of the result of multiplying Self by Rhs
impl Div for Numeric[src]
impl Div for Numerictype Rhs = Numeric
The SQL type which this one can be divided by
type Output = Numeric
The SQL type of the result of dividing Self by Rhs
impl QueryId for Numeric[src]
impl QueryId for Numerictype QueryId = Numeric
A type which uniquely represents Self in a SQL query. Read more
const HAS_STATIC_QUERY_ID: bool
HAS_STATIC_QUERY_ID: bool = true
Can the SQL generated by Self be uniquely identified by its type? Read more
fn query_id() -> Option<TypeId>[src]
fn query_id() -> Option<TypeId>Returns the type id of Self::QueryId if Self::HAS_STATIC_QUERY_ID. Returns None otherwise. Read more
impl NotNull for Numeric[src]
impl NotNull for Numericimpl SingleValue for Numeric[src]
impl SingleValue for Numericimpl HasSqlType<Numeric> for Sqlite[src]
impl HasSqlType<Numeric> for Sqlitefn metadata(_: &()) -> SqliteType[src]
fn metadata(_: &()) -> SqliteTypeFetch the metadata for the given type Read more
impl HasSqlType<Numeric> for Mysql[src]
impl HasSqlType<Numeric> for Mysqlimpl HasSqlType<Numeric> for Pg[src]
impl HasSqlType<Numeric> for Pgfn metadata(_: &PgMetadataLookup) -> PgTypeMetadata[src]
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadataFetch the metadata for the given type Read more
impl Debug for Numeric[src]
impl Debug for Numericfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Numeric[src]
impl Clone for Numericfn clone(&self) -> Numeric[src]
fn clone(&self) -> NumericReturns 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 Copy for Numeric[src]
impl Copy for Numericimpl Default for Numeric[src]
impl Default for Numericimpl<'expr> AsExpression<Numeric> for &'expr PgNumeric[src]
impl<'expr> AsExpression<Numeric> for &'expr PgNumerictype Expression = Bound<Numeric, Self>
The expression being returned
fn as_expression(self) -> Self::Expression[src]
fn as_expression(self) -> Self::ExpressionPerform the conversion
impl<'expr2, 'expr> AsExpression<Numeric> for &'expr2 &'expr PgNumeric[src]
impl<'expr2, 'expr> AsExpression<Numeric> for &'expr2 &'expr PgNumerictype Expression = Bound<Numeric, Self>
The expression being returned
fn as_expression(self) -> Self::Expression[src]
fn as_expression(self) -> Self::ExpressionPerform the conversion
impl AsExpression<Numeric> for PgNumeric[src]
impl AsExpression<Numeric> for PgNumerictype Expression = Bound<Numeric, Self>
The expression being returned
fn as_expression(self) -> Self::Expression[src]
fn as_expression(self) -> Self::ExpressionPerform the conversion
impl FromSql<Numeric, Pg> for PgNumeric[src]
impl FromSql<Numeric, Pg> for PgNumericimpl ToSql<Numeric, Pg> for PgNumeric[src]
impl ToSql<Numeric, Pg> for PgNumeric