pub struct PgDate(pub i32);
Expand description
Dates are represented in Postgres as a 32 bit signed integer representing the number of julian days since January 1st 2000. This struct is a dumb wrapper type, meant only to indicate the integer’s meaning.
Tuple Fields§
§0: i32
Trait Implementations§
Source§impl<'expr> AsExpression<Date> for &'expr PgDate
impl<'expr> AsExpression<Date> for &'expr PgDate
Source§type Expression = Bound<Date, &'expr PgDate>
type Expression = Bound<Date, &'expr PgDate>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl AsExpression<Date> for PgDate
impl AsExpression<Date> for PgDate
Source§type Expression = Bound<Date, PgDate>
type Expression = Bound<Date, PgDate>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'expr> AsExpression<Nullable<Date>> for &'expr PgDate
impl<'expr> AsExpression<Nullable<Date>> for &'expr PgDate
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl AsExpression<Nullable<Date>> for PgDate
impl AsExpression<Nullable<Date>> for PgDate
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgDate
impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgDate
Source§const FIELDS_NEEDED: usize = 1usize
const FIELDS_NEEDED: usize = 1usize
The number of fields that this type will consume. Must be equal to
the number of times you would call
row.take()
in build_from_row
Source§impl Ord for PgDate
impl Ord for PgDate
Source§impl PartialOrd for PgDate
impl PartialOrd for PgDate
impl Copy for PgDate
impl Eq for PgDate
impl StructuralPartialEq for PgDate
Auto Trait Implementations§
impl Freeze for PgDate
impl RefUnwindSafe for PgDate
impl Send for PgDate
impl Sync for PgDate
impl Unpin for PgDate
impl UnwindSafe for PgDate
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