Merge lp:~linuxjedi/libdrizzle/5.1-docs2 into lp:libdrizzle
- 5.1-docs2
- Merge into libdrizzle-redux
Proposed by
Andrew Hutchings
Status: | Merged |
---|---|
Approved by: | Andrew Hutchings |
Approved revision: | 107 |
Merged at revision: | 107 |
Proposed branch: | lp:~linuxjedi/libdrizzle/5.1-docs2 |
Merge into: | lp:libdrizzle |
Diff against target: |
418 lines (+155/-157) 6 files modified
docs/api/connection.rst (+114/-50) docs/api/constants.rst (+0/-52) docs/api/query.rst (+5/-30) docs/examples/binlog.rst (+34/-23) docs/examples/buffered.rst (+1/-1) docs/examples/unbuffered.rst (+1/-1) |
To merge this branch: | bzr merge lp:~linuxjedi/libdrizzle/5.1-docs2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Drizzle Trunk | Pending | ||
Review via email: mp+147166@code.launchpad.net |
Commit message
Description of the change
Documentation updates for the API changes made in Seattle
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'docs/api/connection.rst' | |||
2 | --- docs/api/connection.rst 2013-01-28 01:43:28 +0000 | |||
3 | +++ docs/api/connection.rst 2013-02-07 16:43:36 +0000 | |||
4 | @@ -13,30 +13,26 @@ | |||
5 | 13 | 13 | ||
6 | 14 | The internal drizzle connection object struct | 14 | The internal drizzle connection object struct |
7 | 15 | 15 | ||
8 | 16 | .. c:type:: drizzle_options_st | ||
9 | 17 | |||
10 | 18 | The internal structure containing connection options | ||
11 | 19 | |||
12 | 16 | Functions | 20 | Functions |
13 | 17 | --------- | 21 | --------- |
14 | 18 | 22 | ||
36 | 19 | .. c:function:: drizzle_st* drizzle_create_tcp(const char *host, in_port_t port, const char *user, const char *password, const char *db, drizzle_options_t options) | 23 | .. c:function:: drizzle_st* drizzle_create(const char *host, in_port_t port, const char *user, const char *password, const char *db, drizzle_options_st *options) |
37 | 20 | 24 | ||
38 | 21 | Creates a TCP/IP connection connection object | 25 | Creates a connection connection object. If a path beginning with ``/`` is given as the host the library will connect as a UDS socket. Otherwise a TCP/IP conection is made. |
39 | 22 | 26 | ||
40 | 23 | :param host: The hostname or IP of the server | 27 | .. note:: |
41 | 24 | :param port: The port number of the server | 28 | a connection does not happen until the first query or an explicit :c:func:`drizzle_connect` call is made |
42 | 25 | :param user: The username of the server | 29 | |
43 | 26 | :param password: The password of the server | 30 | :param host: The socket path, hostname or IP of the server |
44 | 27 | :param db: The default DB to connect to on the server | 31 | :param port: The port number of the server (if TCP/IP) |
45 | 28 | :param options: The connection options to set | 32 | :param user: The username of the server |
46 | 29 | :returns: A newly allocated and setup connection object | 33 | :param password: The password of the server |
47 | 30 | 34 | :param db: The default DB to connect to on the server | |
48 | 31 | .. c:function:: drizzle_st* drizzle_create_uds(const char *uds, const char *user, const char *password, const char *db, drizzle_options_t options) | 35 | :param options: A pointer to a :c:type:`drizzle_options_st` created using :c:func:`drizzle_options_create` or :c:type:`NULL` |
28 | 32 | |||
29 | 33 | Creates a Unix Domain Socket connection object | ||
30 | 34 | |||
31 | 35 | :param uds: The path of the UDS file | ||
32 | 36 | :param user: The username of the server | ||
33 | 37 | :param password: The password of the server | ||
34 | 38 | :param db: The default DB to connect to on the server | ||
35 | 39 | :param options: The connection options to set | ||
49 | 40 | :returns: A newly allocated and setup connection object | 36 | :returns: A newly allocated and setup connection object |
50 | 41 | 37 | ||
51 | 42 | .. c:function:: int drizzle_timeout(const drizzle_st *con) | 38 | .. c:function:: int drizzle_timeout(const drizzle_st *con) |
52 | @@ -51,7 +47,7 @@ | |||
53 | 51 | Sets the connection timeout for the connection object | 47 | Sets the connection timeout for the connection object |
54 | 52 | 48 | ||
55 | 53 | :param drizzle: A connection object | 49 | :param drizzle: A connection object |
57 | 54 | :param int: The new timeout to set | 50 | :param timeout: The new timeout to set |
58 | 55 | 51 | ||
59 | 56 | .. c:function:: drizzle_verbose_t drizzle_verbose(const drizzle_st *con) | 52 | .. c:function:: drizzle_verbose_t drizzle_verbose(const drizzle_st *con) |
60 | 57 | 53 | ||
61 | @@ -103,34 +99,102 @@ | |||
62 | 103 | :param con: A connection object | 99 | :param con: A connection object |
63 | 104 | :returns: A string containing the sqlstate | 100 | :returns: A string containing the sqlstate |
64 | 105 | 101 | ||
93 | 106 | .. c:function:: drizzle_options_t drizzle_options(const drizzle_st *con) | 102 | .. c:function:: drizzle_options_st *drizzle_options_create(void) |
94 | 107 | 103 | ||
95 | 108 | Gets the connection options | 104 | Create a new connection options object |
96 | 109 | 105 | ||
97 | 110 | :param con: A connection object | 106 | :returns: The new connection options object |
98 | 111 | :returns: The options for the connection | 107 | |
99 | 112 | 108 | .. c:function:: void drizzle_options_destroy(drizzle_options_st *options) | |
100 | 113 | .. c:function:: void drizzle_set_options(drizzle_st *con, drizzle_options_t options) | 109 | |
101 | 114 | 110 | Destroys a connection options object | |
102 | 115 | Sets the connection options | 111 | |
103 | 116 | 112 | :param options: The options object to be destroyed | |
104 | 117 | :param con: A connection object | 113 | |
105 | 118 | :param options: A bit field of the :c:type:`drizzle_options_t` options | 114 | .. c:function:: void drizzle_options_set_non_blocking(drizzle_options_st *options, bool state) |
106 | 119 | 115 | ||
107 | 120 | .. c:function:: void drizzle_add_options(drizzle_st *con, drizzle_options_t options) | 116 | Sets/unsets non-blocking connect option |
108 | 121 | 117 | ||
109 | 122 | Add connection options | 118 | :param options: The options object to modify |
110 | 123 | 119 | :param state: Set option to true/false | |
111 | 124 | :param con: A connection object | 120 | |
112 | 125 | :param options: A bit field of the :c:type:`drizzle_options_t` options | 121 | .. c:function:: bool drizzle_options_get_non_blocking(drizzle_options_st *options) |
113 | 126 | 122 | ||
114 | 127 | .. c:function:: void drizzle_remove_options(drizzle_st *con, drizzle_options_t options) | 123 | Gets the non-blocking connect option |
115 | 128 | 124 | ||
116 | 129 | Removes connection options | 125 | :param options: The options object to get the value from |
117 | 130 | 126 | :returns: The state of the non-blocking option | |
118 | 131 | :param con: A connection object | 127 | |
119 | 132 | :param options: A bit field of the :c:type:`drizzle_options_t` options | 128 | .. c:function:: void drizzle_options_set_raw_scramble(drizzle_options_st *options, bool state) |
120 | 133 | 129 | ||
121 | 130 | Sets/unsets the raw scramble connect option | ||
122 | 131 | |||
123 | 132 | :param options: The options object to modify | ||
124 | 133 | :param state: Set to true/false | ||
125 | 134 | |||
126 | 135 | .. c:function:: bool drizzle_options_get_raw_scramble(drizzle_options_st *options) | ||
127 | 136 | |||
128 | 137 | Gets the raw scramble connect option | ||
129 | 138 | |||
130 | 139 | :param options: The options object to get the value from | ||
131 | 140 | :returns: The state of the raw scramble option | ||
132 | 141 | |||
133 | 142 | .. c:function:: void drizzle_options_set_found_rows(drizzle_options_st *options, bool state) | ||
134 | 143 | |||
135 | 144 | Sets/unsets the found rows connect option | ||
136 | 145 | |||
137 | 146 | :param options: The options object to modify | ||
138 | 147 | :param state: Set to true/false | ||
139 | 148 | |||
140 | 149 | .. c:function:: bool drizzle_options_get_found_rows(drizzle_options_st *options) | ||
141 | 150 | |||
142 | 151 | Gets the found rows connect option | ||
143 | 152 | |||
144 | 153 | :param options: The options object to get the value from | ||
145 | 154 | :returns: The state of the found rows option | ||
146 | 155 | |||
147 | 156 | .. c:function:: void drizzle_options_set_interactive(drizzle_options_st *options, bool state) | ||
148 | 157 | |||
149 | 158 | Sets/unsets the interactive connect option | ||
150 | 159 | |||
151 | 160 | :param options: The options object to modify | ||
152 | 161 | :param state: Set to true/false | ||
153 | 162 | |||
154 | 163 | .. c:function:: bool drizzle_options_get_interactive(drizzle_options_st *option) | ||
155 | 164 | |||
156 | 165 | Gets the interactive connect option | ||
157 | 166 | |||
158 | 167 | :param options: The options object to get the value from | ||
159 | 168 | :returns: The state of the interactive option | ||
160 | 169 | |||
161 | 170 | .. c:function:: void drizzle_options_set_multi_statements(drizzle_options_st *options, bool state) | ||
162 | 171 | |||
163 | 172 | Sets/unsets the multi-statements connect option | ||
164 | 173 | |||
165 | 174 | :param options: The options object to modify | ||
166 | 175 | :parma state: Set to true/false | ||
167 | 176 | |||
168 | 177 | .. c:function:: bool drizzle_options_get_multi_statements(drizzle_options_st *options) | ||
169 | 178 | |||
170 | 179 | Gets the multi-statements connect option | ||
171 | 180 | |||
172 | 181 | :param options: The options object to get the value from | ||
173 | 182 | :returns: The state of the multi-statements option | ||
174 | 183 | |||
175 | 184 | .. c:function:: void drizzle_options_set_auth_plugin(drizzle_options_st *options, bool state) | ||
176 | 185 | |||
177 | 186 | Sets/unsets the auth plugin connect option | ||
178 | 187 | |||
179 | 188 | :param options: The optoins object to modify | ||
180 | 189 | :param state: Set to true/false | ||
181 | 190 | |||
182 | 191 | .. c:function:: bool drizzle_options_get_auth_plugin(drizzle_options_st *options) | ||
183 | 192 | |||
184 | 193 | Gets the auth plugin connect option | ||
185 | 194 | |||
186 | 195 | :param options: The options object to get the value from | ||
187 | 196 | :returns: The state of the auth plugin option | ||
188 | 197 | |||
189 | 134 | .. c:function:: const char* drizzle_host(const drizzle_st *con) | 198 | .. c:function:: const char* drizzle_host(const drizzle_st *con) |
190 | 135 | 199 | ||
191 | 136 | Gets the host name from a TCP/IP connection | 200 | Gets the host name from a TCP/IP connection |
192 | 137 | 201 | ||
193 | === modified file 'docs/api/constants.rst' | |||
194 | --- docs/api/constants.rst 2013-01-05 11:25:32 +0000 | |||
195 | +++ docs/api/constants.rst 2013-02-07 16:43:36 +0000 | |||
196 | @@ -179,58 +179,6 @@ | |||
197 | 179 | Connection | 179 | Connection |
198 | 180 | ---------- | 180 | ---------- |
199 | 181 | 181 | ||
200 | 182 | .. c:type:: drizzle_options_t | ||
201 | 183 | |||
202 | 184 | An ENUM of connection options intended to be used in a bit field | ||
203 | 185 | |||
204 | 186 | .. py:data:: DRIZZLE_CON_NONE | ||
205 | 187 | |||
206 | 188 | No option set | ||
207 | 189 | |||
208 | 190 | .. py:data:: DRIZZLE_CON_NON_BLOCKING | ||
209 | 191 | |||
210 | 192 | Connect in non-blocking mode | ||
211 | 193 | |||
212 | 194 | .. py:data:: DRIZZLE_CON_RAW_PACKET | ||
213 | 195 | |||
214 | 196 | Raw packet data mode (for low-level clients) | ||
215 | 197 | |||
216 | 198 | .. py:data:: DRIZZLE_CON_RAW_SCRAMBLE | ||
217 | 199 | |||
218 | 200 | Raw auth scramble data (for low-level clients) | ||
219 | 201 | |||
220 | 202 | .. py:data:: DRIZZLE_CON_READY | ||
221 | 203 | |||
222 | 204 | Connection is ready | ||
223 | 205 | |||
224 | 206 | .. py:data:: DRIZZLE_CON_NO_RESULT_READ | ||
225 | 207 | |||
226 | 208 | Don't read result data from buffer (advanced feature, use with caution) | ||
227 | 209 | |||
228 | 210 | .. py:data:: DRIZZLE_CON_IO_READY | ||
229 | 211 | |||
230 | 212 | Used for event handling | ||
231 | 213 | |||
232 | 214 | .. py:data:: DRIZZLE_CON_LISTEN | ||
233 | 215 | |||
234 | 216 | Unused | ||
235 | 217 | |||
236 | 218 | .. py:data:: DRIZZLE_CON_FOUND_ROWS | ||
237 | 219 | |||
238 | 220 | Enable the FOUND_ROWS functionality | ||
239 | 221 | |||
240 | 222 | .. py:data:: DRIZZLE_CON_INTERACTIVE | ||
241 | 223 | |||
242 | 224 | This is an interactive client | ||
243 | 225 | |||
244 | 226 | .. py:data:: DRIZZLE_CON_MULTI_STATEMENTS | ||
245 | 227 | |||
246 | 228 | Multi-statement support | ||
247 | 229 | |||
248 | 230 | .. py:data:: DRIZZLE_CON_AUTH_PLUGIN | ||
249 | 231 | |||
250 | 232 | Authentiaction plugin support | ||
251 | 233 | |||
252 | 234 | .. c:type:: drizzle_charset_t | 182 | .. c:type:: drizzle_charset_t |
253 | 235 | 183 | ||
254 | 236 | An ENUM of the possible character set with colation ID | 184 | An ENUM of the possible character set with colation ID |
255 | 237 | 185 | ||
256 | === modified file 'docs/api/query.rst' | |||
257 | --- docs/api/query.rst 2013-01-28 01:43:28 +0000 | |||
258 | +++ docs/api/query.rst 2013-02-07 16:43:36 +0000 | |||
259 | @@ -46,41 +46,16 @@ | |||
260 | 46 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into | 46 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into |
261 | 47 | :returns: A newly allocated result object | 47 | :returns: A newly allocated result object |
262 | 48 | 48 | ||
267 | 49 | .. c:function:: ssize_t drizzle_escape_string(char *to, const size_t max_to_size, const char *from, const size_t from_size) | 49 | .. c:function:: ssize_t drizzle_escape_string(drizzle_st *con, char **to, const const char *from, const size_t from_size) |
268 | 50 | 50 | ||
269 | 51 | Escape a string for an SQL query | 51 | Escape a string for an SQL query. The ``to`` parameter is allocated by the function and needs to be freed by the application when finished with. |
270 | 52 | 52 | ||
271 | 53 | :param con: a connection object | ||
272 | 53 | :param to: the destination string | 54 | :param to: the destination string |
273 | 54 | :param max_to_size: the maximum length of the 'to' parameter | ||
274 | 55 | :param from: the source string | 55 | :param from: the source string |
275 | 56 | :param from_size: the length of the source string | 56 | :param from_size: the length of the source string |
276 | 57 | :returns: the length of the 'to' string or -1 upon error due to empty parameters or overflow | 57 | :returns: the length of the 'to' string or -1 upon error due to empty parameters or overflow |
277 | 58 | 58 | ||
278 | 59 | .. c:function:: bool drizzle_hex_string(char *to, const unsigned char *from, const size_t from_size) | ||
279 | 60 | |||
280 | 61 | Convert data into a hexadecimal string of the data. | ||
281 | 62 | |||
282 | 63 | .. note:: | ||
283 | 64 | The allocated length of the 'to' string should always be at least double | ||
284 | 65 | the length of the 'from' string | ||
285 | 66 | |||
286 | 67 | :param to: the destination string | ||
287 | 68 | :param from: the source string | ||
288 | 69 | :param from_size: the length of the source string | ||
289 | 70 | :returns: a true upon success or false upon empty parameters | ||
290 | 71 | |||
291 | 72 | .. c:function:: bool drizzle_mysql_password_hash(char *to, const char *from, const size_t from_size) | ||
292 | 73 | |||
293 | 74 | Convert data into a MySQL password hash string. | ||
294 | 75 | |||
295 | 76 | .. note:: | ||
296 | 77 | The allocated length of the 'to' string should always be at least 41 bytes | ||
297 | 78 | |||
298 | 79 | :param to: the destination string | ||
299 | 80 | :param from: the source string: | ||
300 | 81 | :param from_size: the length of the source string | ||
301 | 82 | :returns: a true upons success or false upon empty parameters | ||
302 | 83 | |||
303 | 84 | .. c:function:: void drizzle_result_free(drizzle_result_st *result) | 59 | .. c:function:: void drizzle_result_free(drizzle_result_st *result) |
304 | 85 | 60 | ||
305 | 86 | Frees a result object | 61 | Frees a result object |
306 | 87 | 62 | ||
307 | === modified file 'docs/examples/binlog.rst' | |||
308 | --- docs/examples/binlog.rst 2013-01-05 10:27:32 +0000 | |||
309 | +++ docs/examples/binlog.rst 2013-02-07 16:43:36 +0000 | |||
310 | @@ -7,15 +7,43 @@ | |||
311 | 7 | #include <stdio.h> | 7 | #include <stdio.h> |
312 | 8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
313 | 9 | 9 | ||
314 | 10 | void binlog_error(drizzle_return_t ret, drizzle_st *connection, void *context) | ||
315 | 11 | { | ||
316 | 12 | (void) context; | ||
317 | 13 | if (ret != DRIZZLE_RETURN_EOF) | ||
318 | 14 | { | ||
319 | 15 | printf("Error retrieving binlog: %s\n", drizzle_error(connection)); | ||
320 | 16 | } | ||
321 | 17 | } | ||
322 | 18 | |||
323 | 19 | |||
324 | 20 | void binlog_event(drizzle_binlog_event_st *event, void *context) | ||
325 | 21 | { | ||
326 | 22 | (void) context; | ||
327 | 23 | printf("Timestamp: %"PRIu32"\n", drizzle_binlog_event_timestamp(event)); | ||
328 | 24 | printf("Type: %"PRIu8"\n", drizzle_binlog_event_type(event)); | ||
329 | 25 | printf("Server-id: %"PRIu32"\n", drizzle_binlog_event_server_id(event)); | ||
330 | 26 | printf("Next-pos: %"PRIu32"\n", drizzle_binlog_event_next_pos(event)); | ||
331 | 27 | length= drizzle_binlog_event_length(event); | ||
332 | 28 | printf("Length: %"PRIu32"\n", length); | ||
333 | 29 | data= drizzle_binlog_event_data(event); | ||
334 | 30 | printf("Data: 0x"); | ||
335 | 31 | for (i=0; i<length; i++) | ||
336 | 32 | printf("%02X ", data[i]); | ||
337 | 33 | printf("\n\n"); | ||
338 | 34 | } | ||
339 | 35 | |||
340 | 36 | |||
341 | 37 | |||
342 | 10 | int main(int argc, char *argv[]) | 38 | int main(int argc, char *argv[]) |
343 | 11 | { | 39 | { |
344 | 12 | (void) argc; | 40 | (void) argc; |
345 | 13 | (void) argv; | 41 | (void) argv; |
346 | 14 | drizzle_st *con; | 42 | drizzle_st *con; |
347 | 15 | drizzle_return_t ret; | 43 | drizzle_return_t ret; |
349 | 16 | drizzle_result_st *result; | 44 | drizzle_binlog_st *binlog; |
350 | 17 | 45 | ||
352 | 18 | con = drizzle_create_tcp("localhost", 3306, "root", "", "", 0); | 46 | con = drizzle_create("localhost", 3306, "root", "", "", 0); |
353 | 19 | if (con == NULL) | 47 | if (con == NULL) |
354 | 20 | { | 48 | { |
355 | 21 | printf("Drizzle connection object creation error\n"); | 49 | printf("Drizzle connection object creation error\n"); |
356 | @@ -28,32 +56,15 @@ | |||
357 | 28 | return EXIT_FAILURE; | 56 | return EXIT_FAILURE; |
358 | 29 | } | 57 | } |
359 | 30 | 58 | ||
362 | 31 | result= drizzle_start_binlog(con, 0, "", 0, &ret); | 59 | binlog= drizzle_binlog_init(con, binlog_event, binlog_error, NULL, true); |
363 | 32 | if (ret != DRIZZLE_RETURN_OK) | 60 | ret= drizzle_binlog_start(binlog, 0, "", 0); |
364 | 61 | if (ret != DRIZZLE_RETURN_EOF) | ||
365 | 33 | { | 62 | { |
366 | 34 | printf("Drizzle binlog start failure\n"); | 63 | printf("Drizzle binlog start failure\n"); |
367 | 35 | return EXIT_FAILURE; | 64 | return EXIT_FAILURE; |
368 | 36 | } | 65 | } |
369 | 37 | 66 | ||
389 | 38 | while (ret == DRIZZLE_RETURN_OK) | 67 | |
371 | 39 | { | ||
372 | 40 | uint32_t i, length; | ||
373 | 41 | const unsigned char *data; | ||
374 | 42 | ret= drizzle_binlog_get_event(result); | ||
375 | 43 | if (ret != DRIZZLE_RETURN_OK) | ||
376 | 44 | break; | ||
377 | 45 | printf("Timestamp: %"PRIu32"\n", drizzle_binlog_event_timestamp(result)); | ||
378 | 46 | printf("Type: %"PRIu8"\n", drizzle_binlog_event_type(result)); | ||
379 | 47 | printf("Server-id: %"PRIu32"\n", drizzle_binlog_event_server_id(result)); | ||
380 | 48 | printf("Next-pos: %"PRIu32"\n", drizzle_binlog_event_next_pos(result)); | ||
381 | 49 | length= drizzle_binlog_event_length(result); | ||
382 | 50 | printf("Length: %"PRIu32"\n", length); | ||
383 | 51 | data= drizzle_binlog_event_data(result); | ||
384 | 52 | printf("Data: 0x"); | ||
385 | 53 | for (i=0; i<length; i++) | ||
386 | 54 | printf("%02X ", data[i]); | ||
387 | 55 | printf("\n\n"); | ||
388 | 56 | } | ||
390 | 57 | 68 | ||
391 | 58 | drizzle_quit(con); | 69 | drizzle_quit(con); |
392 | 59 | return EXIT_SUCCESS; | 70 | return EXIT_SUCCESS; |
393 | 60 | 71 | ||
394 | === modified file 'docs/examples/buffered.rst' | |||
395 | --- docs/examples/buffered.rst 2013-01-10 22:14:47 +0000 | |||
396 | +++ docs/examples/buffered.rst 2013-02-07 16:43:36 +0000 | |||
397 | @@ -36,7 +36,7 @@ | |||
398 | 36 | drizzle_row_t row; | 36 | drizzle_row_t row; |
399 | 37 | int num_fields; | 37 | int num_fields; |
400 | 38 | 38 | ||
402 | 39 | con = drizzle_create_tcp("localhost", 3306, "user", "pass", "test", 0); | 39 | con = drizzle_create("localhost", 3306, "user", "pass", "test", 0); |
403 | 40 | if (con == NULL) | 40 | if (con == NULL) |
404 | 41 | { | 41 | { |
405 | 42 | printf("Drizzle connection object creation error\n"); | 42 | printf("Drizzle connection object creation error\n"); |
406 | 43 | 43 | ||
407 | === modified file 'docs/examples/unbuffered.rst' | |||
408 | --- docs/examples/unbuffered.rst 2013-01-10 22:14:47 +0000 | |||
409 | +++ docs/examples/unbuffered.rst 2013-02-07 16:43:36 +0000 | |||
410 | @@ -38,7 +38,7 @@ | |||
411 | 38 | drizzle_row_t row; | 38 | drizzle_row_t row; |
412 | 39 | int num_fields; | 39 | int num_fields; |
413 | 40 | 40 | ||
415 | 41 | con = drizzle_create_tcp("localhost", 3306, "root", "", "libdrizzle", 0); | 41 | con = drizzle_create("localhost", 3306, "root", "", "libdrizzle", 0); |
416 | 42 | if (con == NULL) | 42 | if (con == NULL) |
417 | 43 | { | 43 | { |
418 | 44 | printf("Drizzle connection object creation error\n"); | 44 | printf("Drizzle connection object creation error\n"); |