[−][src]Struct diesel::pg::types::sql_types::Money
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
impl FromSql<Money, Pg> for PgMoney
[src]
impl<'expr> AsExpression<Money> for &'expr PgMoney
[src]
type Expression = Bound<Money, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl<'expr2, 'expr> AsExpression<Money> for &'expr2 &'expr PgMoney
[src]
type Expression = Bound<Money, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl AsExpression<Money> for PgMoney
[src]
type Expression = Bound<Money, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl QueryId for Money
[src]
type QueryId = Money
A type which uniquely represents Self
in a SQL query. Read more
const HAS_STATIC_QUERY_ID: bool
[src]
fn query_id() -> Option<TypeId>
[src]
impl ToSql<Money, Pg> for PgMoney
[src]
impl HasSqlType<Money> for Pg
[src]
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadata
[src]
impl NotNull for Money
[src]
impl SingleValue for Money
[src]
impl Clone for Money
[src]
impl Copy for Money
[src]
impl Default for Money
[src]
impl Debug for Money
[src]
Auto Trait Implementations
impl Send for Money
impl Sync for Money
impl Unpin for Money
impl UnwindSafe for Money
impl RefUnwindSafe for Money
Blanket Implementations
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> AsExprOf<Self, T> where
Self: AsExpression<T> + Sized,
[src]
Self: AsExpression<T> + Sized,
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
impl<T> IntoNullable for T where
T: NotNull,
[src]
T: NotNull,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,