Struct tidb_query_datatype::codec::mysql::time::Time [−][src]
Implementations
impl Time
[src]
fn get_year(&self) -> u32
[src]
fn set_year(&mut self, value: u32)
[src]
fn get_month(&self) -> u32
[src]
fn set_month(&mut self, value: u32)
[src]
fn get_day(&self) -> u32
[src]
fn set_day(&mut self, value: u32)
[src]
fn get_hour(&self) -> u32
[src]
fn set_hour(&mut self, value: u32)
[src]
fn get_minute(&self) -> u32
[src]
fn set_minute(&mut self, value: u32)
[src]
fn get_second(&self) -> u32
[src]
fn set_second(&mut self, value: u32)
[src]
fn get_micro(&self) -> u32
[src]
fn set_micro(&mut self, value: u32)
[src]
fn get_fsp_tt(&self) -> u8
[src]
fn set_fsp_tt(&mut self, value: u8)
[src]
impl Time
[src]
pub fn hour(self) -> u32
[src]
Returns the hour number from 0 to 23.
pub fn minute(self) -> u32
[src]
Returns the minute number from 0 to 59.
pub fn second(self) -> u32
[src]
Returns the second number from 0 to 59.
pub fn micro(self) -> u32
[src]
Returns the number of microseconds since the whole second.
pub fn year(self) -> u32
[src]
Returns the year number
pub fn month(self) -> u32
[src]
Returns the month number
pub fn day(self) -> u32
[src]
Returns the day number
pub fn period_to_month(period: u64) -> u64
[src]
used to convert period to month
pub fn month_to_period(month: u64) -> u64
[src]
used to convert month to period
impl Time
[src]
pub fn parse(
ctx: &mut EvalContext,
input: &str,
time_type: TimeType,
fsp: i8,
round: bool
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: &str,
time_type: TimeType,
fsp: i8,
round: bool
) -> Result<Time>
pub fn parse_datetime(
ctx: &mut EvalContext,
input: &str,
fsp: i8,
round: bool
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: &str,
fsp: i8,
round: bool
) -> Result<Time>
pub fn parse_date(ctx: &mut EvalContext, input: &str) -> Result<Time>
[src]
pub fn parse_timestamp(
ctx: &mut EvalContext,
input: &str,
fsp: i8,
round: bool
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: &str,
fsp: i8,
round: bool
) -> Result<Time>
pub fn parse_from_i64(
ctx: &mut EvalContext,
input: i64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: i64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
pub fn parse_from_decimal(
ctx: &mut EvalContext,
input: &Decimal,
time_type: TimeType,
fsp: i8,
round: bool
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: &Decimal,
time_type: TimeType,
fsp: i8,
round: bool
) -> Result<Time>
impl Time
[src]
fn from_slice(
ctx: &mut EvalContext,
parts: &[u32],
time_type: TimeType,
fsp: u8
) -> Option<Self>
[src]
ctx: &mut EvalContext,
parts: &[u32],
time_type: TimeType,
fsp: u8
) -> Option<Self>
fn from_aligned_i64(
ctx: &mut EvalContext,
input: i64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: i64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
Construct a Time
via a number in format: yyyymmddhhmmss
fn into_array(self) -> [u32; 7]
[src]
fn try_from_chrono_datetime<T: Datelike + Timelike>(
ctx: &mut EvalContext,
datetime: T,
time_type: TimeType,
fsp: i8
) -> Result<Self>
[src]
ctx: &mut EvalContext,
datetime: T,
time_type: TimeType,
fsp: i8
) -> Result<Self>
fn try_into_chrono_datetime(self, ctx: &mut EvalContext) -> Result<DateTime<Tz>>
[src]
fn try_into_chrono_naive_datetime(self) -> Result<NaiveDateTime>
[src]
fn unchecked_new(config: TimeArgs) -> Self
[src]
fn new(ctx: &mut EvalContext, config: TimeArgs) -> Result<Time>
[src]
fn check_month_and_day(
year: u32,
month: u32,
day: u32,
allow_invalid_date: bool
) -> Result<()>
[src]
year: u32,
month: u32,
day: u32,
allow_invalid_date: bool
) -> Result<()>
pub fn is_zero(self) -> bool
[src]
pub fn zero(ctx: &mut EvalContext, fsp: i8, time_type: TimeType) -> Result<Self>
[src]
pub fn is_leap_year(self) -> bool
[src]
pub fn last_day_of_month(self) -> u32
[src]
pub fn last_date_of_month(self) -> Option<Self>
[src]
pub fn fsp(self) -> u8
[src]
fn set_fsp(&mut self, fsp: u8)
[src]
pub fn maximize_fsp(&mut self)
[src]
pub fn minimize_fsp(&mut self)
[src]
pub fn get_time_type(self) -> TimeType
[src]
pub fn set_time_type(&mut self, time_type: TimeType) -> Result<()>
[src]
fn set_tt(&mut self, time_type: TimeType)
[src]
pub fn from_packed_u64(
ctx: &mut EvalContext,
value: u64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
[src]
ctx: &mut EvalContext,
value: u64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
pub fn to_packed_u64(self, ctx: &mut EvalContext) -> Result<u64>
[src]
pub fn from_duration(
ctx: &mut EvalContext,
duration: Duration,
time_type: TimeType
) -> Result<Self>
[src]
ctx: &mut EvalContext,
duration: Duration,
time_type: TimeType
) -> Result<Self>
pub fn from_year(
ctx: &mut EvalContext,
year: u32,
fsp: i8,
time_type: TimeType
) -> Result<Self>
[src]
ctx: &mut EvalContext,
year: u32,
fsp: i8,
time_type: TimeType
) -> Result<Self>
pub fn round_frac(self, ctx: &mut EvalContext, fsp: i8) -> Result<Self>
[src]
pub fn normalized(self, ctx: &mut EvalContext) -> Result<Self>
[src]
pub fn checked_add(self, ctx: &mut EvalContext, rhs: Duration) -> Option<Time>
[src]
pub fn checked_sub(self, ctx: &mut EvalContext, rhs: Duration) -> Option<Time>
[src]
pub fn date_diff(self, other: Self) -> Option<i64>
[src]
pub fn ordinal(self) -> i32
[src]
pub fn weekday(self) -> Weekday
[src]
fn write_date_format_segment(self, b: char, output: &mut String) -> Result<()>
[src]
pub fn date_format(self, layout: &str) -> Result<String>
[src]
pub fn to_numeric_string(self) -> String
[src]
Converts a DateTime
to printable string representation
pub fn parse_fsp(s: &str) -> i8
[src]
pub fn invalid_zero(self) -> bool
[src]
pub fn from_days(ctx: &mut EvalContext, daynr: u32) -> Result<Self>
[src]
fn get_date_from_daynr(daynr: u32) -> (u32, u32, u32)
[src]
Trait Implementations
impl AsMySQLBool for Time
[src]
fn as_mysql_bool(&self, _context: &mut EvalContext) -> Result<bool>
[src]
impl<T> BitRange<T> for Time where
u64: BitRange<T>,
[src]
u64: BitRange<T>,
fn bit_range(&self, msb: usize, lsb: usize) -> T
[src]
fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)
[src]
impl Clone for Time
[src]
impl ConvertTo<Decimal> for Time
[src]
fn convert(&self, _: &mut EvalContext) -> Result<Decimal>
[src]
impl ConvertTo<Duration> for Time
[src]
fn convert(&self, _: &mut EvalContext) -> Result<Duration>
[src]
Port from TiDB’s Time::ConvertToDuration
impl ConvertTo<Json> for Time
[src]
fn convert(&self, ctx: &mut EvalContext) -> Result<Json>
[src]
impl ConvertTo<f64> for Time
[src]
fn convert(&self, _: &mut EvalContext) -> Result<f64>
[src]
This function should not return err, if it return err, then the err is because of bug.
impl Copy for Time
[src]
impl DateTimeExtension for Time
[src]
fn days(&self) -> i32
[src]
returns the day of year starting from 1. implements TiDB YearDay().
fn calc_year_week(
&self,
monday_first: bool,
week_year: bool,
first_weekday: bool
) -> (i32, i32)
[src]
&self,
monday_first: bool,
week_year: bool,
first_weekday: bool
) -> (i32, i32)
returns the week of year and year. should not be called directly. when monday_first == true, Monday is considered as the first day in the week, otherwise Sunday. when week_year == true, week is from 1 to 53, otherwise from 0 to 53. when first_weekday == true, the week that contains the first ‘first-day-of-week’ is week 1, otherwise weeks are numbered according to ISO 8601:1988.
fn calc_year_week_by_week_mode(&self, week_mode: WeekMode) -> (i32, i32)
[src]
returns the week of year according to week mode. should not be called directly. implements TiDB calcWeek()
fn week(&self, mode: WeekMode) -> i32
[src]
returns the week of year. implements TiDB Week().
fn year_week(&self, mode: WeekMode) -> (i32, i32)
[src]
returns the week of year and year. implements TiDB YearWeek().
fn abbr_day_of_month(&self) -> &'static str
[src]
returns the abbreviation of the day of month.
fn day_number(&self) -> i32
[src]
returns the days since 0000-00-00
fn second_number(&self) -> i64
[src]
returns the seconds since 0000-00-00 00:00:00
impl Debug for Time
[src]
impl Default for Time
[src]
impl Display for Time
[src]
impl Eq for Time
[src]
impl Evaluable for DateTime
[src]
const EVAL_TYPE: EvalType
[src]
fn borrow_scalar_value(v: &ScalarValue) -> Option<&Self>
[src]
fn borrow_scalar_value_ref<'a>(v: ScalarValueRef<'a>) -> Option<&'a Self>
[src]
fn borrow_vector_value(v: &VectorValue) -> &ChunkedVecSized<DateTime>
[src]
impl EvaluableRet for DateTime
[src]
const EVAL_TYPE: EvalType
[src]
type ChunkedType = ChunkedVecSized<Self>
fn cast_chunk_into_vector_value(vec: ChunkedVecSized<Self>) -> VectorValue
[src]
impl From<Time> for ScalarValue
[src]
fn from(s: DateTime) -> ScalarValue
[src]
impl From<Time> for Datum
[src]
impl Hash for Time
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Time
[src]
fn cmp(&self, right: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Time> for Time
[src]
impl PartialOrd<Time> for Time
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a> RawDatumDecoder<Time> for &'a [u8]
[src]
impl ToInt for DateTime
[src]
fn to_int(&self, ctx: &mut EvalContext, tp: FieldTypeTp) -> Result<i64>
[src]
fn to_uint(&self, ctx: &mut EvalContext, tp: FieldTypeTp) -> Result<u64>
[src]
impl VectorValueExt<Time> for VectorValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Bit for T where
T: BitRange<u8>,
[src]
T: BitRange<u8>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(&mut EvalContext, W) -> Result<V, Error>
[src]
impl<T> ConvertTo<NotNan<f64>> for T where
T: ConvertTo<f64> + EvaluableRet,
[src]
T: ConvertTo<f64> + EvaluableRet,
impl<T> ConvertTo<String> for T where
T: ToString + EvaluableRet,
[src]
T: ToString + EvaluableRet,
impl<T> ConvertTo<Vec<u8, Global>> for T where
T: ToString + EvaluableRet,
[src]
T: ToString + EvaluableRet,
impl<T> ConvertTo<i64> for T where
T: ToInt,
[src]
T: ToInt,
impl<T> ConvertTo<u64> for T where
T: ToInt,
[src]
T: ToInt,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,