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>DbMultipleKeyDataIterator</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="dbmultipledataiterator.html" title="DbMultipleDataIterator" /> 12 <link rel="next" href="dbmultiplerecnodataiterator.html" title="DbMultipleRecnoDataIterator" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">DbMultipleKeyDataIterator</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="dbmultipledataiterator.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��4.�� 23 The Dbt Handle 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="dbmultiplerecnodataiterator.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="dbmultiplekeydataiterator"></a>DbMultipleKeyDataIterator</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db_cxx.h> 39 40class DbMultipleKeyDataIterator 41{ 42public: 43 DbMultipleKeyDataIterator(const Dbt &dbt); 44 45 bool next(Dbt &key, Dbt &data); 46}; </pre> 47 <p> 48 If either of the 49 <a class="link" href="dbcget.html#dbcget_DB_MULTIPLE">DB_MULTIPLE</a> 50 or 51 <a class="link" href="dbcget.html#dbcget_DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> 52 flags were specified to the <a class="xref" href="dbget.html" title="Db::get()">Db::get()</a> or 53 <a class="xref" href="dbcget.html" title="Dbc::get()">Dbc::get()</a> methods, the data 54 <a class="link" href="dbt.html" title="Chapter��4.�� The Dbt Handle">Dbt</a> returned by those interfaces will 55 refer to a buffer that is filled with data. Access to that data is through these 56 classes. 57 </p> 58 <p> 59 The <code class="classname">DbMultipleDataIterator</code> class is used to iterate through data 60 returned using the 61 <a class="link" href="dbcget.html#dbcget_DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> 62 flag from a database belonging to Btree or Hash access methods. 63 </p> 64 <p> 65 The constructor takes the <a class="xref" href="dbt.html" title="Chapter��4.�� The Dbt Handle"> 66 The Dbt Handle 67 </a> 68 returned by the call to <a class="xref" href="dbget.html" title="Db::get()">Db::get()</a> 69 or <a class="xref" href="dbcget.html" title="Dbc::get()">Dbc::get()</a> that used the 70 <a class="link" href="dbcget.html#dbcget_DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> 71 flag. 72 </p> 73 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> 74 <h3 class="title">Note</h3> 75 <p> 76 All instances of the bulk retrieval classes may be used only 77 once, and to traverse the bulk retrieval buffer in the forward 78 direction only. However, they are nondestructive, so multiple 79 iterators can be instantiated and used on the same returned 80 data <a class="link" href="dbt.html" title="Chapter��4.�� The Dbt Handle">Dbt</a>. 81 </p> 82 </div> 83 <p> 84 Parameters are: 85 </p> 86 <div class="itemizedlist"> 87 <ul type="disc"> 88 <li> 89 <p> 90 <code class="literal">dbt</code> 91 </p> 92 <p> 93 The <span class="bold"><strong>dbt</strong></span> parameter is a 94 data <a class="xref" href="dbt.html" title="Chapter��4.�� The Dbt Handle"> 95 The Dbt Handle 96 </a> 97 returned by the call to <a class="xref" href="dbget.html" title="Db::get()">Db::get()</a> 98 or <a class="xref" href="dbcget.html" title="Dbc::get()">Dbc::get()</a> that used the 99 <a class="link" href="dbcget.html#dbcget_DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> 100 flag. 101 </p> 102 </li> 103 </ul> 104 </div> 105 <div class="sect2" lang="en" xml:lang="en"> 106 <div class="titlepage"> 107 <div> 108 <div> 109 <h3 class="title"><a id="dbmultiplekeydataiterator.next"></a>DbMultipleKeyDataIterator.next()</h3> 110 </div> 111 </div> 112 </div> 113 <p> 114 The <code class="methodname">DbMultipleKeyDataIterator.next()</code> method 115 returns the next data item in the original bulk retrieval buffer. 116 </p> 117 <p> 118 The <code class="methodname">DbMultipleKeyDataIterator.next()</code> method 119 method returns <code class="literal">false</code> if no more data are available, and 120 <code class="literal">true</code> otherwise. 121 </p> 122 <p> 123 Parameters are: 124 </p> 125 <div class="itemizedlist"> 126 <ul type="disc"> 127 <li> 128 <p> 129 <code class="literal">key</code> 130 </p> 131 <p> 132 The <span class="bold"><strong>key</strong></span> parameter is a 133 <a class="xref" href="dbt.html" title="Chapter��4.�� The Dbt Handle"> 134 The Dbt Handle 135 </a> 136 that will be filled in with a reference to a buffer, a 137 size, and an offset that together yield the next data item 138 in the original bulk retrieval buffer. 139 </p> 140 </li> 141 <li> 142 <p> 143 <code class="literal">data</code> 144 </p> 145 <p> 146 The <span class="bold"><strong>data</strong></span> parameter is a 147 <a class="xref" href="dbt.html" title="Chapter��4.�� The Dbt Handle"> 148 The Dbt Handle 149 </a> 150 that will be filled in with a reference to a buffer, a 151 size, and an offset that together yield the next data item 152 in the original bulk retrieval buffer. 153 </p> 154 </li> 155 </ul> 156 </div> 157 </div> 158 <div class="sect2" lang="en" xml:lang="en"> 159 <div class="titlepage"> 160 <div> 161 <div> 162 <h3 class="title"><a id="id1661058"></a>Class</h3> 163 </div> 164 </div> 165 </div> 166 <p> 167 <a class="link" href="dbmultipleiterator.html" title="DbMultipleIterator">DbMultipleIterator</a> 168 </p> 169 </div> 170 <div class="sect2" lang="en" xml:lang="en"> 171 <div class="titlepage"> 172 <div> 173 <div> 174 <h3 class="title"><a id="id1659929"></a>See Also</h3> 175 </div> 176 </div> 177 </div> 178 <p> 179 <a class="xref" href="dbt.html#dbtlist" title="DBT and Bulk Operations">DBT and Bulk Operations</a> 180 </p> 181 </div> 182 </div> 183 <div class="navfooter"> 184 <hr /> 185 <table width="100%" summary="Navigation footer"> 186 <tr> 187 <td width="40%" align="left"><a accesskey="p" href="dbmultipledataiterator.html">Prev</a>��</td> 188 <td width="20%" align="center"> 189 <a accesskey="u" href="dbt.html">Up</a> 190 </td> 191 <td width="40%" align="right">��<a accesskey="n" href="dbmultiplerecnodataiterator.html">Next</a></td> 192 </tr> 193 <tr> 194 <td width="40%" align="left" valign="top">DbMultipleDataIterator��</td> 195 <td width="20%" align="center"> 196 <a accesskey="h" href="index.html">Home</a> 197 </td> 198 <td width="40%" align="right" valign="top">��DbMultipleRecnoDataIterator</td> 199 </tr> 200 </table> 201 </div> 202 </body> 203</html> 204