libdrizzle Developer Documentation

structs.h
Go to the documentation of this file.
1 /*
2  * Drizzle Client & Protocol Library
3  *
4  * Copyright (C) 2008 Eric Day (eday@oddments.org)
5  * All rights reserved.
6  *
7  * Use and distribution licensed under the BSD license. See
8  * the COPYING file in this directory for full text.
9  */
10 
16 #ifndef __DRIZZLE_STRUCTS_H
17 #define __DRIZZLE_STRUCTS_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
26 struct drizzle_st
27 {
28  uint16_t error_code;
31  uint32_t con_count;
32  uint32_t pfds_size;
33  uint32_t query_count;
34  uint32_t query_new;
35  uint32_t query_running;
37  int timeout;
39  void *context;
44  void *log_context;
45  struct pollfd *pfds;
49 };
50 
55 {
56  in_port_t port;
57  struct addrinfo *addrinfo;
58  char *host;
59  char host_buffer[NI_MAXHOST];
60 };
61 
66 {
68  struct sockaddr_un sockaddr;
69 };
70 
75 {
76  uint8_t packet_number;
78  uint8_t state_current;
79  short events;
80  short revents;
87  uint32_t max_packet_size;
88  uint32_t result_count;
89  uint32_t thread_id;
90  int backlog;
91  int fd;
92  size_t buffer_size;
94  size_t command_size;
95  size_t command_total;
96  size_t packet_size;
97  struct addrinfo *addrinfo_next;
98  uint8_t *buffer_ptr;
99  uint8_t *command_buffer;
100  uint8_t *command_data;
101  void *context;
109  uint8_t *scramble;
110  union
111  {
114  } socket;
122 };
123 
128 {
136  const char *string;
137  size_t size;
138  void *context;
140 };
141 
146 {
151 
153  uint16_t error_code;
155  uint64_t insert_id;
156  uint16_t warning_count;
157  uint64_t affected_rows;
158 
159  uint16_t column_count;
160  uint16_t column_current;
164 
165  uint64_t row_count;
166  uint64_t row_current;
167 
168  uint16_t field_current;
169  size_t field_total;
170  size_t field_offset;
171  size_t field_size;
174 
175  uint64_t row_list_size;
178  size_t *field_sizes;
180 };
181 
186 {
198  uint32_t size;
199  size_t max_size;
202  uint8_t decimals;
205 };
206 
207 #ifdef __cplusplus
208 }
209 #endif
210 
211 #endif /* __DRIZZLE_STRUCTS_H */