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::BigDecimal
withfeature = ["numeric"]
FromSql
impls
bigdecimal::BigDecimal
withfeature = ["numeric"]
Trait Implementations
impl Foldable for Numeric
[src]
impl Foldable for Numeric
type 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 Numeric
type 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 Numeric
type 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 Numeric
type 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 Numeric
type 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 Numeric
type 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 Numeric
impl SingleValue for Numeric
[src]
impl SingleValue for Numeric
impl HasSqlType<Numeric> for Sqlite
[src]
impl HasSqlType<Numeric> for Sqlite
fn metadata(_: &()) -> SqliteType
[src]
fn metadata(_: &()) -> SqliteType
Fetch the metadata for the given type Read more
impl HasSqlType<Numeric> for Mysql
[src]
impl HasSqlType<Numeric> for Mysql
impl HasSqlType<Numeric> for Pg
[src]
impl HasSqlType<Numeric> for Pg
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadata
[src]
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadata
Fetch the metadata for the given type Read more
impl Debug for Numeric
[src]
impl Debug for Numeric
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 Numeric
[src]
impl Clone for Numeric
fn clone(&self) -> Numeric
[src]
fn clone(&self) -> Numeric
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 Copy for Numeric
[src]
impl Copy for Numeric
impl Default for Numeric
[src]
impl Default for Numeric
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<'expr2, 'expr> AsExpression<Numeric> for &'expr2 &'expr PgNumeric
[src]
impl<'expr2, 'expr> AsExpression<Numeric> for &'expr2 &'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 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 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