23 #include <drizzled/error.h>
24 #include <drizzled/function/time/quarter.h>
42 Item_result arg0_result_type= args[0]->result_type();
44 switch (arg0_result_type)
57 char buff[DRIZZLE_MAX_LENGTH_DATETIME_AS_STRING];
58 String tmp(buff,
sizeof(buff), &my_charset_utf8_bin);
61 if (res && (res != &tmp))
66 if (! temporal.
from_string(tmp.c_ptr(), tmp.length()))
72 my_error(ER_INVALID_DATETIME_VALUE, MYF(0), tmp.c_ptr());
88 char buff[DRIZZLE_MAX_LENGTH_DATETIME_AS_STRING];
89 String tmp(buff,
sizeof(buff), &my_charset_utf8_bin);
94 if (res && (res != &tmp))
99 my_error(ER_INVALID_DATETIME_VALUE, MYF(0), tmp.c_ptr());
103 return (int64_t) ((temporal.
months() + 2) / 3);
bool from_string(const char *from, size_t from_len)
virtual int64_t val_int()=0
TODO: Rename this file - func.h is stupid.
bool from_int64_t(const int64_t from, bool convert)
virtual String * val_str(String *str)=0