Struct diesel::sql_types::Timestamp [−][src]
pub struct Timestamp;
The timestamp SQL type.
ToSql
impls
std::time::SystemTime
(PG only)chrono::NaiveDateTime
withfeature = "chrono"
time::Timespec
withfeature = "deprecated-time"
(PG only)
FromSql
impls
std::time::SystemTime
(PG only)chrono::NaiveDateTime
withfeature = "chrono"
time::Timespec
withfeature = "deprecated-time"
(PG only)
Trait Implementations
impl Add for Timestamp
[src]
impl Add for Timestamp
type Rhs = Interval
The SQL type which can be added to this one
type Output = Timestamp
The SQL type of the result of adding Rhs
to Self
impl Sub for Timestamp
[src]
impl Sub for Timestamp
type Rhs = Interval
The SQL type which can be subtracted from this one
type Output = Timestamp
The SQL type of the result of subtracting Rhs
from Self
impl SqlOrd for Timestamp
[src]
impl SqlOrd for Timestamp
impl QueryId for Timestamp
[src]
impl QueryId for Timestamp
type QueryId = Timestamp
A type which uniquely represents Self
in a SQL query. Read more
const HAS_STATIC_QUERY_ID: bool
HAS_STATIC_QUERY_ID: bool = true
Can the SQL generated by Self
be uniquely identified by its type? Read more
fn query_id() -> Option<TypeId>
[src]
fn query_id() -> Option<TypeId>
Returns the type id of Self::QueryId
if Self::HAS_STATIC_QUERY_ID
. Returns None
otherwise. Read more
impl NotNull for Timestamp
[src]
impl NotNull for Timestamp
impl SingleValue for Timestamp
[src]
impl SingleValue for Timestamp
impl HasSqlType<Timestamp> for Sqlite
[src]
impl HasSqlType<Timestamp> for Sqlite
fn metadata(_: &()) -> SqliteType
[src]
fn metadata(_: &()) -> SqliteType
Fetch the metadata for the given type Read more
impl HasSqlType<Timestamp> for Mysql
[src]
impl HasSqlType<Timestamp> for Mysql
impl HasSqlType<Timestamp> for Pg
[src]
impl HasSqlType<Timestamp> for Pg
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadata
[src]
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadata
Fetch the metadata for the given type Read more
impl Debug for Timestamp
[src]
impl Debug for Timestamp
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Timestamp
[src]
impl Clone for Timestamp
fn clone(&self) -> Timestamp
[src]
fn clone(&self) -> Timestamp
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Timestamp
[src]
impl Copy for Timestamp
impl Default for Timestamp
[src]
impl Default for Timestamp
impl ToSql<Timestamp, Mysql> for MYSQL_TIME
[src]
impl ToSql<Timestamp, Mysql> for MYSQL_TIME
impl FromSql<Timestamp, Mysql> for MYSQL_TIME
[src]
impl FromSql<Timestamp, Mysql> for MYSQL_TIME
impl ToSql<Timestamp, Mysql> for NaiveDateTime
[src]
impl ToSql<Timestamp, Mysql> for NaiveDateTime
impl FromSql<Timestamp, Mysql> for NaiveDateTime
[src]
impl FromSql<Timestamp, Mysql> for NaiveDateTime
impl FromSql<Timestamp, Pg> for NaiveDateTime
[src]
impl FromSql<Timestamp, Pg> for NaiveDateTime
impl ToSql<Timestamp, Pg> for NaiveDateTime
[src]
impl ToSql<Timestamp, Pg> for NaiveDateTime
impl ToSql<Timestamp, Pg> for SystemTime
[src]
impl ToSql<Timestamp, Pg> for SystemTime
impl FromSql<Timestamp, Pg> for SystemTime
[src]
impl FromSql<Timestamp, Pg> for SystemTime
impl<'expr> AsExpression<Timestamp> for &'expr PgTimestamp
[src]
impl<'expr> AsExpression<Timestamp> for &'expr PgTimestamp
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr PgTimestamp
[src]
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr PgTimestamp
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl AsExpression<Timestamp> for PgTimestamp
[src]
impl AsExpression<Timestamp> for PgTimestamp
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl ToSql<Timestamp, Pg> for PgTimestamp
[src]
impl ToSql<Timestamp, Pg> for PgTimestamp
impl FromSql<Timestamp, Pg> for PgTimestamp
[src]
impl FromSql<Timestamp, Pg> for PgTimestamp
impl FromSql<Timestamp, Sqlite> for NaiveDateTime
[src]
impl FromSql<Timestamp, Sqlite> for NaiveDateTime
fn from_sql(value: Option<&<Sqlite as Backend>::RawValue>) -> Result<Self>
[src]
fn from_sql(value: Option<&<Sqlite as Backend>::RawValue>) -> Result<Self>
See the trait documentation.
impl ToSql<Timestamp, Sqlite> for NaiveDateTime
[src]
impl ToSql<Timestamp, Sqlite> for NaiveDateTime
impl FromSql<Timestamp, Sqlite> for *const str
[src]
impl FromSql<Timestamp, Sqlite> for *const str
The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of String
, but don't want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
impl ToSql<Timestamp, Sqlite> for str
[src]
impl ToSql<Timestamp, Sqlite> for str
impl ToSql<Timestamp, Sqlite> for String
[src]
impl ToSql<Timestamp, Sqlite> for String
impl<'expr> AsExpression<Timestamp> for &'expr SystemTime
[src]
impl<'expr> AsExpression<Timestamp> for &'expr SystemTime
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr SystemTime
[src]
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr SystemTime
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl AsExpression<Timestamp> for SystemTime
[src]
impl AsExpression<Timestamp> for SystemTime
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr> AsExpression<Timestamp> for &'expr NaiveDateTime
[src]
impl<'expr> AsExpression<Timestamp> for &'expr NaiveDateTime
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr NaiveDateTime
[src]
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr NaiveDateTime
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl AsExpression<Timestamp> for NaiveDateTime
[src]
impl AsExpression<Timestamp> for NaiveDateTime
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr> AsExpression<Timestamp> for &'expr String
[src]
impl<'expr> AsExpression<Timestamp> for &'expr String
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr String
[src]
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr String
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl AsExpression<Timestamp> for String
[src]
impl AsExpression<Timestamp> for String
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr> AsExpression<Timestamp> for &'expr str
[src]
impl<'expr> AsExpression<Timestamp> for &'expr str
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr str
[src]
impl<'expr2, 'expr> AsExpression<Timestamp> for &'expr2 &'expr str
type Expression = Bound<Timestamp, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion