Merge lp:~linuxjedi/libdrizzle/5.1-docs into lp:libdrizzle
- 5.1-docs
- Merge into libdrizzle-redux
Proposed by
Andrew Hutchings
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Andrew Hutchings | ||||
Approved revision: | 79 | ||||
Merged at revision: | 79 | ||||
Proposed branch: | lp:~linuxjedi/libdrizzle/5.1-docs | ||||
Merge into: | lp:libdrizzle | ||||
Diff against target: |
327 lines (+175/-57) 5 files modified
configure.ac (+2/-2) docs/api/connection.rst (+7/-0) docs/api/statement.rst (+157/-43) docs/examples/statement.rst (+8/-10) rpm/spec.in (+1/-2) |
||||
To merge this branch: | bzr merge lp:~linuxjedi/libdrizzle/5.1-docs | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Drizzle Trunk | Pending | ||
Review via email: mp+141978@code.launchpad.net |
Commit message
Description of the change
Update the docs for the latest prep statement changes
Also bump version ready for release soon
To post a comment you must log in.
- 80. By Andrew Hutchings
-
Fix spec.in for lib version
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'configure.ac' | |||
2 | --- configure.ac 2012-12-29 17:31:57 +0000 | |||
3 | +++ configure.ac 2013-01-04 21:00:30 +0000 | |||
4 | @@ -6,7 +6,7 @@ | |||
5 | 6 | # Use and distribution licensed under the BSD license. See | 6 | # Use and distribution licensed under the BSD license. See |
6 | 7 | # the COPYING file in this directory for full text. | 7 | # the COPYING file in this directory for full text. |
7 | 8 | 8 | ||
9 | 9 | AC_INIT([libdrizzle],[5.1.0],[http://bugs.launchpad.net/drizzle],[libdrizzle],[http://drizzle.org/]) | 9 | AC_INIT([libdrizzle],[5.1.1],[http://bugs.launchpad.net/drizzle],[libdrizzle],[http://drizzle.org/]) |
10 | 10 | 10 | ||
11 | 11 | AC_CONFIG_AUX_DIR([build-aux]) | 11 | AC_CONFIG_AUX_DIR([build-aux]) |
12 | 12 | 12 | ||
13 | @@ -27,7 +27,7 @@ | |||
14 | 27 | AC_CONFIG_SRCDIR([libdrizzle/drizzle.cc]) | 27 | AC_CONFIG_SRCDIR([libdrizzle/drizzle.cc]) |
15 | 28 | 28 | ||
16 | 29 | #shared library versioning | 29 | #shared library versioning |
18 | 30 | LIBDRIZZLE_LIBRARY_VERSION=5:1:0 | 30 | LIBDRIZZLE_LIBRARY_VERSION=6:0:0 |
19 | 31 | # | | | | 31 | # | | | |
20 | 32 | # +------+ | +---+ | 32 | # +------+ | +---+ |
21 | 33 | # | | | | 33 | # | | | |
22 | 34 | 34 | ||
23 | === modified file 'docs/api/connection.rst' | |||
24 | --- docs/api/connection.rst 2012-12-22 08:54:15 +0000 | |||
25 | +++ docs/api/connection.rst 2013-01-04 21:00:30 +0000 | |||
26 | @@ -215,6 +215,13 @@ | |||
27 | 215 | :param con: A connection object | 215 | :param con: A connection object |
28 | 216 | :returns: A :c:type:`drizzle_return_t` status. :py:const:`DRIZZLE_RETURN_OK` upon success | 216 | :returns: A :c:type:`drizzle_return_t` status. :py:const:`DRIZZLE_RETURN_OK` upon success |
29 | 217 | 217 | ||
30 | 218 | .. c:function:: drizzle_return_t drizzle_close(drizzle_st *con) | ||
31 | 219 | |||
32 | 220 | Gracefully disconnect from a server (leaves the connection object available for a reconnect | ||
33 | 221 | |||
34 | 222 | :param con: A connection object | ||
35 | 223 | :returns: A :c:type:`drizzle_return_t` response for the quit command sent to the server | ||
36 | 224 | |||
37 | 218 | .. c:function:: drizzle_return_t drizzle_quit(drizzle_st *con) | 225 | .. c:function:: drizzle_return_t drizzle_quit(drizzle_st *con) |
38 | 219 | 226 | ||
39 | 220 | Gracefully disconnect from a server and free the connection object | 227 | Gracefully disconnect from a server and free the connection object |
40 | 221 | 228 | ||
41 | === modified file 'docs/api/statement.rst' | |||
42 | --- docs/api/statement.rst 2012-12-23 14:44:44 +0000 | |||
43 | +++ docs/api/statement.rst 2013-01-04 21:00:30 +0000 | |||
44 | @@ -19,17 +19,108 @@ | |||
45 | 19 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into | 19 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into |
46 | 20 | :returns: A newly allocated and prepared statement object (or NULL on error) | 20 | :returns: A newly allocated and prepared statement object (or NULL on error) |
47 | 21 | 21 | ||
59 | 22 | .. c:function:: drizzle_return_t drizzle_stmt_bind_param(drizzle_stmt_st *stmt, uint16_t param_num, drizzle_column_type_t type, void *data, uint32_t length, drizzle_bind_options_t options) | 22 | .. c:function:: drizzle_return_t drizzle_stmt_set_tiny(drizzle_stmt_st *stmt, uint16_t param_num, uint8_t value, bool is_unsigned) |
60 | 23 | 23 | ||
61 | 24 | Bind a parameter to send in statement. This needs to be called before every | 24 | Sets a parameter of a prepared statement to a tinyint value |
62 | 25 | :c:func:`drizzle_stmt_execute` if the data changes. | 25 | |
63 | 26 | 26 | :param stmt: A prepared statement object | |
64 | 27 | :param stmt: The prepared statement object | 27 | :param param_num: The parameter number to set (starting at 0) |
65 | 28 | :param param_num: The parameter number this bind is for | 28 | :param value: The value to set the parameter |
66 | 29 | :param type: The column type this parameter uses | 29 | :param is_unsigned: Set to true if the parameter is unsigned |
67 | 30 | :param data: The data for this parameter | 30 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success |
68 | 31 | :param length: The length of the data | 31 | |
69 | 32 | :param options: Options for the parameter | 32 | .. c:function:: drizzle_return_t drizzle_stmt_set_short(drizzle_stmt_st *stmt, uint16_t param_num, uint16_t value, bool is_unsigned) |
70 | 33 | |||
71 | 34 | Sets a parameter of a prepared statement to a short int value | ||
72 | 35 | |||
73 | 36 | :param stmt: A prepared statement object | ||
74 | 37 | :param param_num: The parameter number to set (starting at 0) | ||
75 | 38 | :param value: The value to set the parameter | ||
76 | 39 | :param is_unsigned: Set to true if the parameter is unsigned | ||
77 | 40 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | ||
78 | 41 | |||
79 | 42 | .. c:function:: drizzle_return_t drizzle_stmt_set_int(drizzle_stmt_st *stmt, uint16_t param_num, uint32_t value, bool is_unsigned) | ||
80 | 43 | |||
81 | 44 | Sets a parameter of a prepared statement to an int value | ||
82 | 45 | |||
83 | 46 | :param stmt: A prepared statement object | ||
84 | 47 | :param param_num: The parameter number to set (starting at 0) | ||
85 | 48 | :param value: The value to set the parameter | ||
86 | 49 | :param is_unsigned: Set to true if the parameter is unsigned | ||
87 | 50 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | ||
88 | 51 | |||
89 | 52 | .. c:function:: drizzle_return_t drizzle_stmt_set_bigint(drizzle_stmt_st *stmt, uint16_t param_num, uint64_t value, bool is_unsigned) | ||
90 | 53 | |||
91 | 54 | Sets a parameter of a prepared statement to a bigint value | ||
92 | 55 | |||
93 | 56 | :param stmt: A prepared statement object | ||
94 | 57 | :param param_num: The parameter number to set (starting at 0) | ||
95 | 58 | :param value: The value to set the parameter | ||
96 | 59 | :param is_unsigned: Set to true if the parameter is unsigned | ||
97 | 60 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | ||
98 | 61 | |||
99 | 62 | .. c:function:: drizzle_return_t drizzle_stmt_set_double(drizzle_stmt_st *stmt, uint16_t param_num, double value) | ||
100 | 63 | |||
101 | 64 | Sets a parameter of a prepared statement to a double value | ||
102 | 65 | |||
103 | 66 | :param stmt: A prepared statement object | ||
104 | 67 | :param param_num: The parameter number to set (starting at 0) | ||
105 | 68 | :param value: The value to set the parameter | ||
106 | 69 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | ||
107 | 70 | |||
108 | 71 | .. c:function:: drizzle_return_t drizzle_stmt_set_float(drizzle_stmt_st *stmt, uint16_t param_num, float value) | ||
109 | 72 | |||
110 | 73 | Sets a parameter of a prepared statement to a float value | ||
111 | 74 | |||
112 | 75 | :param stmt: A prepared statement object | ||
113 | 76 | :param param_num: The parameter number to set (starting at 0) | ||
114 | 77 | :param value: The value to set the parameter | ||
115 | 78 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | ||
116 | 79 | |||
117 | 80 | .. c:function:: drizzle_return_t drizzle_stmt_set_string(drizzle_stmt_st *stmt, uint16_t param_num, char *value, size_t length) | ||
118 | 81 | |||
119 | 82 | Sets a parameter of a prepared statement to a string value | ||
120 | 83 | |||
121 | 84 | :param stmt: A prepared statement object | ||
122 | 85 | :param param_num: The parameter number to set (starting at 0) | ||
123 | 86 | :param value: The value to set the parameter | ||
124 | 87 | :param length: The length of the value data | ||
125 | 88 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | ||
126 | 89 | |||
127 | 90 | .. c:function:: drizzle_return_t drizzle_stmt_set_null(drizzle_stmt_st *stmt, uint16_t param_num) | ||
128 | 91 | |||
129 | 92 | Sets a parameter of a prepared statement to a NULL value | ||
130 | 93 | |||
131 | 94 | :param stmt: A prepared statement object | ||
132 | 95 | :param param_num: The parameter number to set (starting at 0) | ||
133 | 96 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | ||
134 | 97 | |||
135 | 98 | .. c:function:: drizzle_return_t drizzle_stmt_set_time(drizzle_stmt_st *stmt, uint16_t param_num, uint32_t days, uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t microseconds, bool is_negative) | ||
136 | 99 | |||
137 | 100 | Sets a parameter of a prepared statement to a time value | ||
138 | 101 | |||
139 | 102 | :param stmt: A prepared statement object | ||
140 | 103 | :param param_num: The parameter number to set (starting at 0) | ||
141 | 104 | :param days: The number of days for the time | ||
142 | 105 | :param hours: The number of hours for the time | ||
143 | 106 | :param minutes: The number of minutes for the time | ||
144 | 107 | :param seconds: The number of seconds for the time | ||
145 | 108 | :param microseconds: The number of microseconds for the time | ||
146 | 109 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | ||
147 | 110 | |||
148 | 111 | .. c:function:: drizzle_return_t drizzle_stmt_set_timestamp(drizzle_stmt_st *stmt, uint16_t param_num, uint16_t year, uint8_t month, uint8_t day, uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t microseconds) | ||
149 | 112 | |||
150 | 113 | Sets a parameter of a prepared statement to a datetime/timestamp value | ||
151 | 114 | |||
152 | 115 | :param stmt: A prepared statement object | ||
153 | 116 | :param param_num: The parameter number to set (starting at 0) | ||
154 | 117 | :param year: The year number for the timestamp | ||
155 | 118 | :param month: The month number for the timestamp | ||
156 | 119 | :param day: The day number for the timestamp | ||
157 | 120 | :param hours: The hour number for the timestamp | ||
158 | 121 | :param minutes: The minute number for the timestamp | ||
159 | 122 | :param seconds: The minute number for the timestamp | ||
160 | 123 | :param microseconds: The minute number for the timestamp | ||
161 | 33 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | 124 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success |
162 | 34 | 125 | ||
163 | 35 | .. c:function:: drizzle_return_t drizzle_stmt_execute(drizzle_stmt_st *stmt) | 126 | .. c:function:: drizzle_return_t drizzle_stmt_execute(drizzle_stmt_st *stmt) |
164 | @@ -71,6 +162,61 @@ | |||
165 | 71 | :param stmt: The prepared statement object | 162 | :param stmt: The prepared statement object |
166 | 72 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | 163 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success |
167 | 73 | 164 | ||
168 | 165 | .. c:function:: bool drizzle_stmt_get_is_null(drizzle_stmt_st *stmt, uint16_t column_number, drizzle_return_t *ret_ptr) | ||
169 | 166 | |||
170 | 167 | Check if a column for a fetched row is set to NULL | ||
171 | 168 | |||
172 | 169 | :param stmt: The prepared statement object | ||
173 | 170 | :param column_number: The column number to get (starting at 0) | ||
174 | 171 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into | ||
175 | 172 | :returns: True if NULL | ||
176 | 173 | |||
177 | 174 | .. c:function:: bool drizzle_stmt_get_is_unsigned(drizzle_stmt_st *stmt, uint16_t column_number, drizzle_return_t *ret_ptr) | ||
178 | 175 | |||
179 | 176 | Check if a column for a fetched row is unsigned | ||
180 | 177 | |||
181 | 178 | :param stmt: The prepared statement object | ||
182 | 179 | :param column_number: The column number to get (starting at 0) | ||
183 | 180 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into | ||
184 | 181 | :returns: True if unsigned | ||
185 | 182 | |||
186 | 183 | .. c:function:: const char *drizzle_stmt_get_string(drizzle_stmt_st *stmt, uint16_t column_number, size_t *len, drizzle_return_t *ret_ptr) | ||
187 | 184 | |||
188 | 185 | Get the string value for a column of a fetched row (int types are automatically converted) | ||
189 | 186 | |||
190 | 187 | :param stmt: The prepared statement object | ||
191 | 188 | :param column_number: The column number to get (starting at 0) | ||
192 | 189 | :param len: A pointer to a :c:type:`size_t` to store the result length into | ||
193 | 190 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into | ||
194 | 191 | :returns: A pointer to the string value | ||
195 | 192 | |||
196 | 193 | .. c:function:: uint32_t drizzle_stmt_get_int(drizzle_stmt_st *stmt, uint16_t column_number, drizzle_return_t *ret_ptr) | ||
197 | 194 | |||
198 | 195 | Get the int value for a column of a fetched row | ||
199 | 196 | |||
200 | 197 | :param stmt: The prepared statement object | ||
201 | 198 | :param column_number: The column number to get (starting at 0) | ||
202 | 199 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into :py:const:`DRIZZLE_RETURN_TRUNCATED` if a truncation has occurred | ||
203 | 200 | :returns: The int value | ||
204 | 201 | |||
205 | 202 | .. c:function:: uint64_t drizzle_stmt_get_bigint(drizzle_stmt_st *stmt, uint16_t column_number, drizzle_return_t *ret_ptr) | ||
206 | 203 | |||
207 | 204 | Get the bigint value for a column of a fetched row | ||
208 | 205 | |||
209 | 206 | :param stmt: The prepared statement object | ||
210 | 207 | :param column_number: The column number to get (starting at 0) | ||
211 | 208 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into :py:const:`DRIZZLE_RETURN_TRUNCATED` if a truncation has occurred | ||
212 | 209 | :returns: The bigint value | ||
213 | 210 | |||
214 | 211 | .. c:function:: double drizzle_stmt_get_double(drizzle_stmt_st *stmt, uint16_t column_number, drizzle_return_t *ret_ptr) | ||
215 | 212 | |||
216 | 213 | Get the double value for a column of a fetched row | ||
217 | 214 | |||
218 | 215 | :param stmt: The prepared statement object | ||
219 | 216 | :param column_number: The column number to get (starting at 0) | ||
220 | 217 | :param ret_ptr: A pointer to a :c:type:`drizzle_return_t` to store the return status into :py:const:`DRIZZLE_RETURN_TRUNCATED` if a truncation has occurred | ||
221 | 218 | :returns: The double value | ||
222 | 219 | |||
223 | 74 | .. c:function:: drizzle_return_t drizzle_stmt_close(drizzle_stmt_st *stmt) | 220 | .. c:function:: drizzle_return_t drizzle_stmt_close(drizzle_stmt_st *stmt) |
224 | 75 | 221 | ||
225 | 76 | Close and free a prepared statement | 222 | Close and free a prepared statement |
226 | @@ -78,38 +224,6 @@ | |||
227 | 78 | :param stmt: The prepared statement object | 224 | :param stmt: The prepared statement object |
228 | 79 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success | 225 | :returns: A return status code, :py:const:`DRIZZLE_RETURN_OK` upon success |
229 | 80 | 226 | ||
230 | 81 | .. c:function:: drizzle_column_type_t drizzle_stmt_item_type(drizzle_stmt_st *stmt, uint16_t column_number) | ||
231 | 82 | |||
232 | 83 | Gets the column type of an element from a row retrieved with :c:func:`drizzle_stmt_fetch` | ||
233 | 84 | |||
234 | 85 | :param stmt: The prepared statement object | ||
235 | 86 | :param column_number: The column number for the element | ||
236 | 87 | :returns: The column type | ||
237 | 88 | |||
238 | 89 | .. c:function:: void* drizzle_stmt_item_data(drizzle_stmt_st *stmt, uint16_t column_number) | ||
239 | 90 | |||
240 | 91 | Gets the data of an element from a row retrieved with :c:func:`drizzle_stmt_fetch` | ||
241 | 92 | |||
242 | 93 | :param stmt: The prepared statement object | ||
243 | 94 | :param column_number: The column number for the element | ||
244 | 95 | :returns: The data for the element | ||
245 | 96 | |||
246 | 97 | .. c:function:: uint32_t drizzle_stmt_item_length(drizzle_stmt_st *stmt, uint16_t column_number) | ||
247 | 98 | |||
248 | 99 | Gets the length of the data for an element from a row retrieved with :c:func:`drizzle_stmt_fetch` | ||
249 | 100 | |||
250 | 101 | :param stmt: The prepared statement object | ||
251 | 102 | :param column_number: The column number for the element | ||
252 | 103 | :returns: The length of data for the element | ||
253 | 104 | |||
254 | 105 | .. c:function:: drizzle_bind_options_t drizzle_stmt_item_options(drizzle_stmt_st *stmt, uint16_t column_number) | ||
255 | 106 | |||
256 | 107 | Gets the options set for an element from a row retrieved with :c:func:`drizzle_stmt_fetch` | ||
257 | 108 | |||
258 | 109 | :param stmt: The prepared statement object | ||
259 | 110 | :param column_number: The column number for the element | ||
260 | 111 | :returns: The options for the element | ||
261 | 112 | |||
262 | 113 | .. c:function:: uint16_t drizzle_stmt_column_count(drizzle_stmt_st *stmt) | 227 | .. c:function:: uint16_t drizzle_stmt_column_count(drizzle_stmt_st *stmt) |
263 | 114 | 228 | ||
264 | 115 | Gets the column count for a result set which has been executed using :c:func:`drizzle_stmt_execute` | 229 | Gets the column count for a result set which has been executed using :c:func:`drizzle_stmt_execute` |
265 | 116 | 230 | ||
266 | === modified file 'docs/examples/statement.rst' | |||
267 | --- docs/examples/statement.rst 2012-12-23 14:44:44 +0000 | |||
268 | +++ docs/examples/statement.rst 2013-01-04 21:00:30 +0000 | |||
269 | @@ -12,8 +12,8 @@ | |||
270 | 12 | :c:func:`drizzle_stmt_prepare` and we can get the number of parameters the | 12 | :c:func:`drizzle_stmt_prepare` and we can get the number of parameters the |
271 | 13 | server is expecting with :c:func:`drizzle_stmt_param_count`. In this example | 13 | server is expecting with :c:func:`drizzle_stmt_param_count`. In this example |
272 | 14 | we know that there is only one parameter required so we send one INT type | 14 | we know that there is only one parameter required so we send one INT type |
275 | 15 | parameter using :c:func:`drizzle_stmt_bind_param` stating that this is | 15 | parameter using :c:func:`drizzle_stmt_set_int` stating that this is |
276 | 16 | parameter 0 and it is 4 bytes long (standard for an INT type). | 16 | parameter 0 and a signed value. |
277 | 17 | 17 | ||
278 | 18 | Once the parameters have been provided the statement is executed using | 18 | Once the parameters have been provided the statement is executed using |
279 | 19 | :c:func:`drizzle_stmt_execute` and the results buffered using | 19 | :c:func:`drizzle_stmt_execute` and the results buffered using |
280 | @@ -22,11 +22,9 @@ | |||
281 | 22 | 22 | ||
282 | 23 | Finally we get the result data. A call to :c:func:`drizzle_stmt_fetch` gets | 23 | Finally we get the result data. A call to :c:func:`drizzle_stmt_fetch` gets |
283 | 24 | the next row from either the network or the buffer (the buffer in this case). | 24 | the next row from either the network or the buffer (the buffer in this case). |
289 | 25 | The data can be retreived using :c:func:`drizzle_stmt_item_data`, a call for | 25 | The int data is retreived using :c:func:`drizzle_stmt_get_int`, a call for |
290 | 26 | each column in the row (in example the table only has one column). | 26 | each column in the row (in example the table only has one column) is made using |
291 | 27 | 27 | the ``drizzle_stmt_get_`` functions. | |
287 | 28 | It is also possible to get the data type and length of data using the other | ||
288 | 29 | ``drizzle_stmt_item_`` functions. | ||
292 | 30 | 28 | ||
293 | 31 | When we are done the statement is closed and cleaned up using | 29 | When we are done the statement is closed and cleaned up using |
294 | 32 | :c:func:`drizzle_stmt_close`. It can also be reused with | 30 | :c:func:`drizzle_stmt_close`. It can also be reused with |
295 | @@ -45,7 +43,7 @@ | |||
296 | 45 | printf("Params: %" PRIu16 "\n", drizzle_stmt_param_count(stmt)); | 43 | printf("Params: %" PRIu16 "\n", drizzle_stmt_param_count(stmt)); |
297 | 46 | 44 | ||
298 | 47 | uint32_t val= 1; | 45 | uint32_t val= 1; |
300 | 48 | ret = drizzle_stmt_bind_param(stmt, 0, DRIZZLE_COLUMN_TYPE_LONG, &val, 4, DRIZZLE_BIND_OPTION_NONE); | 46 | ret = drizzle_stmt_set_int(stmt, 0, val, false); |
301 | 49 | 47 | ||
302 | 50 | ret = drizzle_stmt_execute(stmt); | 48 | ret = drizzle_stmt_execute(stmt); |
303 | 51 | 49 | ||
304 | @@ -54,8 +52,8 @@ | |||
305 | 54 | printf("Rows found: %" PRIu64 "\n", drizzle_stmt_row_count(stmt)); | 52 | printf("Rows found: %" PRIu64 "\n", drizzle_stmt_row_count(stmt)); |
306 | 55 | while (drizzle_stmt_fetch(stmt) != DRIZZLE_RETURN_ROW_END) | 53 | while (drizzle_stmt_fetch(stmt) != DRIZZLE_RETURN_ROW_END) |
307 | 56 | { | 54 | { |
310 | 57 | uint32_t *res_val; | 55 | uint32_t res_val; |
311 | 58 | res_val= (uint32_t*)drizzle_stmt_item_data(stmt, 0); | 56 | res_val= drizzle_stmt_get_int(stmt, 0, &ret); |
312 | 59 | printf("Got value: %" PRIu32 "\n", *res_val); | 57 | printf("Got value: %" PRIu32 "\n", *res_val); |
313 | 60 | } | 58 | } |
314 | 61 | ret = drizzle_stmt_close(stmt); | 59 | ret = drizzle_stmt_close(stmt); |
315 | 62 | 60 | ||
316 | === modified file 'rpm/spec.in' | |||
317 | --- rpm/spec.in 2012-12-31 00:19:49 +0000 | |||
318 | +++ rpm/spec.in 2013-01-04 21:00:30 +0000 | |||
319 | @@ -53,8 +53,7 @@ | |||
320 | 53 | %{_libdir}/libdrizzle.a | 53 | %{_libdir}/libdrizzle.a |
321 | 54 | %{_libdir}/libdrizzle.la | 54 | %{_libdir}/libdrizzle.la |
322 | 55 | %{_libdir}/libdrizzle.so | 55 | %{_libdir}/libdrizzle.so |
325 | 56 | %{_libdir}/libdrizzle.so.5 | 56 | %{_libdir}/libdrizzle.so.* |
324 | 57 | %{_libdir}/libdrizzle.so.5.0.1 | ||
326 | 58 | %{_bindir}/drizzle_binlogs | 57 | %{_bindir}/drizzle_binlogs |
327 | 59 | %{_bindir}/libdrizzle-config | 58 | %{_bindir}/libdrizzle-config |
328 | 60 | 59 |