Struct diesel::pg::types::sql_types::Money [−][src]
pub struct Money;
Expand description
The PostgreSQL Money type.
ToSql
impls
FromSql
impls
Examples
use diesel::data_types::Cents; table! { items { id -> Integer, name -> VarChar, price -> Money, } } let inserted_price = insert_into(items) .values((name.eq("Shiny Thing"), price.eq(Cents(123_456)))) .returning(price) .get_result(&connection); assert_eq!(Ok(Cents(123_456)), inserted_price);
Trait Implementations
type Expression = Bound<Money, Self>
type Expression = Bound<Money, Self>
The expression being returned
Perform the conversion
type Expression = Bound<Money, Self>
type Expression = Bound<Money, Self>
The expression being returned
Perform the conversion
type Expression = Bound<Money, Self>
type Expression = Bound<Money, Self>
The expression being returned
Perform the conversion
Fetch the metadata for the given type Read more
Can the SQL generated by Self
be uniquely identified by its type? Read more
Auto Trait Implementations
impl RefUnwindSafe for Money
impl UnwindSafe for Money
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert self
to an expression for Diesel’s query builder. Read more