libdrizzle Developer Documentation

query.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_QUERY_H
17 #define __DRIZZLE_QUERY_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
48  const char *query, size_t size,
49  drizzle_return_t *ret_ptr);
50 
56  drizzle_result_st *result,
57  const char *query,
58  drizzle_return_t *ret_ptr);
59 
65  drizzle_result_st *result,
66  const char *query, size_t size,
67  size_t total, drizzle_return_t *ret_ptr);
68 
74  drizzle_query_st *query,
75  drizzle_con_st *con,
76  drizzle_result_st *result,
77  const char *query_string, size_t size,
79  void *context);
80 
86  drizzle_query_st *query);
87 
93 
98 void drizzle_query_free_all(drizzle_st *drizzle);
99 
105 
111 
117 
123  drizzle_result_st *result);
124 
129 char *drizzle_query_string(drizzle_query_st *query, size_t *size);
130 
135 void drizzle_query_set_string(drizzle_query_st *query, const char *string,
136  size_t size);
137 
143 
149  drizzle_query_options_t options);
150 
156  drizzle_query_options_t options);
157 
163  drizzle_query_options_t options);
164 
170 
175 void drizzle_query_set_context(drizzle_query_st *query, void *context);
176 
183 
189  drizzle_return_t *ret_ptr);
190 
199 
200 /*
201  * Escape a string or encode a string in hexadecimal. The return value is the
202  * size of the output string in to.
203  */
205 size_t drizzle_escape_string(char *to, const char *from, size_t from_size);
207 size_t drizzle_hex_string(char *to, const char *from, size_t from_size);
208 
211 #ifdef __cplusplus
212 }
213 #endif
214 
215 #endif /* __DRIZZLE_QUERY_H */