2
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB: DBT</title>
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
12
<a name="2"><!--meow--></a>
13
<table width="100%"><tr valign=top>
15
<h1>DBT: Bulk Retrieval</h1>
18
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
22
<a name="3"><!--meow--></a>
23
<p>If either of the <a href="../api_c/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> or <a href="../api_c/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flags
24
were specified to the <a href="../api_c/db_get.html">DB->get</a> or <a href="../api_c/dbc_get.html">DBcursor->c_get</a> methods, the data
25
<a href="../api_c/dbt_class.html">DBT</a> returned by those interfaces will refer to a buffer that
26
is filled with data. Access to that data is through the following
29
<p><dt><a name="DB_MULTIPLE_INIT">DB_MULTIPLE_INIT</a><dd><pre>DB_MULTIPLE_INIT(void *pointer, <a href="../api_c/dbt_class.html">DBT</a> *data);</pre>
30
<p>Initialize the retrieval. The <b>pointer</b> argument is a variable
31
to be initialized. The <b>data</b> argument is a <a href="../api_c/dbt_class.html">DBT</a> structure
32
returned from a successful call to <a href="../api_c/db_get.html">DB->get</a> or <a href="../api_c/dbc_get.html">DBcursor->c_get</a>
33
for which one of the <a href="../api_c/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> or <a href="../api_c/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a>
35
<p><dt><a name="DB_MULTIPLE_NEXT">DB_MULTIPLE_NEXT</a><dd><pre>DB_MULTIPLE_NEXT(void *pointer, <a href="../api_c/dbt_class.html">DBT</a> *data, void *retdata, size_t retdlen);</pre>
36
<p>The <b>data</b> argument is a <a href="../api_c/dbt_class.html">DBT</a> structure returned from a
37
successful call to <a href="../api_c/db_get.html">DB->get</a> or <a href="../api_c/dbc_get.html">DBcursor->c_get</a> for which the
38
<a href="../api_c/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> flag was specified. The <b>pointer</b> and
39
<b>data</b> arguments must have been previously initialized by a call
40
to DB_MULTIPLE_INIT. The <b>retdata</b> argument is set to
41
refer to the next data element in the returned set, and the
42
<b>retdlen</b> argument is set to the length, in bytes, of that data
43
element. When used with the Queue and Recno access methods,
44
<b>retdata</b> will be set to NULL for deleted records. The
45
<b>pointer</b> argument is set to NULL if there are no more data
46
elements in the returned set.
47
<p><dt><a name="DB_MULTIPLE_KEY_NEXT">DB_MULTIPLE_KEY_NEXT</a><dd><pre>DB_MULTIPLE_KEY_NEXT(void *pointer, <a href="../api_c/dbt_class.html">DBT</a> *data,
48
void *retkey, size_t retklen, void *retdata, size_t retdlen);</pre>
49
<p>The <b>data</b> argument is a <a href="../api_c/dbt_class.html">DBT</a> structure returned from a
50
successful call to <a href="../api_c/db_get.html">DB->get</a> or <a href="../api_c/dbc_get.html">DBcursor->c_get</a> for which the
51
<a href="../api_c/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag was specified. The <b>pointer</b> and
52
<b>data</b> arguments must have been previously initialized by a call
53
to DB_MULTIPLE_INIT. The <b>retkey</b> argument is set to
54
refer to the next key element in the returned set, and the
55
<b>retklen</b> argument is set to the length, in bytes, of that key
56
element. The <b>retdata</b> argument is set to refer to the next data
57
element in the returned set, and the <b>retdlen</b> argument is set to
58
the length, in bytes, of that data element. The <b>pointer</b>
59
argument is set to NULL if there are no more key/data pairs in the
61
<p><dt><a name="DB_MULTIPLE_RECNO_NEXT">DB_MULTIPLE_RECNO_NEXT</a><dd><pre>DB_MULTIPLE_RECNO_NEXT(void *pointer, <a href="../api_c/dbt_class.html">DBT</a> *data,
62
db_recno_t recno, void * retdata, size_t retdlen);</pre>
63
<p>The <b>data</b> argument is a <a href="../api_c/dbt_class.html">DBT</a> structure returned from a
64
successful call to <a href="../api_c/db_get.html">DB->get</a> or <a href="../api_c/dbc_get.html">DBcursor->c_get</a> for which the
65
<a href="../api_c/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag was specified. The <b>pointer</b> and
66
<b>data</b> arguments must have been previously initialized by a call
67
to DB_MULTIPLE_INIT. The <b>recno</b> argument is set to the
68
record number of the next record in the returned set. The
69
<b>retdata</b> argument is set to refer to the next data element in
70
the returned set, and the <b>retdlen</b> argument is set to the length,
71
in bytes, of that data element. When used with the Queue and Recno
72
access methods, <b>retdata</b> will be set to NULL for deleted
73
records. The <b>pointer</b> argument is set to NULL if there are
74
no more key/data pairs in the returned set.
77
<table width="100%"><tr><td><br></td><td align=right>
78
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
80
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>