~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/date.h

  • Committer: Monty Taylor
  • Date: 2008-11-15 17:58:57 UTC
  • mfrom: (575.5.1 drizzle)
  • mto: (589.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 586.
  • Revision ID: monty@inaugust.com-20081115175857-kxdeopxzbyyz5bkd
MergedĀ fromĀ David.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLE_SERVER_FIELD_NEW_DATE
22
 
#define DRIZZLE_SERVER_FIELD_NEW_DATE
 
21
#ifndef DRIZZLE_SERVER_FIELD_DATE
 
22
#define DRIZZLE_SERVER_FIELD_DATE
23
23
 
24
 
class Field_newdate :public Field_str {
 
24
class Field_date :public Field_str {
25
25
public:
26
 
  Field_newdate(unsigned char *ptr_arg, unsigned char *null_ptr_arg, unsigned char null_bit_arg,
 
26
  Field_date(unsigned char *ptr_arg, unsigned char *null_ptr_arg, unsigned char null_bit_arg,
27
27
                enum utype unireg_check_arg, const char *field_name_arg,
28
28
                const CHARSET_INFO * const cs)
29
29
    :Field_str(ptr_arg, 10, null_ptr_arg, null_bit_arg,
30
30
               unireg_check_arg, field_name_arg, cs)
31
31
    {}
32
 
  Field_newdate(bool maybe_null_arg, const char *field_name_arg,
 
32
  Field_date(bool maybe_null_arg, const char *field_name_arg,
33
33
                const CHARSET_INFO * const cs)
34
34
    :Field_str((unsigned char*) 0,10, maybe_null_arg ? (unsigned char*) "": 0,0,
35
35
               NONE, field_name_arg, cs) {}
36
 
  enum_field_types type() const { return DRIZZLE_TYPE_NEWDATE;}
37
 
  enum_field_types real_type() const { return DRIZZLE_TYPE_NEWDATE; }
 
36
  enum_field_types type() const { return DRIZZLE_TYPE_DATE;}
 
37
  enum_field_types real_type() const { return DRIZZLE_TYPE_DATE; }
38
38
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_UINT24; }
39
39
  enum Item_result cmp_type () const { return INT_RESULT; }
40
40
  int  store(const char *to,uint32_t length, const CHARSET_INFO * const charset);