Drizzled Public API Documentation

drizzled::type::Time Class Reference

List of all members.

Public Member Functions

 Time (uint32_t year_arg, uint32_t month_arg, uint32_t day_arg, uint32_t hour_arg, uint32_t minute_arg, uint32_t second_arg, usec_t second_part_arg, timestamp_t type_arg)
 Time (uint32_t hour_arg, uint32_t minute_arg, uint32_t second_arg, usec_t second_part_arg, bool neg_arg)
void reset ()
timestamp_t type () const
void convert (drizzled::String &str, timestamp_t arg=type::DRIZZLE_TIMESTAMP_DATETIME)
void convert (char *str, size_t &to_length, timestamp_t arg=type::DRIZZLE_TIMESTAMP_DATETIME)
void convert (datetime_t &datetime, timestamp_t arg=type::DRIZZLE_TIMESTAMP_DATETIME)
void convert (datetime_t &ret, int64_t nr, uint32_t flags)
void convert (datetime_t &ret, int64_t nr, uint32_t flags, type::cut_t &was_cut)
void convert (type::epoch_t &epoch, long *my_timezone) const
void truncate (const timestamp_t arg)
bool store (const char *str, uint32_t length, int &warning, type::timestamp_t arg=DRIZZLE_TIMESTAMP_TIME)
type::timestamp_t store (const char *str, uint32_t length, uint32_t flags, type::cut_t &was_cut)
type::timestamp_t store (const char *str, uint32_t length, uint32_t flags)
void store (type::epoch_t from)
void store (type::epoch_t from, usec_t from_fractional_seconds)
void store (const tm &)
void store (const timeval &)
bool check (bool not_zero_date, uint32_t flags, type::cut_t &was_cut) const
 Check datetime value for validity according to flags.
bool isValidEpoch () const

Public Attributes

uint32_t year
uint32_t month
uint32_t day
uint32_t hour
uint32_t minute
uint32_t second
usec_t second_part
bool neg
timestamp_t time_type

Static Public Attributes

static const uint32_t FRACTIONAL_DIGITS = 1000000
static const size_t MAX_STRING_LENGTH = 32

Detailed Description

Definition at line 106 of file time.h.


Member Function Documentation

bool drizzled::type::Time::check ( bool  not_zero_date,
uint32_t  flags,
type::cut_t &  was_cut 
) const

Check datetime value for validity according to flags.

Parameters:
[in]ltimeDate to check.
[in]not_zero_dateltime is not the zero date
[in]flagsflags to check (see store() flags in drizzle_time.h)
[out]was_cutset to 2 if value was invalid according to flags. (Feb 29 in non-leap etc.) This remains unchanged if value is not invalid.

Here we assume that year and month is ok! If month is 0 we allow any date. (This only happens if we allow zero date parts in store()) Disallow dates with zero year and non-zero month and/or day.

Returns:
0 OK 1 error

Definition at line 97 of file time.cc.

Referenced by drizzled::Field_date::store_time().


The documentation for this class was generated from the following files: