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