Module tidb_query_datatype::codec::mysql::time[][src]

Re-exports

pub use self::extension::*;
pub use self::weekmode::WeekMode;

Modules

extension
parser
tz
weekmode

Structs

Time
TimeArgs

A validator that verify each field for the Time NOTE: It’s inappropriate to construct Time first and then verify it. Because Time uses bitfield, the range of each field is quite narrow. For example, the size of month field is 5 bits. If we get a value 16 for month and set it, we will got 0 (16 % 16 == 0) instead 16 which is definitely an invalid value. So we need a larger range for validation.

Enums

TimeType
Tz

A time zone represented by either offset (i.e. +8) or name (i.e. Asia/Shanghai). In addition, local time zone is also valid.

Constants

MAX_COMPONENTS_LEN
MAX_TIMESTAMP
MAX_YEAR
MICRO_WIDTH
MIN_TIMESTAMP
MIN_YEAR
MONTH_NAMES
MONTH_NAMES_ABBR

Traits

TimeDatumPayloadChunkEncoder
TimeDecoder
TimeEncoder

Time Encoder for Chunk format

Functions

chrono_datetime
chrono_naive_datetime
handle_invalid_date
handle_zero_date
handle_zero_in_date
is_leap_year
last_day_of_month
round_components

Round each component.

round_frac

Round frac with fsp, return if there is a carry and the result. NOTE: we assume that frac is less than 100_000_000 and fsp is valid.