dbt_bulk.html   [plain text]


<!--$Id: dbt_bulk.html,v 1.1.1.1 2003/02/15 04:55:48 zarzycki Exp $-->
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBT</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td>
<h1>DBT: Bulk Retrieval</h1>
</td>
<td align=right>
<a href="../api_cxx/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<hr size=1 noshade>
<tt>
<a name="3"><!--meow--></a>
<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
were specified to the <a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> methods, the data
<a href="../api_cxx/dbt_class.html">Dbt</a> returned by those interfaces will refer to a buffer that
is filled with data.  Access to that data is through the following
macros:
<p><dl compact>
<p><dt><a name="DB_MULTIPLE_INIT">DB_MULTIPLE_INIT</a><dd><pre>DB_MULTIPLE_INIT(void *pointer, <a href="../api_cxx/dbt_class.html">Dbt</a> *data);</pre>
<p>Initialize the retrieval.  The <b>pointer</b> argument is a variable
to be initialized.  The <b>data</b> argument is a <a href="../api_cxx/dbt_class.html">Dbt</a> structure
returned from a successful call to <a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a>
for which one 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 was specified.
<p><dt><a name="DB_MULTIPLE_NEXT">DB_MULTIPLE_NEXT</a><dd><pre>DB_MULTIPLE_NEXT(void *pointer, <a href="../api_cxx/dbt_class.html">Dbt</a> *data, void *retdata, size_t retdlen);</pre>
<p>The <b>data</b> argument is a <a href="../api_cxx/dbt_class.html">Dbt</a> structure returned from a
successful call to <a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> for which the
<a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> flag was specified.  The <b>pointer</b> and
<b>data</b> arguments must have been previously initialized by a call
to DB_MULTIPLE_INIT.  The <b>retdata</b> argument is set to
refer to the next data element in the returned set, and the
<b>retdlen</b> argument is set to the length, in bytes, of that data
element.  When used with the Queue and Recno access methods,
<b>retdata</b> will be set to NULL for deleted records.  The
<b>pointer</b> argument is set to NULL if there are no more data
elements in the returned set.
<p><dt><a name="DB_MULTIPLE_KEY_NEXT">DB_MULTIPLE_KEY_NEXT</a><dd><pre>DB_MULTIPLE_KEY_NEXT(void *pointer, <a href="../api_cxx/dbt_class.html">Dbt</a> *data,
	void *retkey, size_t retklen, void *retdata, size_t retdlen);</pre>
<p>The <b>data</b> argument is a <a href="../api_cxx/dbt_class.html">Dbt</a> structure returned from a
successful call to <a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> for which the
<a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag was specified.  The <b>pointer</b> and
<b>data</b> arguments must have been previously initialized by a call
to DB_MULTIPLE_INIT.  The <b>retkey</b> argument is set to
refer to the next key element in the returned set, and the
<b>retklen</b> argument is set to the length, in bytes, of that key
element.  The <b>retdata</b> argument is set to refer to the next data
element in the returned set, and the <b>retdlen</b> argument is set to
the length, in bytes, of that data element.  The <b>pointer</b>
argument is set to NULL if there are no more key/data pairs in the
returned set.
<p><dt><a name="DB_MULTIPLE_RECNO_NEXT">DB_MULTIPLE_RECNO_NEXT</a><dd><pre>DB_MULTIPLE_RECNO_NEXT(void *pointer, <a href="../api_cxx/dbt_class.html">Dbt</a> *data,
	db_recno_t recno, void * retdata, size_t retdlen);</pre>
<p>The <b>data</b> argument is a <a href="../api_cxx/dbt_class.html">Dbt</a> structure returned from a
successful call to <a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> for which the
<a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag was specified.  The <b>pointer</b> and
<b>data</b> arguments must have been previously initialized by a call
to DB_MULTIPLE_INIT.  The <b>recno</b> argument is set to the
record number of the next record in the returned set.  The
<b>retdata</b> argument is set to refer to the next data element in
the returned set, and the <b>retdlen</b> argument is set to the length,
in bytes, of that data element.  When used with the Queue and Recno
access methods, <b>retdata</b> will be set to NULL for deleted
records.  The <b>pointer</b> argument is set to NULL if there are
no more key/data pairs in the returned set.
</dl>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_cxx/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
</body>
</html>