• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/docs/api_reference/CXX/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>DbSequence</title>
7    <link rel="stylesheet" href="apiReference.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
10    <link rel="up" href="seq.html" title="Chapter 12.  The DbSequence Handle" />
11    <link rel="prev" href="seq.html" title="Chapter 12.  The DbSequence Handle" />
12    <link rel="next" href="seqclose.html" title="DbSequence::close()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DbSequence</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="seq.html">Prev</a> </td>
22          <th width="60%" align="center">Chapter 12. 
23                The DbSequence Handle 
24        </th>
25          <td width="20%" align="right"> <a accesskey="n" href="seqclose.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="seqcreate"></a>DbSequence</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db_cxx.h&gt;
39
40class DbSequence { 
41public: 
42        DbSequence(Db *db, u_int32_t flags);
43        ~DbSequence();
44
45        DB_SEQUENCE *DbSequence::get_DB(); 
46        const DB *DbSequence::get_const_DB() const; 
47        static DbSequence *DbSequence::get_DbSequence(DB *db); 
48        static const DbSequence *DbSequence::get_const_DbSequence(const DB *db); 
49        ... 
50}; </pre>
51      <p>
52        The <code class="classname">DbSequence</code> handle is the handle used to manipulate a sequence
53        object. A sequence object is stored in a record in a database.
54    </p>
55      <p>
56            
57        <code class="classname">DbSequence</code> handles are free-threaded if the 
58        <a class="link" href="seqopen.html#seqopen_DB_THREAD">DB_THREAD</a>
59        flag is specified to the
60        <a class="xref" href="seqopen.html" title="DbSequence::open()">DbSequence::open()</a>
61        method when the sequence is opened. Once the 
62        <a class="xref" href="seqclose.html" title="DbSequence::close()">DbSequence::close()</a> or
63        <a class="xref" href="seqremove.html" title="DbSequence::remove()">DbSequence::remove()</a>
64        methods are called, the handle can not be accessed again, regardless
65        of the method's return.
66    </p>
67      <p>
68            Each handle opened on a sequence may maintain a separate cache of values which are
69            returned to the application using the <a class="xref" href="seqget.html" title="DbSequence::get()">DbSequence::get()</a>
70            method either singly or in groups
71            depending on its <span class="bold"><strong>delta</strong></span> parameter.
72    </p>
73      <p>
74            Calling the  <a class="xref" href="seqclose.html" title="DbSequence::close()">DbSequence::close()</a>
75            or <a class="xref" href="seqremove.html" title="DbSequence::remove()">DbSequence::remove()</a>
76            methods discards this handle.
77    </p>
78      <div class="sect2" lang="en" xml:lang="en">
79        <div class="titlepage">
80          <div>
81            <div>
82              <h3 class="title"><a id="id1708960"></a>Parameters</h3>
83            </div>
84          </div>
85        </div>
86        <div class="sect3" lang="en" xml:lang="en">
87          <div class="titlepage">
88            <div>
89              <div>
90                <h4 class="title"><a id="id1709021"></a>db</h4>
91              </div>
92            </div>
93          </div>
94          <p>
95                             The <span class="bold"><strong>db</strong></span> parameter is an open database
96                             handle which holds the persistent data for the sequence. The database
97                             may be of any type, but must not have been configured to support
98                             duplicate data items.
99                     </p>
100        </div>
101        <div class="sect3" lang="en" xml:lang="en">
102          <div class="titlepage">
103            <div>
104              <div>
105                <h4 class="title"><a id="id1709131"></a>flags</h4>
106              </div>
107            </div>
108          </div>
109          <p>
110                             The <span class="bold"><strong>flags</strong></span> parameter is 
111                             currently unused, and must be set to 0.
112                     </p>
113        </div>
114      </div>
115      <div class="sect2" lang="en" xml:lang="en">
116        <div class="titlepage">
117          <div>
118            <div>
119              <h3 class="title"><a id="id1709317"></a>Errors</h3>
120            </div>
121          </div>
122        </div>
123        <p>
124                         The <code class="methodname">db_sequence_create</code> <span>
125            
126            <span>
127                method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> 
128                exception, encapsulating one of the following non-zero errors, or return one
129                of the following non-zero errors:
130            </span>
131        </span>
132                    </p>
133        <div class="sect3" lang="en" xml:lang="en">
134          <div class="titlepage">
135            <div>
136              <div>
137                <h4 class="title"><a id="id1708772"></a>EINVAL</h4>
138              </div>
139            </div>
140          </div>
141          <p>
142                An invalid flag value or parameter was specified.
143            </p>
144        </div>
145      </div>
146      <div class="sect2" lang="en" xml:lang="en">
147        <div class="titlepage">
148          <div>
149            <div>
150              <h3 class="title"><a id="id1709262"></a>Class</h3>
151            </div>
152          </div>
153        </div>
154        <p>
155                 <a class="link" href="seq.html" title="Chapter 12.  The DbSequence Handle">DbSequence</a>  
156            </p>
157      </div>
158      <div class="sect2" lang="en" xml:lang="en">
159        <div class="titlepage">
160          <div>
161            <div>
162              <h3 class="title"><a id="id1709164"></a>See Also</h3>
163            </div>
164          </div>
165        </div>
166        <p>
167                     <a class="xref" href="seq.html#seqlist" title="Sequences and Related Methods">Sequences and Related Methods</a> 
168                </p>
169      </div>
170    </div>
171    <div class="navfooter">
172      <hr />
173      <table width="100%" summary="Navigation footer">
174        <tr>
175          <td width="40%" align="left"><a accesskey="p" href="seq.html">Prev</a> </td>
176          <td width="20%" align="center">
177            <a accesskey="u" href="seq.html">Up</a>
178          </td>
179          <td width="40%" align="right"> <a accesskey="n" href="seqclose.html">Next</a></td>
180        </tr>
181        <tr>
182          <td width="40%" align="left" valign="top">Chapter 12. 
183                The DbSequence Handle 
184         </td>
185          <td width="20%" align="center">
186            <a accesskey="h" href="index.html">Home</a>
187          </td>
188          <td width="40%" align="right" valign="top"> DbSequence::close()</td>
189        </tr>
190      </table>
191    </div>
192  </body>
193</html>
194