~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/libdrizzle/structs.h

  • Committer: Mark Atwood
  • Date: 2011-10-08 04:50:51 UTC
  • mfrom: (2430.1.1 rf)
  • Revision ID: me@mark.atwood.name-20111008045051-6ha1qiy7k2a9c3jv
Tags: 2011.10.27
mergeĀ lp:~olafvdspek/drizzle/refactor2

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 *
35
35
 */
36
36
 
37
 
#pragma once
38
 
 
39
37
/**
40
38
 * @file
41
39
 * @brief Struct Definitions
42
40
 */
43
41
 
 
42
#ifndef __DRIZZLE_STRUCTS_H
 
43
#define __DRIZZLE_STRUCTS_H
 
44
 
44
45
#include <sys/types.h>
45
46
 
46
47
#ifndef NI_MAXHOST
69
70
{
70
71
public:
71
72
  uint16_t error_code;
72
 
  struct options_t {
73
 
    bool is_allocated;
74
 
    bool is_non_blocking;
75
 
    bool is_free_objects;
76
 
    bool is_assert_dangling;
77
 
 
78
 
    options_t() :
79
 
      is_allocated(false),
80
 
      is_non_blocking(false),
81
 
      is_free_objects(false),
82
 
      is_assert_dangling(false)
83
 
    { }
84
 
  } options;
 
73
  int options;
85
74
  drizzle_verbose_t verbose;
86
75
  uint32_t con_count;
87
76
  uint32_t pfds_size;
104
93
 
105
94
  drizzle_st() :
106
95
    error_code(0),
107
 
    options(),
 
96
    options(DRIZZLE_NONE),
108
97
    verbose(DRIZZLE_VERBOSE_ERROR),
109
98
    con_count(0),
110
99
    pfds_size(0),
161
150
  int capabilities;
162
151
  drizzle_charset_t charset;
163
152
  drizzle_command_t command;
164
 
  struct option_t {
165
 
    bool is_allocated;
166
 
 
167
 
    option_t() :
168
 
      is_allocated(false)
169
 
    { }
170
 
  } _options;
171
153
  int options;
172
154
  drizzle_con_socket_t socket_type;
173
155
  drizzle_con_status_t status;
200
182
    drizzle_con_uds_st uds;
201
183
  } socket;
202
184
  uint8_t buffer[DRIZZLE_MAX_BUFFER_SIZE];
203
 
  char schema[DRIZZLE_MAX_DB_SIZE];
 
185
  char db[DRIZZLE_MAX_DB_SIZE];
204
186
  char password[DRIZZLE_MAX_PASSWORD_SIZE];
205
187
  uint8_t scramble_buffer[DRIZZLE_MAX_SCRAMBLE_SIZE];
206
188
  char server_version[DRIZZLE_MAX_SERVER_VERSION_SIZE];
247
229
 */
248
230
class drizzle_query_st
249
231
{
250
 
private:
251
232
public:
252
233
  drizzle_st *drizzle;
253
234
  drizzle_query_st *next;
254
235
  drizzle_query_st *prev;
255
 
  struct option_t {
256
 
    bool is_allocated;
257
 
 
258
 
    option_t() :
259
 
      is_allocated(false)
260
 
    { }
261
 
  } options;
 
236
  int options;
262
237
  drizzle_query_state_t state;
263
238
  drizzle_con_st *con;
264
239
  drizzle_result_st *result;
271
246
    drizzle(NULL),
272
247
    next(NULL),
273
248
    prev(NULL),
 
249
    options(0),
274
250
    con(NULL),
275
251
    result(NULL),
276
252
    string(NULL),
289
265
  drizzle_con_st *con;
290
266
  drizzle_result_st *next;
291
267
  drizzle_result_st *prev;
292
 
  struct option_t {
293
 
    bool is_allocated;
294
 
 
295
 
    option_t() :
296
 
      is_allocated(false)
297
 
    { }
298
 
  } _options;
299
268
  int options;
300
269
 
301
270
  char info[DRIZZLE_MAX_INFO_SIZE];
363
332
  drizzle_result_st *result;
364
333
  drizzle_column_st *next;
365
334
  drizzle_column_st *prev;
366
 
  struct options_t {
367
 
    bool is_allocated;
368
 
 
369
 
    options_t() :
370
 
      is_allocated(false)
371
 
    { }
372
 
  } options;
 
335
  int options;
373
336
  char catalog[DRIZZLE_MAX_CATALOG_SIZE];
374
 
  char schema[DRIZZLE_MAX_DB_SIZE];
 
337
  char db[DRIZZLE_MAX_DB_SIZE];
375
338
  char table[DRIZZLE_MAX_TABLE_SIZE];
376
339
  char orig_table[DRIZZLE_MAX_TABLE_SIZE];
377
340
  char name[DRIZZLE_MAX_COLUMN_NAME_SIZE];
389
352
    result(NULL),
390
353
    next(NULL),
391
354
    prev(NULL),
 
355
    options(0),
392
356
    size(0),
393
357
    max_size(0),
394
358
    flags(DRIZZLE_COLUMN_FLAGS_NONE),
401
365
#ifdef __cplusplus
402
366
}
403
367
#endif
 
368
 
 
369
#endif /* __DRIZZLE_STRUCTS_H */