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
31
drizzle_options_t options;
32
drizzle_verbose_t verbose;
37
uint32_t query_running;
40
drizzle_con_st *con_list;
42
drizzle_context_free_fn *context_free_fn;
43
drizzle_event_watch_fn *event_watch_fn;
44
void *event_watch_context;
45
drizzle_log_fn *log_fn;
48
drizzle_query_st *query_list;
49
char sqlstate[DRIZZLE_MAX_SQLSTATE_SIZE + 1];
50
char last_error[DRIZZLE_MAX_ERROR_SIZE];
54
* @ingroup drizzle_con
56
struct drizzle_con_tcp_st
59
struct addrinfo *addrinfo;
61
char host_buffer[NI_MAXHOST];
65
* @ingroup drizzle_con
67
struct drizzle_con_uds_st
69
struct addrinfo addrinfo;
70
struct sockaddr_un sockaddr;
74
* @ingroup drizzle_con
78
uint8_t packet_number;
79
uint8_t protocol_version;
80
uint8_t state_current;
83
drizzle_capabilities_t capabilities;
84
drizzle_charset_t charset;
85
drizzle_command_t command;
86
drizzle_con_options_t options;
87
drizzle_con_socket_t socket_type;
88
drizzle_con_status_t status;
89
uint32_t max_packet_size;
90
uint32_t result_count;
95
size_t command_offset;
99
struct addrinfo *addrinfo_next;
101
uint8_t *command_buffer;
102
uint8_t *command_data;
104
drizzle_con_context_free_fn *context_free_fn;
106
drizzle_con_st *next;
107
drizzle_con_st *prev;
108
drizzle_query_st *query;
109
drizzle_result_st *result;
110
drizzle_result_st *result_list;
114
drizzle_con_tcp_st tcp;
115
drizzle_con_uds_st uds;
117
uint8_t buffer[DRIZZLE_MAX_BUFFER_SIZE];
118
char db[DRIZZLE_MAX_DB_SIZE];
119
char password[DRIZZLE_MAX_PASSWORD_SIZE];
120
uint8_t scramble_buffer[DRIZZLE_MAX_SCRAMBLE_SIZE];
121
char server_version[DRIZZLE_MAX_SERVER_VERSION_SIZE];
122
drizzle_state_fn *state_stack[DRIZZLE_STATE_STACK_SIZE];
123
char user[DRIZZLE_MAX_USER_SIZE];
127
* @ingroup drizzle_query
129
struct drizzle_query_st
132
drizzle_query_st *next;
133
drizzle_query_st *prev;
134
drizzle_query_options_t options;
135
drizzle_query_state_t state;
137
drizzle_result_st *result;
141
drizzle_query_context_free_fn *context_free_fn;
145
* @ingroup drizzle_result
147
struct drizzle_result_st
150
drizzle_result_st *next;
151
drizzle_result_st *prev;
152
drizzle_result_options_t options;
154
char info[DRIZZLE_MAX_INFO_SIZE];
156
char sqlstate[DRIZZLE_MAX_SQLSTATE_SIZE + 1];
158
uint16_t warning_count;
159
uint64_t affected_rows;
161
uint16_t column_count;
162
uint16_t column_current;
163
drizzle_column_st *column_list;
164
drizzle_column_st *column;
165
drizzle_column_st *column_buffer;
168
uint64_t row_current;
170
uint16_t field_current;
174
drizzle_field_t field;
175
drizzle_field_t field_buffer;
177
uint64_t row_list_size;
179
drizzle_row_t *row_list;
181
size_t **field_sizes_list;
185
* @ingroup drizzle_column
187
struct drizzle_column_st
189
drizzle_result_st *result;
190
drizzle_column_st *next;
191
drizzle_column_st *prev;
192
drizzle_column_options_t options;
193
char catalog[DRIZZLE_MAX_CATALOG_SIZE];
194
char db[DRIZZLE_MAX_DB_SIZE];
195
char table[DRIZZLE_MAX_TABLE_SIZE];
196
char orig_table[DRIZZLE_MAX_TABLE_SIZE];
197
char name[DRIZZLE_MAX_COLUMN_NAME_SIZE];
198
char orig_name[DRIZZLE_MAX_COLUMN_NAME_SIZE];
199
drizzle_charset_t charset;
202
drizzle_column_type_t type;
203
drizzle_column_flags_t flags;
205
uint8_t default_value[DRIZZLE_MAX_DEFAULT_VALUE_SIZE];
206
size_t default_value_size;
213
#endif /* __DRIZZLE_STRUCTS_H */