22 #include <drizzled/function/func.h>
30 using Item_func::tmp_table_field;
34 enum Item_result result_type()
const {
return STRING_RESULT; }
35 enum_field_types field_type()
const {
return DRIZZLE_TYPE_TIME; }
38 double val_real() {
return val_real_from_decimal(); }
39 const char *func_name()
const {
return "time"; }
40 void fix_length_and_dec()
42 collation.set(&my_charset_bin);
47 virtual bool get_temporal(Time &temporal)=0;
48 Field *tmp_table_field(Table *table)
56 return val_decimal_from_time(decimal_value);
58 int save_in_field(
Field *field,
61 return save_time_in_field(field);
type::Decimal * val_decimal(type::Decimal *decimal_value)
Field * tmp_table_field_from_field_type(Table *table, bool fixed_length)
String * val_str(String *str)
static const int MAX_STRING_LENGTH