List of all members.
Public Member Functions |
| Field_newdate (uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg) |
| Field_newdate (bool maybe_null_arg, const char *field_name_arg) |
enum_field_types | type () const |
enum_field_types | real_type () const |
enum ha_base_keytype | key_type () const |
type_conversion_status | reset (void) |
type_conversion_status | store_packed (longlong nr) |
longlong | val_int (void) |
longlong | val_time_temporal () |
longlong | val_date_temporal () |
String * | val_str (String *, String *) |
bool | send_binary (Protocol *protocol) |
int | cmp (const uchar *, const uchar *) |
void | make_sort_key (uchar *buff, uint length) |
uint32 | pack_length () const |
void | sql_type (String &str) const |
bool | zero_pack () const |
bool | get_date (MYSQL_TIME *ltime, uint fuzzydate) |
Field_newdate * | clone (MEM_ROOT *mem_root) const |
Field_newdate * | clone () const |
Protected Member Functions |
ulonglong | date_flags (const THD *thd) |
bool | get_date_internal (MYSQL_TIME *ltime) |
type_conversion_status | store_internal (const MYSQL_TIME *ltime, int *error) |
Static Protected Attributes |
static const int | PACK_LENGTH = 3 |
Member Function Documentation
Makes a shallow copy of the Field object.
- Note:
- This member function must be overridden in all concrete subclasses. Several of the Field subclasses are concrete even though they are not leaf classes, so the compiler will not always catch this.
- Parameters:
-
mem_root | MEM_ROOT to use for memory allocation. |
- Return values:
-
NULL | If memory allocation failed. |
Implements Field.
Makes a shallow copy of the Field object.
- Note:
- This member function must be overridden in all concrete subclasses. Several of the Field subclasses are concrete even though they are not leaf classes, so the compiler will not always catch this.
- Return values:
-
NULL | If memory allocation failed. |
Implements Field.
Flags that are passed as "flag" argument to check_date(), number_to_datetime(), str_to_datetime().
Flags depend on the session sql_mode settings, such as MODE_NO_ZERO_DATE, MODE_NO_ZERO_IN_DATE. Also, Field_newdate, Field_datetime, Field_datetimef add TIME_FUZZY_DATE to the session sql_mode settings, to allow relaxed date format, while Field_timestamp, Field_timestampf do not.
- Parameters:
-
- Return values:
-
sql_mode | flags mixed with the field type flags. |
Reimplemented from Field_temporal.
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comparison. Integers are always in big-endian regardless of hardware architecture. At most length bytes are written into the buffer.
- Parameters:
-
buff | The buffer, assumed to be at least length bytes. |
length | Number of bytes to write. |
Implements Field.
Low level routine to store a MYSQL_TIME value into a field. The value must be already properly rounded or truncated and checked for being a valid TIME/DATE/DATETIME value.
- Parameters:
-
IN | ltime MYSQL_TIME value. |
OUT | error Error flag vector, set in case of error. |
- Return values:
-
false | In case of success. |
true | In case of error. |
Implements Field_temporal.
Store a temporal value in packed longlong format into a field. The packed value is compatible with TIME_to_longlong_time_packed(), TIME_to_longlong_date_packed() or TIME_to_longlong_datetime_packed(). Note, the value must be properly rounded or truncated according according to field->decimals().
- Parameters:
-
nr | temporal value in packed longlong format. |
- Return values:
-
false | on success |
true | on error |
Reimplemented from Field.
Returns DATE/DATETIME value in packed longlong format. This method should not be called for non-temporal types. Temporal field types override the default method.
Reimplemented from Field_temporal_with_date.
Returns TIME value in packed longlong format. This method should not be called for non-temporal types. Temporal field types override the default method.
Reimplemented from Field_temporal_with_date.
The documentation for this class was generated from the following files: