1<!--$Id: seq_set_range.so,v 1.6 2004/09/07 15:37:41 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::set_range</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::set_range</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>
24int
25DbSequence::set_range(db_seq_t min, db_seq_t max);
26<p>
27int DbSequence::get_range(u_int32_t, db_seq_t *minp, db_seq_t *maxp);
28</pre></b>
29<hr size=1 noshade>
30<b>Description: DbSequence::set_range</b>
31<p>Configure a sequence range.  This call is only effective when the
32sequence is being created.  The range is limited to a signed 64 bit
33integer.</p>
34<p>The DbSequence::set_range method may not be called after the
35<a href="/api_cxx/seq_open.html">DbSequence::open</a> method is called.</p>
36<p>The DbSequence::set_range method
37either returns a non-zero error value
38or throws an exception that encapsulates a non-zero error value on
39failure, and returns 0 on success.
40</p>
41<b>Parameters</b> <br>
42 <b>min</b><ul compact><li>Specifies the minimum value for the sequence.</ul>
43 <b>max</b><ul compact><li>Specifies the maximum value for the sequence.</ul>
44<br>
45<br><b>Errors</b>
46<p>The DbSequence::set_range method
47may fail and throw
48<a href="/api_cxx/except_class.html">DbException</a>,
49encapsulating one of the following non-zero errors, or return one of
50the following non-zero errors:</p>
51<br>
52<b>EINVAL</b><ul compact><li>An
53invalid flag value or parameter was specified.</ul>
54<br>
55<hr size=1 noshade>
56<b>Description: DbSequence::get_range</b>
57<p>The DbSequence::get_range method returns the range of values in the sequence.</p>
58<p>The DbSequence::get_range method may be called at any time during the life of the
59application.</p>
60<p>The DbSequence::get_range method
61either returns a non-zero error value
62or throws an exception that encapsulates a non-zero error value on
63failure, and returns 0 on success.
64</p>
65<b>Parameters</b> <br>
66 <b>minp</b><ul compact><li>The DbSequence::get_range method returns the minimum value in <b>minp</b>.</ul>
67 <b>maxp</b><ul compact><li>The DbSequence::get_range method returns the maximum value in <b>maxp</b>.</ul>
68<br>
69<hr size=1 noshade>
70<br><b>Class</b>
71<a href="/api_cxx/seq_class.html">DbSequence</a>
72<br><b>See Also</b>
73<a href="/api_cxx/seq_list.html">Sequences and Related Methods</a>
74</tt>
75<table width="100%"><tr><td><br></td><td align=right>
76<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>
77</td></tr></table>
78<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
79</body>
80</html>
81