pub struct TimeUnixTimestamp(pub TimeDateTimeWithTimeZone);Available on crate feature
with-time only.Expand description
An OffsetDateTime stored as a Unix timestamp (seconds) i64 in the database.
Tuple Fieldsยง
ยง0: TimeDateTimeWithTimeZoneMethods from Deref<Target = TimeDateTimeWithTimeZone>ยง
pub const UNIX_EPOCH: OffsetDateTime
Trait Implementationsยง
Sourceยงimpl Clone for TimeUnixTimestamp
impl Clone for TimeUnixTimestamp
Sourceยงfn clone(&self) -> TimeUnixTimestamp
fn clone(&self) -> TimeUnixTimestamp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TimeUnixTimestamp
Sourceยงimpl Debug for TimeUnixTimestamp
impl Debug for TimeUnixTimestamp
Sourceยงimpl Deref for TimeUnixTimestamp
impl Deref for TimeUnixTimestamp
Sourceยงimpl DerefMut for TimeUnixTimestamp
impl DerefMut for TimeUnixTimestamp
Sourceยงimpl<'de> Deserialize<'de> for TimeUnixTimestamp
Available on crate feature serde only.
impl<'de> Deserialize<'de> for TimeUnixTimestamp
Available on crate feature
serde only.Sourceยงfn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TimeUnixTimestamp
Sourceยงimpl From<OffsetDateTime> for TimeUnixTimestamp
impl From<OffsetDateTime> for TimeUnixTimestamp
Sourceยงfn from(value: TimeDateTimeWithTimeZone) -> Self
fn from(value: TimeDateTimeWithTimeZone) -> Self
Converts to this type from the input type.
Sourceยงimpl From<TimeUnixTimestamp> for Value
impl From<TimeUnixTimestamp> for Value
Sourceยงfn from(source: TimeUnixTimestamp) -> Self
fn from(source: TimeUnixTimestamp) -> Self
Converts to this type from the input type.
Sourceยงimpl Hash for TimeUnixTimestamp
impl Hash for TimeUnixTimestamp
Sourceยงimpl IntoActiveValue<TimeUnixTimestamp> for TimeUnixTimestamp
impl IntoActiveValue<TimeUnixTimestamp> for TimeUnixTimestamp
Sourceยงfn into_active_value(self) -> ActiveValue<TimeUnixTimestamp>
fn into_active_value(self) -> ActiveValue<TimeUnixTimestamp>
Method to perform the conversion
Sourceยงimpl PartialEq for TimeUnixTimestamp
impl PartialEq for TimeUnixTimestamp
Sourceยงfn eq(&self, other: &TimeUnixTimestamp) -> bool
fn eq(&self, other: &TimeUnixTimestamp) -> bool
Tests for
self and other values to be equal, and is used by ==.Sourceยงimpl PartialEq<OffsetDateTime> for TimeUnixTimestamp
impl PartialEq<OffsetDateTime> for TimeUnixTimestamp
Sourceยงfn eq(&self, other: &TimeDateTimeWithTimeZone) -> bool
fn eq(&self, other: &TimeDateTimeWithTimeZone) -> bool
Tests for
self and other values to be equal, and is used by ==.Sourceยงimpl Serialize for TimeUnixTimestamp
Available on crate feature serde only.
impl Serialize for TimeUnixTimestamp
Available on crate feature
serde only.impl StructuralPartialEq for TimeUnixTimestamp
Sourceยงimpl TryGetable for TimeUnixTimestamp
impl TryGetable for TimeUnixTimestamp
Sourceยงfn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Decode the value at the column named or positioned by
index.Sourceยงfn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>
fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>
Decode the value at column
{pre}{col} โ pre is the prefix used
when nesting partial models or joining tables.Sourceยงfn try_get_by_index(
res: &QueryResult,
index: usize,
) -> Result<Self, TryGetError>
fn try_get_by_index( res: &QueryResult, index: usize, ) -> Result<Self, TryGetError>
Decode the value at the given positional index in the SELECT list.
Sourceยงimpl ValueType for TimeUnixTimestamp
impl ValueType for TimeUnixTimestamp
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
fn unwrap(v: Value) -> Self
fn expect(v: Value, msg: &str) -> Self
fn is_option() -> bool
fn enum_type_name() -> Option<&'static str>
Auto Trait Implementationsยง
impl Freeze for TimeUnixTimestamp
impl RefUnwindSafe for TimeUnixTimestamp
impl Send for TimeUnixTimestamp
impl Sync for TimeUnixTimestamp
impl Unpin for TimeUnixTimestamp
impl UnsafeUnpin for TimeUnixTimestamp
impl UnwindSafe for TimeUnixTimestamp
Blanket Implementationsยง
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> ExprTrait for T
impl<T> ExprTrait for T
Sourceยงfn as_enum<N>(self, type_name: N) -> Exprwhere
N: IntoIden,
fn as_enum<N>(self, type_name: N) -> Exprwhere
N: IntoIden,
Express a
AS enum expression. Read moreSourceยงfn cast_as<N>(self, type_name: N) -> Exprwhere
N: IntoIden,
fn cast_as<N>(self, type_name: N) -> Exprwhere
N: IntoIden,
Express a
CAST AS expression. Read moreSourceยงfn count_distinct(self) -> Expr
fn count_distinct(self) -> Expr
Express a
COUNT function with the DISTINCT modifier. Read moreSourceยงfn equals<C>(self, col: C) -> Exprwhere
C: IntoColumnRef,
fn equals<C>(self, col: C) -> Exprwhere
C: IntoColumnRef,
Express a equal expression between two table columns,
you will mainly use this to relate identical value between two table columns. Read more
Sourceยงfn in_subquery(self, sel: SelectStatement) -> Expr
fn in_subquery(self, sel: SelectStatement) -> Expr
Express a
IN sub-query expression. Read moreSourceยงfn in_tuples<V, I>(self, v: I) -> Exprwhere
V: IntoValueTuple,
I: IntoIterator<Item = V>,
fn in_tuples<V, I>(self, v: I) -> Exprwhere
V: IntoValueTuple,
I: IntoIterator<Item = V>,
Express a
IN sub expression. Read moreSourceยงfn is_not_null(self) -> Expr
fn is_not_null(self) -> Expr
Express a
IS NOT NULL expression. Read moreSourceยงfn left_shift<R>(self, right: R) -> Expr
fn left_shift<R>(self, right: R) -> Expr
Express a bitwise left shift. Read more
Sourceยงfn not_between<A, B>(self, a: A, b: B) -> Expr
fn not_between<A, B>(self, a: A, b: B) -> Expr
Express a
NOT BETWEEN expression. Read moreSourceยงfn not_equals<C>(self, col: C) -> Exprwhere
C: IntoColumnRef,
fn not_equals<C>(self, col: C) -> Exprwhere
C: IntoColumnRef,
Express a not equal expression between two table columns,
you will mainly use this to relate identical value between two table columns. Read more
Sourceยงfn not_in_subquery(self, sel: SelectStatement) -> Expr
fn not_in_subquery(self, sel: SelectStatement) -> Expr
Express a
NOT IN sub-query expression. Read moreSourceยงfn not_like<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
fn not_like<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
Express a
NOT LIKE expression. Read moreSourceยงfn right_shift<R>(self, right: R) -> Expr
fn right_shift<R>(self, right: R) -> Expr
Express a bitwise right shift. Read more
Sourceยงimpl<V> FromValueTuple for V
impl<V> FromValueTuple for V
fn from_value_tuple<I>(i: I) -> Vwhere
I: IntoValueTuple,
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงimpl<T> IntoValueTuple for Twhere
T: Into<ValueTuple>,
impl<T> IntoValueTuple for Twhere
T: Into<ValueTuple>,
fn into_value_tuple(self) -> ValueTuple
Sourceยงimpl<T> PgExpr for Twhere
T: ExprTrait,
impl<T> PgExpr for Twhere
T: ExprTrait,
Sourceยงfn concatenate<T>(self, right: T) -> Expr
fn concatenate<T>(self, right: T) -> Expr
Express an postgres concatenate (
||) expression. Read moreSourceยงfn matches<T>(self, expr: T) -> Expr
fn matches<T>(self, expr: T) -> Expr
Express an postgres fulltext search matches (
@@) expression. Read moreSourceยงfn contains<T>(self, expr: T) -> Expr
fn contains<T>(self, expr: T) -> Expr
Express an postgres fulltext search contains (
@>) expression. Read moreSourceยงfn contained<T>(self, expr: T) -> Expr
fn contained<T>(self, expr: T) -> Expr
Express an postgres fulltext search contained (
<@) expression. Read moreSourceยงfn ilike<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
fn ilike<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
Express a
ILIKE expression. Read moreSourceยงfn not_ilike<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
fn not_ilike<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
Express a
NOT ILIKE expressionSourceยงfn get_json_field<T>(self, right: T) -> Expr
fn get_json_field<T>(self, right: T) -> Expr
Express a postgres retrieves JSON field as JSON value (
->). Read moreSourceยงfn cast_json_field<T>(self, right: T) -> Expr
fn cast_json_field<T>(self, right: T) -> Expr
Express a postgres retrieves JSON field and casts it to an appropriate SQL type (
->>). Read moreSourceยงimpl<V> PrimaryKeyArity for Vwhere
V: TryGetable,
impl<V> PrimaryKeyArity for Vwhere
V: TryGetable,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Sourceยงimpl<T> SelectExprTrait for T
impl<T> SelectExprTrait for T
fn alias<A>(self, alias: A) -> SelectExprwhere
A: IntoIden,
fn over(self, over_expr: impl Into<WindowSelectType>) -> SelectExpr
Sourceยงimpl<T> SqliteExpr for Twhere
T: ExprTrait,
impl<T> SqliteExpr for Twhere
T: ExprTrait,
Sourceยงimpl<T> TryGetableMany for Twhere
T: TryGetable,
impl<T> TryGetableMany for Twhere
T: TryGetable,
Sourceยงfn try_get_many(
res: &QueryResult,
pre: &str,
cols: &[String],
) -> Result<T, TryGetError>
fn try_get_many( res: &QueryResult, pre: &str, cols: &[String], ) -> Result<T, TryGetError>
Decode by column name.
pre is the prefix used when nesting (e.g.
from a joined table); cols names each tuple position.Sourceยงfn try_get_many_by_index(res: &QueryResult) -> Result<T, TryGetError>
fn try_get_many_by_index(res: &QueryResult) -> Result<T, TryGetError>
Decode positionally, in the order columns appear in the SELECT list.