1<!--$Id: dbt_bulk_class.so,v 1.15 2004/08/13 03:38:56 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB: Bulk Retrieval API</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td> 13<b>Bulk Retrieval API</b> 14</td> 15<td align=right> 16<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a> 17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db_cxx.h> 23<p> 24class DbMultipleDataIterator 25{ 26public: 27 DbMultipleDataIterator(const Dbt &dbt); 28<p> 29 bool next(Dbt &data); 30}; 31<p> 32class DbMultipleKeyDataIterator 33{ 34public: 35 DbMultipleKeyDataIterator(const Dbt &dbt); 36<p> 37 bool next(Dbt &key, Dbt &data); 38}; 39<p> 40class DbMultipleRecnoDataIterator 41{ 42public: 43 DbMultipleRecnoDataIterator(const Dbt &dbt); 44<p> 45 bool next(db_recno_t &key, Dbt &data); 46}; 47</pre></b> 48<hr size=1 noshade> 49<b>Description: Bulk Retrieval API</b> 50<p>If either of the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> or <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flags 51were specified to the <a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> method, the data 52<a href="../api_cxx/dbt_class.html">Dbt</a> returned by those interfaces will refer to a buffer that 53is filled with data. Access to that data is through the following 54classes.</p> 55<p>All instances of the bulk retrieval classes may be used only once, and 56to traverse the bulk retrieval buffer in the forward direction only. 57However, they are nondestructive, so multiple iterators can be 58instantiated and used on the same returned data <a href="../api_cxx/dbt_class.html">Dbt</a>.</p> 59<hr size=1 noshade> 60<b>Description: DbMultipleIterator</b> 61<p>The <a href="../api_cxx/dbt_bulk_class.html">DbMultipleIterator</a> is a shared package-private base class 62for the three types of bulk-return Iterator; it should never be 63instantiated directly, but it handles the functionality shared by its 64subclasses.</p> 65<hr size=1 noshade> 66<b>Description: DbMultipleDataIterator</b> 67<p>The DbMultipleDataIterator class is used to iterate through data 68returned using the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> flag from a database belonging 69to any access method.</p> 70<p>The constructor takes the data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to 71<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> 72flag.</p> 73<b>Parameters</b> <br> 74 <b>dbt</b><ul compact><li>The <b>dbt</b> parameter is a data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to 75<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> 76flag.</ul> 77<br> 78<hr size=1 noshade> 79<b>Description: DbMultipleDataIterator.next</b> 80<p>The DbMultipleDataIterator.next method takes a <a href="../api_cxx/dbt_class.html">Dbt</a> that will be 81filled in with a reference to a buffer, a size, and an offset that 82together yield the next data item in the original bulk retrieval buffer.</p> 83<p>The DbMultipleDataIterator.next method returns false if no more data are 84available, and true otherwise.</p> 85<b>Parameters</b> <br> 86 <b>data</b><ul compact><li>The <b>data</b> parameter is a <a href="../api_cxx/dbt_class.html">Dbt</a> that will be filled in with 87a reference to a buffer, a size, and an offset that together yield the 88next data item in the original bulk retrieval buffer.</ul> 89<br> 90<hr size=1 noshade> 91<b>Description: DbMultipleKeyDataIterator</b> 92<p>The DbMultipleKeyDataIterator class is used to iterate through 93data returned using the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag from a database 94belonging to the Btree or Hash access methods.</p> 95<p>The constructor takes the data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to 96<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> 97flag.</p> 98<b>Parameters</b> <br> 99 <b>dbt</b><ul compact><li>The <b>dbt</b> parameter is a data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to 100<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> 101flag.</ul> 102<br> 103<hr size=1 noshade> 104<b>Description: DbMultipleKeyDataIterator.next</b> 105<p>The DbMultipleKeyDataIterator.next method takes two <a href="../api_cxx/dbt_class.html">Dbt</a>s, one 106for a key and one for a data item, that will each be filled in with a 107reference to a buffer, a size, and an offset that together yield the 108next key and data item in the original bulk retrieval buffer. The 109DbMultipleKeyDataIterator.next method returns false if no more data are 110available, and true otherwise.</p> 111<p>The DbMultipleKeyDataIterator.next method returns false if no more data 112are available, and true otherwise.</p> 113<b>Parameters</b> <br> 114 <b>key</b><ul compact><li>The <b>key</b> parameter will be filled in with a reference to a buffer, 115a size, and an offset that yields the next key item in the original bulk 116retrieval buffer.</ul> 117 <b>data</b><ul compact><li>The <b>data</b> parameter will be filled in with a reference to a buffer, 118a size, and an offset that yields the next data item in the original bulk 119retrieval buffer.</ul> 120<br> 121<hr size=1 noshade> 122<b>Description: DbMultipleRecnoDataIterator</b> 123<p>This class is used to iterate through data returned using the 124<a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag from a database belonging to the Recno or 125Queue access methods.</p> 126<p>The constructor takes the data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to 127<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> 128flag.</p> 129<b>Parameters</b> <br> 130 <b>dbt</b><ul compact><li>The <b>dbt</b> parameter is a data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to 131<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> 132flag.</ul> 133<br> 134<hr size=1 noshade> 135<b>Description: DbMultipleRecnoDataIterator.next</b> 136The DbMultipleRecnoDataIterator.next method takes a <b>db_recno_t</b> 137for the key and a <a href="../api_cxx/dbt_class.html">Dbt</a> for a data item, which will be filled in 138with a pointer to a buffer and a size. Together they yield the next key 139and data item in the original bulk retrieval buffer. 140<p>The DbMultipleRecnoDataIterator.next method returns false if no more 141data are available, and true otherwise.</p> 142<b>Parameters</b> <br> 143 <b>key</b><ul compact><li>The <b>key</b> parameter will be filled in with a reference to a 144buffer, a size, and an offset that yields the next key item in the 145original bulk retrieval buffer.</ul> 146 <b>data</b><ul compact><li>The <b>data</b> parameter will be filled in with a reference to a 147buffer, a size, and an offset that yields the next data item in the 148original bulk retrieval buffer.</ul> 149<br> 150</tt> 151<table width="100%"><tr><td><br></td><td align=right> 152<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a> 153</td></tr></table> 154<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 155</body> 156</html> 157