pub struct now;
Expand description
Represents the SQL CURRENT_TIMESTAMP
constant. This is equivalent to the
NOW()
function on backends that support it.
Trait Implementations§
Source§impl AsExpression<Nullable<Timestamp>> for now
impl AsExpression<Nullable<Timestamp>> for now
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl AsExpression<Nullable<Timestamptz>> for now
impl AsExpression<Nullable<Timestamptz>> for now
Source§type Expression = Coerce<now, Nullable<Timestamptz>>
type Expression = Coerce<now, Nullable<Timestamptz>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl AsExpression<Timestamptz> for now
impl AsExpression<Timestamptz> for now
Source§type Expression = Coerce<now, Timestamptz>
type Expression = Coerce<now, Timestamptz>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl Expression for now
impl Expression for now
Source§impl<DB: Backend> QueryFragment<DB> for now
impl<DB: Backend> QueryFragment<DB> for now
Source§fn walk_ast(&self, out: AstPass<'_, DB>) -> QueryResult<()>
fn walk_ast(&self, out: AstPass<'_, DB>) -> QueryResult<()>
Walk over this
QueryFragment
for all passes. Read moreSource§fn to_sql(&self, out: &mut DB::QueryBuilder) -> QueryResult<()>
fn to_sql(&self, out: &mut DB::QueryBuilder) -> QueryResult<()>
Converts this
QueryFragment
to its SQL representation. Read moreSource§fn collect_binds(
&self,
out: &mut DB::BindCollector,
metadata_lookup: &DB::MetadataLookup,
) -> QueryResult<()>
fn collect_binds( &self, out: &mut DB::BindCollector, metadata_lookup: &DB::MetadataLookup, ) -> QueryResult<()>
Serializes all bind parameters in this query. Read more
Source§fn is_safe_to_cache_prepared(&self) -> QueryResult<bool>
fn is_safe_to_cache_prepared(&self) -> QueryResult<bool>
Is this query safe to store in the prepared statement cache? Read more
Source§impl QueryId for now
impl QueryId for now
Source§const HAS_STATIC_QUERY_ID: bool = true
const HAS_STATIC_QUERY_ID: bool = true
Can the SQL generated by
Self
be uniquely identified by its type? Read moreimpl<QS> AppearsOnTable<QS> for nowwhere
now: Expression,
impl Copy for now
impl NonAggregate for now
impl<QS> SelectableExpression<QS> for nowwhere
now: AppearsOnTable<QS>,
Auto Trait Implementations§
impl Freeze for now
impl RefUnwindSafe for now
impl Send for now
impl Sync for now
impl Unpin for now
impl UnwindSafe for now
Blanket Implementations§
Source§impl<T> AsExpression<<T as Expression>::SqlType> for Twhere
T: Expression,
impl<T> AsExpression<<T as Expression>::SqlType> for Twhere
T: Expression,
Source§type Expression = T
type Expression = T
The expression being returned
Source§fn as_expression(self) -> T
fn as_expression(self) -> T
Perform the conversion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T
impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T
Source§impl<T> ExpressionMethods for T
impl<T> ExpressionMethods for T
Source§fn eq<T: AsExpression<Self::SqlType>>(self, other: T) -> Eq<Self, T::Expression>
fn eq<T: AsExpression<Self::SqlType>>(self, other: T) -> Eq<Self, T::Expression>
Creates a SQL
=
expression. Read moreSource§fn ne<T: AsExpression<Self::SqlType>>(
self,
other: T,
) -> NotEq<Self, T::Expression>
fn ne<T: AsExpression<Self::SqlType>>( self, other: T, ) -> NotEq<Self, T::Expression>
Creates a SQL
!=
expression. Read moreSource§fn eq_any<T>(self, values: T) -> In<Self, T::InExpression>where
T: AsInExpression<Self::SqlType>,
fn eq_any<T>(self, values: T) -> In<Self, T::InExpression>where
T: AsInExpression<Self::SqlType>,
Creates a SQL
IN
statement. Read moreSource§fn ne_any<T>(self, values: T) -> NotIn<Self, T::InExpression>where
T: AsInExpression<Self::SqlType>,
fn ne_any<T>(self, values: T) -> NotIn<Self, T::InExpression>where
T: AsInExpression<Self::SqlType>,
👎Deprecated since 1.2.0: use
ne_all
insteadDeprecated alias for
ne_all
Read moreSource§fn ne_all<T>(self, values: T) -> NotIn<Self, T::InExpression>where
T: AsInExpression<Self::SqlType>,
fn ne_all<T>(self, values: T) -> NotIn<Self, T::InExpression>where
T: AsInExpression<Self::SqlType>,
Creates a SQL
NOT IN
statement. Read moreSource§fn is_not_null(self) -> IsNotNull<Self>
fn is_not_null(self) -> IsNotNull<Self>
Creates a SQL
IS NOT NULL
expression. Read moreSource§fn gt<T: AsExpression<Self::SqlType>>(self, other: T) -> Gt<Self, T::Expression>
fn gt<T: AsExpression<Self::SqlType>>(self, other: T) -> Gt<Self, T::Expression>
Creates a SQL
>
expression. Read moreSource§fn ge<T: AsExpression<Self::SqlType>>(
self,
other: T,
) -> GtEq<Self, T::Expression>
fn ge<T: AsExpression<Self::SqlType>>( self, other: T, ) -> GtEq<Self, T::Expression>
Creates a SQL
>=
expression. Read moreSource§fn lt<T: AsExpression<Self::SqlType>>(self, other: T) -> Lt<Self, T::Expression>
fn lt<T: AsExpression<Self::SqlType>>(self, other: T) -> Lt<Self, T::Expression>
Creates a SQL
<
expression. Read moreSource§fn le<T: AsExpression<Self::SqlType>>(
self,
other: T,
) -> LtEq<Self, T::Expression>
fn le<T: AsExpression<Self::SqlType>>( self, other: T, ) -> LtEq<Self, T::Expression>
Creates a SQL
<=
expression. Read moreSource§fn between<T, U>(
self,
lower: T,
upper: U,
) -> Between<Self, And<T::Expression, U::Expression>>
fn between<T, U>( self, lower: T, upper: U, ) -> Between<Self, And<T::Expression, U::Expression>>
Creates a SQL
BETWEEN
expression using the given lower and upper
bounds. Read moreSource§fn not_between<T, U>(
self,
lower: T,
upper: U,
) -> NotBetween<Self, And<T::Expression, U::Expression>>
fn not_between<T, U>( self, lower: T, upper: U, ) -> NotBetween<Self, And<T::Expression, U::Expression>>
Creates a SQL
NOT BETWEEN
expression using the given lower and upper
bounds. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§impl<T> NullableExpressionMethods for Twhere
T: Expression,
impl<T> NullableExpressionMethods for Twhere
T: Expression,
Source§impl<T> PgExpressionMethods for Twhere
T: Expression,
impl<T> PgExpressionMethods for Twhere
T: Expression,
Source§fn is_not_distinct_from<T>(
self,
other: T,
) -> IsNotDistinctFrom<Self, T::Expression>where
T: AsExpression<Self::SqlType>,
fn is_not_distinct_from<T>(
self,
other: T,
) -> IsNotDistinctFrom<Self, T::Expression>where
T: AsExpression<Self::SqlType>,
Creates a PostgreSQL
IS NOT DISTINCT FROM
expression. Read moreSource§fn is_distinct_from<T>(self, other: T) -> IsDistinctFrom<Self, T::Expression>where
T: AsExpression<Self::SqlType>,
fn is_distinct_from<T>(self, other: T) -> IsDistinctFrom<Self, T::Expression>where
T: AsExpression<Self::SqlType>,
Creates a PostgreSQL
IS DISTINCT FROM
expression. Read moreSource§impl<T> PgTimestampExpressionMethods for T
impl<T> PgTimestampExpressionMethods for T
Source§fn at_time_zone<T>(self, timezone: T) -> AtTimeZone<Self, T::Expression>where
T: AsExpression<VarChar>,
fn at_time_zone<T>(self, timezone: T) -> AtTimeZone<Self, T::Expression>where
T: AsExpression<VarChar>,
Creates a PostgreSQL “AT TIME ZONE” expression. Read more