Struct diesel::sql_types::Date [−][src]
pub struct Date;
The date SQL type.
ToSql
impls
chrono::NaiveDate
withfeature = "chrono"
FromSql
impls
chrono::NaiveDate
withfeature = "chrono"
Trait Implementations
impl Add for Date
[src]
impl Add for Date
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 Date
[src]
impl Sub for Date
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 Date
[src]
impl SqlOrd for Date
impl QueryId for Date
[src]
impl QueryId for Date
type QueryId = Date
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 Date
[src]
impl NotNull for Date
impl SingleValue for Date
[src]
impl SingleValue for Date
impl HasSqlType<Date> for Sqlite
[src]
impl HasSqlType<Date> for Sqlite
fn metadata(_: &()) -> SqliteType
[src]
fn metadata(_: &()) -> SqliteType
Fetch the metadata for the given type Read more
impl HasSqlType<Date> for Mysql
[src]
impl HasSqlType<Date> for Mysql
impl HasSqlType<Date> for Pg
[src]
impl HasSqlType<Date> for Pg
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadata
[src]
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadata
Fetch the metadata for the given type Read more
impl Debug for Date
[src]
impl Debug for Date
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 Date
[src]
impl Clone for Date
fn clone(&self) -> Date
[src]
fn clone(&self) -> Date
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 Date
[src]
impl Copy for Date
impl Default for Date
[src]
impl Default for Date
impl ToSql<Date, Mysql> for MYSQL_TIME
[src]
impl ToSql<Date, Mysql> for MYSQL_TIME
impl FromSql<Date, Mysql> for MYSQL_TIME
[src]
impl FromSql<Date, Mysql> for MYSQL_TIME
impl ToSql<Date, Mysql> for NaiveDate
[src]
impl ToSql<Date, Mysql> for NaiveDate
impl FromSql<Date, Mysql> for NaiveDate
[src]
impl FromSql<Date, Mysql> for NaiveDate
impl ToSql<Date, Pg> for NaiveDate
[src]
impl ToSql<Date, Pg> for NaiveDate
impl FromSql<Date, Pg> for NaiveDate
[src]
impl FromSql<Date, Pg> for NaiveDate
impl<'expr> AsExpression<Date> for &'expr PgDate
[src]
impl<'expr> AsExpression<Date> for &'expr PgDate
type Expression = Bound<Date, 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<Date> for &'expr2 &'expr PgDate
[src]
impl<'expr2, 'expr> AsExpression<Date> for &'expr2 &'expr PgDate
type Expression = Bound<Date, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl AsExpression<Date> for PgDate
[src]
impl AsExpression<Date> for PgDate
type Expression = Bound<Date, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl ToSql<Date, Pg> for PgDate
[src]
impl ToSql<Date, Pg> for PgDate
impl FromSql<Date, Pg> for PgDate
[src]
impl FromSql<Date, Pg> for PgDate
impl FromSql<Date, Sqlite> for NaiveDate
[src]
impl FromSql<Date, Sqlite> for NaiveDate
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<Date, Sqlite> for NaiveDate
[src]
impl ToSql<Date, Sqlite> for NaiveDate
impl FromSql<Date, Sqlite> for *const str
[src]
impl FromSql<Date, 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<Date, Sqlite> for str
[src]
impl ToSql<Date, Sqlite> for str
impl ToSql<Date, Sqlite> for String
[src]
impl ToSql<Date, Sqlite> for String
impl<'expr> AsExpression<Date> for &'expr NaiveDate
[src]
impl<'expr> AsExpression<Date> for &'expr NaiveDate
type Expression = Bound<Date, 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<Date> for &'expr2 &'expr NaiveDate
[src]
impl<'expr2, 'expr> AsExpression<Date> for &'expr2 &'expr NaiveDate
type Expression = Bound<Date, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl AsExpression<Date> for NaiveDate
[src]
impl AsExpression<Date> for NaiveDate
type Expression = Bound<Date, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr> AsExpression<Date> for &'expr String
[src]
impl<'expr> AsExpression<Date> for &'expr String
type Expression = Bound<Date, 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<Date> for &'expr2 &'expr String
[src]
impl<'expr2, 'expr> AsExpression<Date> for &'expr2 &'expr String
type Expression = Bound<Date, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl AsExpression<Date> for String
[src]
impl AsExpression<Date> for String
type Expression = Bound<Date, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion
impl<'expr> AsExpression<Date> for &'expr str
[src]
impl<'expr> AsExpression<Date> for &'expr str
type Expression = Bound<Date, 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<Date> for &'expr2 &'expr str
[src]
impl<'expr2, 'expr> AsExpression<Date> for &'expr2 &'expr str
type Expression = Bound<Date, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
fn as_expression(self) -> Self::Expression
Perform the conversion