• 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::set_flags()</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="seqset_cachesize.html" title="DbSequence::set_cachesize()" />
12    <link rel="next" href="seqset_range.html" title="DbSequence::set_range()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DbSequence::set_flags()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="seqset_cachesize.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="seqset_range.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="seqset_flags"></a>DbSequence::set_flags()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db_cxx.h&gt;
39
40int
41DbSequence::set_flags(u_int32_t flags); </pre>
42      <p>
43         Configure a sequence.  The flags are only effective when creating a
44         sequence.  Calling <code class="methodname">DbSequence::set_flags()</code> is additive; there is no
45         way to clear flags.
46    </p>
47      <p>
48         The <code class="methodname">DbSequence::set_flags()</code> method may not be called after the
49         <a class="xref" href="seqopen.html" title="DbSequence::open()">DbSequence::open()</a> method is called.
50    </p>
51      <p>
52         The <code class="methodname">DbSequence::set_flags()</code> <span>
53            
54            <span>
55                method either returns a non-zero error value or throws an
56                exception that encapsulates a non-zero error value on
57                failure, and returns 0 on success.
58            </span>
59        </span>
60    </p>
61      <div class="sect2" lang="en" xml:lang="en">
62        <div class="titlepage">
63          <div>
64            <div>
65              <h3 class="title"><a id="id1711013"></a>Parameters</h3>
66            </div>
67          </div>
68        </div>
69        <div class="sect3" lang="en" xml:lang="en">
70          <div class="titlepage">
71            <div>
72              <div>
73                <h4 class="title"><a id="id1711094"></a>flags</h4>
74              </div>
75            </div>
76          </div>
77          <p>
78                          The <span class="bold"><strong>flags</strong></span> parameter must be set to 0
79                          or by bitwise inclusively <span class="bold"><strong>OR</strong></span>'ing
80                          together one or more of the following values:
81                     </p>
82          <div class="itemizedlist">
83            <ul type="disc">
84              <li>
85                <p>
86                  <code class="literal">DB_SEQ_DEC</code>
87            </p>
88                <p>
89                Specify that the sequence should be decremented.
90            </p>
91              </li>
92              <li>
93                <p>
94                  <code class="literal">DB_SEQ_INC</code>
95            </p>
96                <p>
97                 Specify that the sequence should be incremented.  This is the default.
98            </p>
99              </li>
100              <li>
101                <p><a id="seqset_flags_DB_SEQ_WRAP"></a>
102                  <code class="literal">DB_SEQ_WRAP</code>
103            </p>
104                <p>
105                 Specify that the sequence should wrap around when it is incremented
106                 (decremented) past the specified maximum (minimum) value.
107            </p>
108              </li>
109            </ul>
110          </div>
111        </div>
112      </div>
113      <div class="sect2" lang="en" xml:lang="en">
114        <div class="titlepage">
115          <div>
116            <div>
117              <h3 class="title"><a id="id1711014"></a>Errors</h3>
118            </div>
119          </div>
120        </div>
121        <p>
122                         The <code class="methodname">DbSequence::set_flags()</code> <span>
123            
124            <span>
125                method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> 
126                exception, encapsulating one of the following non-zero errors, or return one
127                of the following non-zero errors:
128            </span>
129        </span>
130                    </p>
131        <div class="sect3" lang="en" xml:lang="en">
132          <div class="titlepage">
133            <div>
134              <div>
135                <h4 class="title"><a id="id1711420"></a>EINVAL</h4>
136              </div>
137            </div>
138          </div>
139          <p>
140                An invalid flag value or parameter was specified.
141            </p>
142        </div>
143      </div>
144      <div class="sect2" lang="en" xml:lang="en">
145        <div class="titlepage">
146          <div>
147            <div>
148              <h3 class="title"><a id="id1711411"></a>Class</h3>
149            </div>
150          </div>
151        </div>
152        <p>
153                 <a class="link" href="seq.html" title="Chapter 12.  The DbSequence Handle">DbSequence</a>  
154            </p>
155      </div>
156      <div class="sect2" lang="en" xml:lang="en">
157        <div class="titlepage">
158          <div>
159            <div>
160              <h3 class="title"><a id="id1711331"></a>See Also</h3>
161            </div>
162          </div>
163        </div>
164        <p>
165                     <a class="xref" href="seq.html#seqlist" title="Sequences and Related Methods">Sequences and Related Methods</a> 
166                </p>
167      </div>
168    </div>
169    <div class="navfooter">
170      <hr />
171      <table width="100%" summary="Navigation footer">
172        <tr>
173          <td width="40%" align="left"><a accesskey="p" href="seqset_cachesize.html">Prev</a> </td>
174          <td width="20%" align="center">
175            <a accesskey="u" href="seq.html">Up</a>
176          </td>
177          <td width="40%" align="right"> <a accesskey="n" href="seqset_range.html">Next</a></td>
178        </tr>
179        <tr>
180          <td width="40%" align="left" valign="top">DbSequence::set_cachesize() </td>
181          <td width="20%" align="center">
182            <a accesskey="h" href="index.html">Home</a>
183          </td>
184          <td width="40%" align="right" valign="top"> DbSequence::set_range()</td>
185        </tr>
186      </table>
187    </div>
188  </body>
189</html>
190