pub struct TimestampTzDataType {
pub precision: u8,
}Expand description
Timestamp with timezone awareness.
Maps to: TIMESTAMPTZ (PostgreSQL), DATETIMEOFFSET (SQL Server),
TIMESTAMP_TZ/TIMESTAMP_LTZ (Snowflake), TIMESTAMP (Databricks),
DateTime64 (ClickHouse).
§Example
use razeri_plugin_contract::DataType;
use razeri_plugin_contract::data_type::TimestampTzDataType;
// Default: precision 6
let ts = TimestampTzDataType::default();
assert_eq!(ts.precision, 6);
// Via DataType convenience
let created_tz = DataType::timestamp_tz();Fields§
§precision: u8Fractional seconds precision (0-9).
Implementations§
Source§impl TimestampTzDataType
impl TimestampTzDataType
Sourcepub fn new(precision: u8) -> Self
pub fn new(precision: u8) -> Self
Creates a new TimestampTzDataType with the given fractional seconds precision.
§Panics
Panics if precision exceeds 9.
§Example
use razeri_plugin_contract::data_type::TimestampTzDataType;
let ts = TimestampTzDataType::new(3);
assert_eq!(ts.precision, 3);ⓘ
use razeri_plugin_contract::data_type::TimestampTzDataType;
let _ = TimestampTzDataType::new(10); // panics: precision must be 0-9Trait Implementations§
Source§impl Clone for TimestampTzDataType
impl Clone for TimestampTzDataType
Source§impl Debug for TimestampTzDataType
impl Debug for TimestampTzDataType
Source§impl Default for TimestampTzDataType
impl Default for TimestampTzDataType
impl Eq for TimestampTzDataType
Source§impl Hash for TimestampTzDataType
impl Hash for TimestampTzDataType
Source§impl PartialEq for TimestampTzDataType
impl PartialEq for TimestampTzDataType
impl StructuralPartialEq for TimestampTzDataType
Auto Trait Implementations§
impl Forget for TimestampTzDataType
impl Freeze for TimestampTzDataType
impl Move for TimestampTzDataType
impl RefUnwindSafe for TimestampTzDataType
impl Send for TimestampTzDataType
impl Sync for TimestampTzDataType
impl Unpin for TimestampTzDataType
impl UnsafeUnpin for TimestampTzDataType
impl UnwindSafe for TimestampTzDataType
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