~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/protocol.h

  • Committer: Monty Taylor
  • Date: 2008-11-17 23:20:25 UTC
  • mto: (589.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081117232025-01m5jfd4l9cn93kb
Removed field.h from common_includes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef DRIZZLED_PROTOCOL_H
21
21
#define DRIZZLED_PROTOCOL_H
22
22
 
 
23
#include <drizzled/sql_list.h>
 
24
 
 
25
class String;
23
26
class i_string;
24
27
class Session;
 
28
class my_decimal;
25
29
typedef struct st_drizzle_field DRIZZLE_FIELD;
26
30
typedef struct st_drizzle_rows DRIZZLE_ROWS;
 
31
typedef struct st_drizzle_time DRIZZLE_TIME;
27
32
 
28
33
class Protocol
29
34
{
50
55
  bool store(I_List<i_string> *str_list);
51
56
  bool store(const char *from, const CHARSET_INFO * const cs);
52
57
  String *storage_packet() { return packet; }
53
 
  inline void free() { packet->free(); }
 
58
  void free();
54
59
  virtual bool write();
55
60
  inline  bool store(int from)
56
61
  { return store_long((int64_t) from); }
60
65
  { return store_int64_t((int64_t) from, 0); }
61
66
  inline  bool store(uint64_t from)
62
67
  { return store_int64_t((int64_t) from, 1); }
63
 
  inline bool store(String *str)
64
 
  { return store((char*) str->ptr(), str->length(), str->charset()); }
 
68
  bool store(String *str);
65
69
 
66
 
  virtual bool prepare_for_send(List<Item> *item_list) 
 
70
  virtual bool prepare_for_send(List<Item> *item_list)
67
71
  {
68
72
    field_count=item_list->elements;
69
73
    return 0;
77
81
  virtual bool store_short(int64_t from)=0;
78
82
  virtual bool store_long(int64_t from)=0;
79
83
  virtual bool store_int64_t(int64_t from, bool unsigned_flag)=0;
80
 
  virtual bool store_decimal(const my_decimal *)=0;
 
84
  virtual bool store_decimal(const my_decimal * dec_value)=0;
81
85
  virtual bool store(const char *from, size_t length, const CHARSET_INFO * const cs)=0;
82
86
  virtual bool store(const char *from, size_t length, 
83
87
                     const CHARSET_INFO * const fromcs, const CHARSET_INFO * const tocs)=0;