pub enum TimeFormatStyle {
Strftime,
Mysql,
Postgres,
Snowflake,
Java,
Tsql,
ClickHouse,
}Expand description
Time format styles used by different dialect families.
Variants§
Strftime
Python strftime / SQLite / BigQuery: %Y, %m, %d, %H, %M, %S
Mysql
MySQL: %Y, %m, %d, %H, %i, %s (note: %i for minutes)
Postgres
PostgreSQL / Oracle / Redshift: YYYY, MM, DD, HH24, MI, SS
Snowflake
Snowflake: YYYY, MM, DD, HH24, MI, SS, FF
Java
Spark / Hive / Databricks: Java DateTimeFormatter yyyy, MM, dd, HH, mm, ss
Tsql
T-SQL: Uses numeric style codes (FORMAT function uses .NET patterns)
ClickHouse
ClickHouse: Similar to strftime but with some differences
Implementations§
Source§impl TimeFormatStyle
impl TimeFormatStyle
Sourcepub fn for_dialect(dialect: Dialect) -> Self
pub fn for_dialect(dialect: Dialect) -> Self
Determine the time format style for a given dialect.
Trait Implementations§
Source§impl Clone for TimeFormatStyle
impl Clone for TimeFormatStyle
Source§fn clone(&self) -> TimeFormatStyle
fn clone(&self) -> TimeFormatStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimeFormatStyle
impl Debug for TimeFormatStyle
Source§impl Hash for TimeFormatStyle
impl Hash for TimeFormatStyle
Source§impl PartialEq for TimeFormatStyle
impl PartialEq for TimeFormatStyle
impl Copy for TimeFormatStyle
impl Eq for TimeFormatStyle
impl StructuralPartialEq for TimeFormatStyle
Auto Trait Implementations§
impl Freeze for TimeFormatStyle
impl RefUnwindSafe for TimeFormatStyle
impl Send for TimeFormatStyle
impl Sync for TimeFormatStyle
impl Unpin for TimeFormatStyle
impl UnsafeUnpin for TimeFormatStyle
impl UnwindSafe for TimeFormatStyle
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