Debian Codegraph @

docs/api_reference/CXX/dbmultipledatabuilder.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DbMultipleDataBuilder</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
10 <link rel="up" href="dbt.html" title="Chapter 4.  The Dbt Handle" />
11 <link rel="prev" href="dbmultiplebuilder.html" title="DbMultipleBuilder" />
12 <link rel="next" href="dbmultiplekeydatabuilder.html" title="DbMultipleKeyDataBuilder" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DbMultipleDataBuilder</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="dbmultiplebuilder.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 4. 
26 The Dbt Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="dbmultiplekeydatabuilder.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="dbmultipledatabuilder"></a>DbMultipleDataBuilder</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 class DbMultipleDataBuilder
44 {
45 public:
46 DbMultipleDataBuilder(Dbt &amp;dbt);
47
48 bool append(void *dbuf, size_t dlen);
49 bool reserve(void *&amp;ddest, size_t dlen);
50 }; </pre>
51 <p>
52 This class builds a bulk buffer for use when the
53 <a class="link" href="dbput.html#put_DB_MULTIPLE">DB_MULTIPLE</a>
54 flag is specified to either the
55 <a class="xref" href="dbput.html" title="Db::put()">Db::put()</a> or
56 <a class="xref" href="dbdel.html" title="Db::del()">Db::del()</a> methods. The buffer in
57 the <a class="link" href="dbt.html" title="Chapter 4.  The Dbt Handle">Dbt</a> passed to the constructor is
58 filled by calls to
59 <a class="xref" href="dbmultipledatabuilder.html#dbmultipledatabuilder.append" title="DbMultipleDataBuilder.append()">DbMultipleDataBuilder.append()</a>
60 or
61 <a class="xref" href="dbmultipledatabuilder.html#dbmultipledatabuilder.reserve" title="DbMultipleDataBuilder.reserve()">DbMultipleDataBuilder.reserve()</a>.
62 </p>
63 <p>
64 The constructor takes a <a class="xref" href="dbt.html" title="Chapter 4.  The Dbt Handle">
65 The Dbt Handle
66 </a>
67 that must be configured to contain a buffer managed by the application,
68 with the <code class="literal">ulen</code> field set to the size of the buffer.
69 </p>
70 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
71 <h3 class="title">Note</h3>
72 <p>
73 All instances of the bulk retrieval classes may be used only once,
74 and to build the bulk buffer in the forward direction only.
75 </p>
76 </div>
77 <p>
78 Parameters are:
79 </p>
80 <div class="itemizedlist">
81 <ul type="disc">
82 <li>
83 <p>
84 <code class="literal">dbt</code>
85 </p>
86 <p>
87 The <span class="bold"><strong>dbt</strong></span> parameter is a <a class="xref" href="dbt.html" title="Chapter 4.  The Dbt Handle">
88 The Dbt Handle
89 </a> that must already be configured to contain a buffer managed by the application, with the <code class="literal">ulen</code> field set to the size of the buffer, which must be a multiple of 4.
90 </p>
91 </li>
92 </ul>
93 </div>
94 <div class="sect2" lang="en" xml:lang="en">
95 <div class="titlepage">
96 <div>
97 <div>
98 <h3 class="title"><a id="dbmultipledatabuilder.append"></a>DbMultipleDataBuilder.append()</h3>
99 </div>
100 </div>
101 </div>
102 <p>
103 The <code class="methodname">DbMultipleDataBuilder.append()</code> method
104 copies a data item to the end of the buffer.
105 </p>
106 <p>
107 The <code class="methodname">DbMultipleDataBuilder.append()</code>
108 method returns <code class="literal">false</code> if the data does not fit
109 in the buffer and <code class="literal">true</code> otherwise.
110 </p>
111 <p>
112 Parameters are:
113 </p>
114 <div class="itemizedlist">
115 <ul type="disc">
116 <li>
117 <p>
118 <code class="literal">dbuf</code>
119 </p>
120 <p>
121 A pointer to the data to be copied into the bulk buffer.
122 </p>
123 </li>
124 <li>
125 <p>
126 <code class="literal">dlen</code>
127 </p>
128 <p>
129 The number of bytes to be copied.
130 </p>
131 </li>
132 </ul>
133 </div>
134 </div>
135 <div class="sect2" lang="en" xml:lang="en">
136 <div class="titlepage">
137 <div>
138 <div>
139 <h3 class="title"><a id="dbmultipledatabuilder.reserve"></a>DbMultipleDataBuilder.reserve()</h3>
140 </div>
141 </div>
142 </div>
143 <p>
144 The <code class="methodname">DbMultipleDataBuilder.reserve()</code>
145 method reserves space for the next data item in the bulk buffer.
146 Unlike the <code class="methodname">append()</code>, no data is actually
147 copied into the bulk buffer by <code class="methodname">reserve()</code>:
148 copying the data is the responsibility of the application.
149 </p>
150 <p>
151 The <code class="methodname">DbMultipleDataBuilder.reserve()</code>
152 method returns <code class="literal">false</code> if the data does
153 not fit in the buffer and <code class="literal">true</code> otherwise.
154 </p>
155 <p>
156 Parameters are:
157 </p>
158 <div class="itemizedlist">
159 <ul type="disc">
160 <li>
161 <p>
162 <code class="literal">ddest</code>
163 </p>
164 <p>
165 Set to a pointer to the position in the bulk buffer reserved for the data item, if enough space is available.
166 </p>
167 </li>
168 <li>
169 <p>
170 <code class="literal">dlen</code>
171 </p>
172 <p>
173 The number of bytes to reserve.
174 </p>
175 </li>
176 </ul>
177 </div>
178 </div>
179 <div class="sect2" lang="en" xml:lang="en">
180 <div class="titlepage">
181 <div>
182 <div>
183 <h3 class="title"><a id="idp6514520"></a>Class</h3>
184 </div>
185 </div>
186 </div>
187 <p>
188 <a class="link" href="dbt.html" title="Chapter 4.  The Dbt Handle">Dbt</a>
189 </p>
190 </div>
191 <div class="sect2" lang="en" xml:lang="en">
192 <div class="titlepage">
193 <div>
194 <div>
195 <h3 class="title"><a id="idp6468120"></a>See Also</h3>
196 </div>
197 </div>
198 </div>
199 <p>
200 <a class="xref" href="dbt.html#dbtlist" title="DBT and Bulk Operations">DBT and Bulk Operations</a>
201 </p>
202 </div>
203 </div>
204 <div class="navfooter">
205 <hr />
206 <table width="100%" summary="Navigation footer">
207 <tr>
208 <td width="40%" align="left"><a accesskey="p" href="dbmultiplebuilder.html">Prev</a> </td>
209 <td width="20%" align="center">
210 <a accesskey="u" href="dbt.html">Up</a>
211 </td>
212 <td width="40%" align="right"> <a accesskey="n" href="dbmultiplekeydatabuilder.html">Next</a></td>
213 </tr>
214 <tr>
215 <td width="40%" align="left" valign="top">DbMultipleBuilder </td>
216 <td width="20%" align="center">
217 <a accesskey="h" href="index.html">Home</a>
218 </td>
219 <td width="40%" align="right" valign="top"> DbMultipleKeyDataBuilder</td>
220 </tr>
221 </table>
222 </div>
223 </body>
224 </html>