128
128
const char *field_name_arg);
129
129
virtual ~Field() {}
130
130
/* Store functions returns 1 on overflow and -1 on fatal error */
131
virtual int store(const char *to, uint32_t length,
132
const CHARSET_INFO * const cs)=0;
133
virtual int store(double nr)=0;
134
virtual int store(int64_t nr, bool unsigned_val)=0;
135
virtual int store_decimal(const my_decimal *d)=0;
131
virtual int store(const char *to, uint32_t length,
132
const CHARSET_INFO * const cs)=0;
133
virtual int store(double nr)=0;
134
virtual int store(int64_t nr, bool unsigned_val)=0;
135
virtual int store_decimal(const my_decimal *d)=0;
136
int store(const char *to, uint32_t length,
137
const CHARSET_INFO * const cs,
138
enum_check_fields check_level);
136
139
virtual int store_time(DRIZZLE_TIME *ltime,
137
140
enum enum_drizzle_timestamp_type t_type);
138
int store(const char *to, uint32_t length, const CHARSET_INFO * const cs,
139
enum_check_fields check_level);
140
141
virtual double val_real(void)=0;
141
142
virtual int64_t val_int(void)=0;
142
143
virtual my_decimal *val_decimal(my_decimal *);
385
386
virtual void set_key_image(const unsigned char *buff,uint32_t length)
386
{ set_image(buff,length, &my_charset_bin); }
387
{ set_image(buff,length, &my_charset_bin); }
387
388
inline int64_t val_int_offset(uint32_t row_offset)
390
int64_t tmp=val_int();
391
int64_t tmp=val_int();
394
396
inline int64_t val_int(const unsigned char *new_ptr)
396
398
unsigned char *old_ptr= ptr;
411
414
virtual bool send_binary(Protocol *protocol);
413
virtual unsigned char *pack(unsigned char *to, const unsigned char *from,
414
uint32_t max_length, bool low_byte_first);
416
@overload Field::pack(unsigned char*, const unsigned char*,
416
virtual unsigned char *pack(unsigned char *to,
417
const unsigned char *from,
419
bool low_byte_first);
419
421
unsigned char *pack(unsigned char *to, const unsigned char *from);
421
423
virtual const unsigned char *unpack(unsigned char* to,
426
428
@overload Field::unpack(unsigned char*, const unsigned char*,
429
const unsigned char *unpack(unsigned char* to, const unsigned char *from);
431
const unsigned char *unpack(unsigned char* to,
432
const unsigned char *from);
431
434
virtual unsigned char *pack_key(unsigned char* to, const unsigned char *from,
432
435
uint32_t max_length, bool low_byte_first)