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>DbMultipleDataIterator</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="dbmultipleiterator.html" title="DbMultipleIterator" /> 12 <link rel="next" href="dbmultiplekeydataiterator.html" title="DbMultipleKeyDataIterator" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">DbMultipleDataIterator</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="dbmultipleiterator.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="dbmultiplekeydataiterator.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="dbmultipledataiterator"></a>DbMultipleDataIterator</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db_cxx.h> 39 40class DbMultipleDataIterator 41{ 42public: 43 DbMultipleDataIterator(const Dbt &dbt); 44 45 bool next(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 the 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">DB_MULTIPLE</a> 62 flag from a database belonging to any access method. 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">DB_MULTIPLE</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">DB_MULTIPLE</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="dbmultiplemataiterator.next"></a>DbMultipleDataIterator.next()</h3> 110 </div> 111 </div> 112 </div> 113 <p> 114 The <code class="methodname">DbMultipleDataIterator.next()</code> method 115 returns the next data item in the original bulk retrieval buffer. 116 </p> 117 <p> 118 The <code class="methodname">DbMultipleDataIterator.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">data</code> 130 </p> 131 <p> 132 The <span class="bold"><strong>data</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 </ul> 142 </div> 143 </div> 144 <div class="sect2" lang="en" xml:lang="en"> 145 <div class="titlepage"> 146 <div> 147 <div> 148 <h3 class="title"><a id="id1660781"></a>Class</h3> 149 </div> 150 </div> 151 </div> 152 <p> 153 <a class="link" href="dbmultipleiterator.html" title="DbMultipleIterator">DbMultipleIterator</a> 154 </p> 155 </div> 156 <div class="sect2" lang="en" xml:lang="en"> 157 <div class="titlepage"> 158 <div> 159 <div> 160 <h3 class="title"><a id="id1660776"></a>See Also</h3> 161 </div> 162 </div> 163 </div> 164 <p> 165 <a class="xref" href="dbt.html#dbtlist" title="DBT and Bulk Operations">DBT and Bulk Operations</a> 166 </p> 167 </div> 168 </div> 169 <div class="navfooter"> 170 <hr /> 171 <table width="100%" summary="Navigation footer"> 172 <tr> 173 <td width="40%" align="left"><a accesskey="p" href="dbmultipleiterator.html">Prev</a> </td> 174 <td width="20%" align="center"> 175 <a accesskey="u" href="dbt.html">Up</a> 176 </td> 177 <td width="40%" align="right"> <a accesskey="n" href="dbmultiplekeydataiterator.html">Next</a></td> 178 </tr> 179 <tr> 180 <td width="40%" align="left" valign="top">DbMultipleIterator </td> 181 <td width="20%" align="center"> 182 <a accesskey="h" href="index.html">Home</a> 183 </td> 184 <td width="40%" align="right" valign="top"> DbMultipleKeyDataIterator</td> 185 </tr> 186 </table> 187 </div> 188 </body> 189</html> 190