2
* Drizzle Client & Protocol Library
4
* Copyright (C) 2008 Eric Day (eday@oddments.org)
7
* Use and distribution licensed under the BSD license. See
8
* the COPYING file in this directory for full text.
13
* @brief Struct Definitions
16
#ifndef __DRIZZLE_STRUCTS_H
17
#define __DRIZZLE_STRUCTS_H
29
drizzle_options_t options;
30
drizzle_verbose_t verbose;
35
uint32_t query_running;
38
drizzle_con_st *con_list;
40
drizzle_context_free_fn *context_free_fn;
41
drizzle_event_watch_fn *event_watch_fn;
42
void *event_watch_context;
43
drizzle_log_fn *log_fn;
46
drizzle_query_st *query_list;
47
char sqlstate[DRIZZLE_MAX_SQLSTATE_SIZE + 1];
48
char last_error[DRIZZLE_MAX_ERROR_SIZE];
52
* @ingroup drizzle_con
54
struct drizzle_con_tcp_st
57
struct addrinfo *addrinfo;
59
char host_buffer[NI_MAXHOST];
63
* @ingroup drizzle_con
65
struct drizzle_con_uds_st
67
struct addrinfo addrinfo;
68
struct sockaddr_un sockaddr;
72
* @ingroup drizzle_con
76
uint8_t packet_number;
77
uint8_t protocol_version;
78
uint8_t state_current;
81
drizzle_capabilities_t capabilities;
82
drizzle_charset_t charset;
83
drizzle_command_t command;
84
drizzle_con_options_t options;
85
drizzle_con_socket_t socket_type;
86
drizzle_con_status_t status;
87
uint32_t max_packet_size;
88
uint32_t result_count;
93
size_t command_offset;
97
struct addrinfo *addrinfo_next;
99
uint8_t *command_buffer;
100
uint8_t *command_data;
102
drizzle_con_context_free_fn *context_free_fn;
104
drizzle_con_st *next;
105
drizzle_con_st *prev;
106
drizzle_query_st *query;
107
drizzle_result_st *result;
108
drizzle_result_st *result_list;
112
drizzle_con_tcp_st tcp;
113
drizzle_con_uds_st uds;
115
uint8_t buffer[DRIZZLE_MAX_BUFFER_SIZE];
116
char db[DRIZZLE_MAX_DB_SIZE];
117
char password[DRIZZLE_MAX_PASSWORD_SIZE];
118
uint8_t scramble_buffer[DRIZZLE_MAX_SCRAMBLE_SIZE];
119
char server_version[DRIZZLE_MAX_SERVER_VERSION_SIZE];
120
drizzle_state_fn *state_stack[DRIZZLE_STATE_STACK_SIZE];
121
char user[DRIZZLE_MAX_USER_SIZE];
125
* @ingroup drizzle_query
127
struct drizzle_query_st
130
drizzle_query_st *next;
131
drizzle_query_st *prev;
132
drizzle_query_options_t options;
133
drizzle_query_state_t state;
135
drizzle_result_st *result;
139
drizzle_query_context_free_fn *context_free_fn;
143
* @ingroup drizzle_result
145
struct drizzle_result_st
148
drizzle_result_st *next;
149
drizzle_result_st *prev;
150
drizzle_result_options_t options;
152
char info[DRIZZLE_MAX_INFO_SIZE];
154
char sqlstate[DRIZZLE_MAX_SQLSTATE_SIZE + 1];
156
uint16_t warning_count;
157
uint64_t affected_rows;
159
uint16_t column_count;
160
uint16_t column_current;
161
drizzle_column_st *column_list;
162
drizzle_column_st *column;
163
drizzle_column_st *column_buffer;
166
uint64_t row_current;
168
uint16_t field_current;
172
drizzle_field_t field;
173
drizzle_field_t field_buffer;
175
uint64_t row_list_size;
177
drizzle_row_t *row_list;
179
size_t **field_sizes_list;
183
* @ingroup drizzle_column
185
struct drizzle_column_st
187
drizzle_result_st *result;
188
drizzle_column_st *next;
189
drizzle_column_st *prev;
190
drizzle_column_options_t options;
191
char catalog[DRIZZLE_MAX_CATALOG_SIZE];
192
char db[DRIZZLE_MAX_DB_SIZE];
193
char table[DRIZZLE_MAX_TABLE_SIZE];
194
char orig_table[DRIZZLE_MAX_TABLE_SIZE];
195
char name[DRIZZLE_MAX_COLUMN_NAME_SIZE];
196
char orig_name[DRIZZLE_MAX_COLUMN_NAME_SIZE];
197
drizzle_charset_t charset;
200
drizzle_column_type_t type;
201
drizzle_column_flags_t flags;
203
uint8_t default_value[DRIZZLE_MAX_DEFAULT_VALUE_SIZE];
204
size_t default_value_size;
211
#endif /* __DRIZZLE_STRUCTS_H */