1<!--$Id: seq_class.so,v 1.12 2004/10/18 19:46:31 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: DbSequence</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>DbSequence</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 &lt;db_cxx.h&gt;
23<p>
24class DbSequence {
25public:
26	DbSequence(Db *db, u_int32_t flags);
27	~DbSequence();
28<p>
29	DB_SEQUENCE *DbSequence::get_DB();
30	const DB *DbSequence::get_const_DB() const;
31	static DbSequence *DbSequence::get_DbSequence(DB *db);
32	static const DbSequence *DbSequence::get_const_DbSequence(const DB *db);
33	...
34};
35</pre></b>
36<hr size=1 noshade>
37<b>Description: DbSequence</b>
38<p>The DbSequence handle is the handle used to manipulate a
39sequence object.  A sequence object is stored in a record in a
40database.</p>
41<p>DbSequence handles are free-threaded if the <a href="../api_cxx/env_open.html#DB_THREAD">DB_THREAD</a>
42flag is specified to the <a href="../api_cxx/seq_open.html">DbSequence::open</a> method when the sequence is opened.
43Once the <a href="../api_cxx/seq_close.html">DbSequence::close</a> or <a href="../api_cxx/seq_remove.html">DbSequence::remove</a> methods are called, the
44handle may not be accessed again, regardless of the method's return.</p>
45<p>Each handle opened on a sequence may maintain a separate cache of values
46which are returned to the application using the <a href="../api_cxx/seq_get.html">DbSequence::get</a> method
47either singly or in groups depending on its <b>delta</b> parameter.</p>
48<p>The
49constructor creates a
50DbSequence object that serves as the handle for a sequence.
51Calling the <a href="../api_cxx/seq_close.html">DbSequence::close</a> or <a href="../api_cxx/seq_remove.html">DbSequence::remove</a> methods will discard the
52handle.</p>
53<b>Parameters</b> <br>
54 <b>db</b><ul compact><li>The <b>db</b> parameter is an open database handle which holds the
55persistent data for the sequence.  The database may be of any type,
56but may not have been configured to support duplicate data items.</ul>
57 <b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
58<br>
59<hr size=1 noshade>
60<br><b>Class</b>
61DbSequence
62<br><b>See Also</b>
63<a href="../api_cxx/seq_list.html">Sequences and Related Methods</a>
64</tt>
65<table width="100%"><tr><td><br></td><td align=right>
66<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>
67</td></tr></table>
68<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
69</body>
70</html>
71