~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/protocol.h

Finished store() cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
  virtual bool have_more_data(void)= 0;
63
63
  virtual bool is_reading(void)= 0;
64
64
  virtual bool is_writing(void)= 0;
65
 
 
66
65
  virtual bool init_file_descriptor(int fd)=0;
67
66
  virtual int file_descriptor(void)=0;
68
67
  virtual void init_random(uint64_t, uint64_t) {};
86
85
  enum { SEND_NUM_ROWS= 1, SEND_DEFAULTS= 2, SEND_EOF= 4 };
87
86
  virtual bool send_fields(List<Item> *list, uint32_t flags)= 0;
88
87
 
 
88
  virtual bool store(Field *from)= 0;
89
89
  virtual bool store(void)= 0;
90
90
  virtual bool store(int32_t from)= 0;
91
91
  virtual bool store(uint32_t from)= 0;
92
92
  virtual bool store(int64_t from)= 0;
93
93
  virtual bool store(uint64_t from)= 0;
94
 
  virtual bool store(String *str)= 0;
95
 
  virtual bool store(DRIZZLE_TIME *time)=0;
96
 
 
97
 
  virtual bool store_decimal(const my_decimal * dec_value)=0;
98
 
  virtual bool store(I_List<i_string> *str_list)= 0;
99
 
  virtual bool store(const char *from, const CHARSET_INFO * const cs)= 0;
100
 
  virtual bool store(const char *from, size_t length,
101
 
                     const CHARSET_INFO * const cs)=0;
102
 
  virtual bool store(const char *from, size_t length,
103
 
                     const CHARSET_INFO * const fromcs,
104
 
                     const CHARSET_INFO * const tocs)=0;
105
 
  virtual bool store(float from, uint32_t decimals, String *buffer)=0;
106
 
  virtual bool store(double from, uint32_t decimals, String *buffer)=0;
107
 
  virtual bool store(Field *field)=0;
 
94
  virtual bool store(double from, uint32_t decimals, String *buffer)= 0;
 
95
  virtual bool store(const DRIZZLE_TIME *from)= 0;
 
96
  virtual bool store(const char *from, const CHARSET_INFO * const cs)
 
97
  {
 
98
    if (from == NULL)
 
99
      store();
 
100
    return store(from, strlen(from), cs);
 
101
  }
 
102
  virtual bool store(const char *from, size_t length,
 
103
                     const CHARSET_INFO * const cs)= 0;
108
104
};
109
105
 
110
106
class ProtocolFactory