pub struct OracleTimestamp {
pub year: i32,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub microsecond: u32,
pub tz_hour_offset: i8,
pub tz_minute_offset: i8,
}Expand description
Decoded Oracle TIMESTAMP (with optional timezone)
Fields§
§year: i32Year (e.g., 2024)
month: u8Month (1-12)
day: u8Day (1-31)
hour: u8Hour (0-23)
minute: u8Minute (0-59)
second: u8Second (0-59)
microsecond: u32Fractional seconds in microseconds (0-999999)
tz_hour_offset: i8Timezone hour offset (-12 to +14)
tz_minute_offset: i8Timezone minute offset (-59 to +59)
Implementations§
Source§impl OracleTimestamp
impl OracleTimestamp
Sourcepub fn new(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
microsecond: u32,
) -> Self
pub fn new( year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, microsecond: u32, ) -> Self
Create a new timestamp without timezone
Sourcepub fn with_timezone(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
microsecond: u32,
tz_hour_offset: i8,
tz_minute_offset: i8,
) -> Self
pub fn with_timezone( year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, microsecond: u32, tz_hour_offset: i8, tz_minute_offset: i8, ) -> Self
Create a timestamp with timezone offset
Sourcepub fn has_timezone(&self) -> bool
pub fn has_timezone(&self) -> bool
Check if this timestamp has a timezone
Sourcepub fn to_date(&self) -> OracleDate
pub fn to_date(&self) -> OracleDate
Convert to OracleDate (loses fractional seconds and timezone)
Sourcepub fn to_oracle_bytes(&self) -> [u8; 11]
pub fn to_oracle_bytes(&self) -> [u8; 11]
Encode to Oracle wire format (11 bytes for TIMESTAMP)
Trait Implementations§
Source§impl Clone for OracleTimestamp
impl Clone for OracleTimestamp
Source§fn clone(&self) -> OracleTimestamp
fn clone(&self) -> OracleTimestamp
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OracleTimestamp
impl Debug for OracleTimestamp
Source§impl Default for OracleTimestamp
impl Default for OracleTimestamp
Source§impl From<OracleDate> for OracleTimestamp
impl From<OracleDate> for OracleTimestamp
Source§fn from(date: OracleDate) -> Self
fn from(date: OracleDate) -> Self
Converts to this type from the input type.
Source§impl PartialEq for OracleTimestamp
impl PartialEq for OracleTimestamp
impl Copy for OracleTimestamp
impl Eq for OracleTimestamp
impl StructuralPartialEq for OracleTimestamp
Auto Trait Implementations§
impl Freeze for OracleTimestamp
impl RefUnwindSafe for OracleTimestamp
impl Send for OracleTimestamp
impl Sync for OracleTimestamp
impl Unpin for OracleTimestamp
impl UnwindSafe for OracleTimestamp
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.