Debian Codegraph @

doc/driver-guide/driverfuncs-dbquery.html

raw
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Internal Database Query Functions</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9 REL="HOME"
10 TITLE="Database Independent Abstraction Layer for C"
11 HREF="index.html"><LINK
12 REL="UP"
13 TITLE="Driver Functions"
14 HREF="driverfuncs.html"><LINK
15 REL="PREVIOUS"
16 TITLE="Driver Infrastructure Functions"
17 HREF="driverfuncs-infrastructure.html"><LINK
18 REL="NEXT"
19 TITLE="Public Database Query Functions"
20 HREF="driverfuncs-publicdbquery.html"></HEAD
21 ><BODY
22 CLASS="SECTION"
23 BGCOLOR="#FFFFFF"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 SUMMARY="Header navigation table"
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >Database Independent Abstraction Layer for C: libdbi Driver Author's Guide</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="driverfuncs-infrastructure.html"
49 ACCESSKEY="P"
50 >Prev</A
51 ></TD
52 ><TD
53 WIDTH="80%"
54 ALIGN="center"
55 VALIGN="bottom"
56 >Chapter 3. Driver Functions</TD
57 ><TD
58 WIDTH="10%"
59 ALIGN="right"
60 VALIGN="bottom"
61 ><A
62 HREF="driverfuncs-publicdbquery.html"
63 ACCESSKEY="N"
64 >Next</A
65 ></TD
66 ></TR
67 ></TABLE
68 ><HR
69 ALIGN="LEFT"
70 WIDTH="100%"></DIV
71 ><DIV
72 CLASS="SECTION"
73 ><H1
74 CLASS="SECTION"
75 ><A
76 NAME="DRIVERFUNCS-DBQUERY"
77 >3.2. Internal Database Query Functions</A
78 ></H1
79 ><P
80 >These functions are called by libdbi when the libdbi user runs queries and accesses their results. There are also a bunch of helper functions that deal with the character encodings as well as with string escaping and quoting.</P
81 ><DIV
82 CLASS="SECTION"
83 ><H2
84 CLASS="SECTION"
85 ><A
86 NAME="DBD-GOTO-ROW"
87 >3.2.1. dbd_goto_row</A
88 ></H2
89 ><DIV
90 CLASS="FUNCSYNOPSIS"
91 ><P
92 ></P
93 ><A
94 NAME="AEN279"
95 ></A
96 ><P
97 ><CODE
98 ><CODE
99 CLASS="FUNCDEF"
100 >int <B
101 CLASS="FSFUNC"
102 >dbd_goto_row</B
103 ></CODE
104 >(dbi_result_t *<VAR
105 CLASS="PDPARAM"
106 >result</VAR
107 >, unsigned long long <VAR
108 CLASS="PDPARAM"
109 >rowidx</VAR
110 >, unsigned long long <VAR
111 CLASS="PDPARAM"
112 >currowidx</VAR
113 >);</CODE
114 ></P
115 ><P
116 ></P
117 ></DIV
118 ><P
119 >Jumps to the specifed row in the result set. Internal row counts start at 0. The current row number is passed to the driver to allow it to check whether a (presumably expensive) seek operation is required.</P
120 ><P
121 ></P
122 ><DIV
123 CLASS="VARIABLELIST"
124 ><DL
125 ><DT
126 >Arguments</DT
127 ><DD
128 ><P
129 ><TT
130 CLASS="LITERAL"
131 >result</TT
132 >: The target result handle.</P
133 ><P
134 ><TT
135 CLASS="LITERAL"
136 >row</TT
137 >: The target row number.</P
138 ><P
139 ><TT
140 CLASS="LITERAL"
141 >row</TT
142 >: The current row number.</P
143 ></DD
144 ><DT
145 >Returns</DT
146 ><DD
147 ><P
148 >1 on success, 0 on error.</P
149 ></DD
150 ></DL
151 ></DIV
152 ></DIV
153 ><DIV
154 CLASS="SECTION"
155 ><H2
156 CLASS="SECTION"
157 ><A
158 NAME="DBD-FETCH-ROW"
159 >3.2.2. dbd_fetch_row</A
160 ></H2
161 ><DIV
162 CLASS="FUNCSYNOPSIS"
163 ><P
164 ></P
165 ><A
166 NAME="AEN306"
167 ></A
168 ><P
169 ><CODE
170 ><CODE
171 CLASS="FUNCDEF"
172 >int <B
173 CLASS="FSFUNC"
174 >dbd_fetch_row</B
175 ></CODE
176 >(dbi_result_t *<VAR
177 CLASS="PDPARAM"
178 >result</VAR
179 >, unsigned long long <VAR
180 CLASS="PDPARAM"
181 >rowidx</VAR
182 >);</CODE
183 ></P
184 ><P
185 ></P
186 ></DIV
187 ><P
188 >Fetches the target row, retrieving one-time field information if necessary. Also see the <A
189 HREF="helperfuncs.html#INTERNAL-DBD-ROW-ALLOCATE"
190 >_dbd_row_allocate</A
191 > and <A
192 HREF="helperfuncs.html#INTERNAL-DBD-ROW-FINALIZE"
193 >_dbd_row_finalize</A
194 > helper functions.</P
195 ><P
196 ></P
197 ><DIV
198 CLASS="VARIABLELIST"
199 ><DL
200 ><DT
201 >Arguments</DT
202 ><DD
203 ><P
204 ><TT
205 CLASS="LITERAL"
206 >result</TT
207 >: The target result object.</P
208 ><P
209 ><TT
210 CLASS="LITERAL"
211 >rowidx</TT
212 >: The number of the row to fetch. Internal row numbers start at zero.</P
213 ></DD
214 ><DT
215 >Returns</DT
216 ><DD
217 ><P
218 >0 on error, 1 on successful fetch.</P
219 ></DD
220 ></DL
221 ></DIV
222 ></DIV
223 ><DIV
224 CLASS="SECTION"
225 ><H2
226 CLASS="SECTION"
227 ><A
228 NAME="DBD-FREE-QUERY"
229 >3.2.3. dbd_free_query</A
230 ></H2
231 ><DIV
232 CLASS="FUNCSYNOPSIS"
233 ><P
234 ></P
235 ><A
236 NAME="AEN331"
237 ></A
238 ><P
239 ><CODE
240 ><CODE
241 CLASS="FUNCDEF"
242 >int <B
243 CLASS="FSFUNC"
244 >dbd_free_query</B
245 ></CODE
246 >(dbi_result_t *<VAR
247 CLASS="PDPARAM"
248 >result</VAR
249 >);</CODE
250 ></P
251 ><P
252 ></P
253 ></DIV
254 ><P
255 >Frees the target result handle.</P
256 ><P
257 ></P
258 ><DIV
259 CLASS="VARIABLELIST"
260 ><DL
261 ><DT
262 >Arguments</DT
263 ><DD
264 ><P
265 ><TT
266 CLASS="LITERAL"
267 >result</TT
268 >: The target result handle.</P
269 ></DD
270 ><DT
271 >Returns</DT
272 ><DD
273 ><P
274 >0 on success.</P
275 ></DD
276 ></DL
277 ></DIV
278 ></DIV
279 ></DIV
280 ><DIV
281 CLASS="NAVFOOTER"
282 ><HR
283 ALIGN="LEFT"
284 WIDTH="100%"><TABLE
285 SUMMARY="Footer navigation table"
286 WIDTH="100%"
287 BORDER="0"
288 CELLPADDING="0"
289 CELLSPACING="0"
290 ><TR
291 ><TD
292 WIDTH="33%"
293 ALIGN="left"
294 VALIGN="top"
295 ><A
296 HREF="driverfuncs-infrastructure.html"
297 ACCESSKEY="P"
298 >Prev</A
299 ></TD
300 ><TD
301 WIDTH="34%"
302 ALIGN="center"
303 VALIGN="top"
304 ><A
305 HREF="index.html"
306 ACCESSKEY="H"
307 >Home</A
308 ></TD
309 ><TD
310 WIDTH="33%"
311 ALIGN="right"
312 VALIGN="top"
313 ><A
314 HREF="driverfuncs-publicdbquery.html"
315 ACCESSKEY="N"
316 >Next</A
317 ></TD
318 ></TR
319 ><TR
320 ><TD
321 WIDTH="33%"
322 ALIGN="left"
323 VALIGN="top"
324 >Driver Infrastructure Functions</TD
325 ><TD
326 WIDTH="34%"
327 ALIGN="center"
328 VALIGN="top"
329 ><A
330 HREF="driverfuncs.html"
331 ACCESSKEY="U"
332 >Up</A
333 ></TD
334 ><TD
335 WIDTH="33%"
336 ALIGN="right"
337 VALIGN="top"
338 >Public Database Query Functions</TD
339 ></TR
340 ></TABLE
341 ></DIV
342 ></BODY
343 ></HTML
344 >