77 lines
3.3 KiB
HTML
77 lines
3.3 KiB
HTML
<!--$Id: seq_class.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
|
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
|
<!--See the file LICENSE for redistribution information.-->
|
|
<html>
|
|
<head>
|
|
<title>Berkeley DB: db_sequence_create</title>
|
|
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
|
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
|
</head>
|
|
<body bgcolor=white>
|
|
<table width="100%"><tr valign=top>
|
|
<td>
|
|
<b>db_sequence_create</b>
|
|
</td>
|
|
<td align=right>
|
|
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
|
|
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
|
|
</tr></table>
|
|
<hr size=1 noshade>
|
|
<tt>
|
|
<b><pre>
|
|
#include <db.h>
|
|
<p>
|
|
typedef struct __db_sequence DB_SEQUENCE;
|
|
<p>
|
|
int
|
|
db_sequence_create(DB_SEQUENCE **seq, DB *db, u_int32_t flags);
|
|
</pre></b>
|
|
<hr size=1 noshade>
|
|
<b>Description: db_sequence_create</b>
|
|
<p>The DB_SEQUENCE handle is the handle used to manipulate a
|
|
sequence object. A sequence object is stored in a record in a
|
|
database.</p>
|
|
<p>DB_SEQUENCE handles are free-threaded if the <a href="../api_c/env_open.html#DB_THREAD">DB_THREAD</a>
|
|
flag is specified to the <a href="../api_c/seq_open.html">DB_SEQUENCE->open</a> method when the sequence is opened.
|
|
Once the <a href="../api_c/seq_close.html">DB_SEQUENCE->close</a> or <a href="../api_c/seq_remove.html">DB_SEQUENCE->remove</a> methods are called, the
|
|
handle may not be accessed again, regardless of the method's return.</p>
|
|
<p>Each handle opened on a sequence may maintain a separate cache of values
|
|
which are returned to the application using the <a href="../api_c/seq_get.html">DB_SEQUENCE->get</a> method
|
|
either singly or in groups depending on its <b>delta</b> parameter.</p>
|
|
<p>The
|
|
DB_SEQUENCE method creates a
|
|
DB_SEQUENCE object that serves as the handle for a sequence.
|
|
Calling the <a href="../api_c/seq_close.html">DB_SEQUENCE->close</a> or <a href="../api_c/seq_remove.html">DB_SEQUENCE->remove</a> methods will discard the
|
|
handle.</p>
|
|
<p>The db_sequence_create method
|
|
returns a non-zero error value on failure
|
|
and 0 on success.
|
|
</p>
|
|
<b>Parameters</b> <br>
|
|
<b>seq</b><ul compact><li>The <b>seq</b> parameter references the memory into which the returned
|
|
structure pointer is stored.</ul>
|
|
<b>db</b><ul compact><li>The <b>db</b> parameter is an open database handle which holds the
|
|
persistent data for the sequence. The database may be of any type,
|
|
but may not have been configured to support duplicate data items.</ul>
|
|
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
|
|
<br>
|
|
<br><b>Errors</b>
|
|
<p>The db_sequence_create method
|
|
may fail and return one of the following non-zero errors:</p>
|
|
<br>
|
|
<b>EINVAL</b><ul compact><li>An
|
|
invalid flag value or parameter was specified.</ul>
|
|
<br>
|
|
<hr size=1 noshade>
|
|
<br><b>Class</b>
|
|
DB_SEQUENCE
|
|
<br><b>See Also</b>
|
|
<a href="../api_c/seq_list.html">Sequences and Related Methods</a>
|
|
</tt>
|
|
<table width="100%"><tr><td><br></td><td align=right>
|
|
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
|
|
</td></tr></table>
|
|
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
|
</body>
|
|
</html>
|