| 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>Chapter 12. The DbSequence Handle</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="index.html" title="Berkeley DB C++ API Reference" /> |
| 11 | <link rel="prev" href="txnset_commit_token.html" title="DbTxn::set_commit_token()" /> |
| 12 | <link rel="next" href="seqcreate.html" title="DbSequence" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Chapter 12. |
| 22 | The DbSequence Handle |
| 23 | </th> |
| 24 | </tr> |
| 25 | <tr> |
| 26 | <td width="20%" align="left"><a accesskey="p" href="txnset_commit_token.html">Prev</a> </td> |
| 27 | <th width="60%" align="center"> </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="seqcreate.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="chapter" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title"><a id="seq"></a>Chapter 12. |
| 38 | The DbSequence Handle |
| 39 | </h2> |
| 40 | </div> |
| 41 | </div> |
| 42 | </div> |
| 43 | <p> |
| 44 | Sequences provide an arbitrary number of persistent objects that return an |
| 45 | increasing or decreasing sequence of integers. Opening a sequence handle associates |
| 46 | it with a record in a database. The handle can maintain a cache of values from the |
| 47 | database so that a database update is not needed as the application allocates a |
| 48 | value. |
| 49 | </p> |
| 50 | <p> |
| 51 | A sequence is stored as a record pair in a database. The database may be of any |
| 52 | type, but must not have been configured to support duplicate data items. The sequence |
| 53 | is referenced by the key used when the sequence is created, therefore the key must |
| 54 | be compatible with the underlying access method. If the database stores fixed-length |
| 55 | records, the record size must be at least 64 bytes long. |
| 56 | </p> |
| 57 | <p> |
| 58 | You create a sequence using the |
| 59 | <a class="xref" href="seqcreate.html" title="DbSequence">DbSequence</a> method. |
| 60 | </p> |
| 61 | <p> |
| 62 | For more information on sequences, see the |
| 63 | <em class="citetitle">Berkeley DB Programmer's Reference Guide</em> guide. |
| 64 | </p> |
| 65 | <div class="sect1" lang="en" xml:lang="en"> |
| 66 | <div class="titlepage"> |
| 67 | <div> |
| 68 | <div> |
| 69 | <h2 class="title" style="clear: both"><a id="seqlist"></a>Sequences and Related Methods</h2> |
| 70 | </div> |
| 71 | </div> |
| 72 | </div> |
| 73 | <div class="navtable"> |
| 74 | <table border="1" width="80%"> |
| 75 | <thead> |
| 76 | <tr> |
| 77 | <th>Sequences and Related Methods</th> |
| 78 | <th>Description</th> |
| 79 | </tr> |
| 80 | </thead> |
| 81 | <tbody> |
| 82 | <tr> |
| 83 | <td> |
| 84 | <a class="xref" href="seqcreate.html" title="DbSequence">DbSequence</a> |
| 85 | </td> |
| 86 | <td>Create a sequence handle</td> |
| 87 | </tr> |
| 88 | <tr> |
| 89 | <td> |
| 90 | <a class="xref" href="seqclose.html" title="DbSequence::close()">DbSequence::close()</a> |
| 91 | </td> |
| 92 | <td>Close a sequence</td> |
| 93 | </tr> |
| 94 | <tr> |
| 95 | <td> |
| 96 | <a class="xref" href="seqget.html" title="DbSequence::get()">DbSequence::get()</a> |
| 97 | </td> |
| 98 | <td>Get the next sequence element(s)</td> |
| 99 | </tr> |
| 100 | <tr> |
| 101 | <td> |
| 102 | <a class="xref" href="seqget_dbp.html" title="DbSequence::get_dbp()">DbSequence::get_dbp()</a> |
| 103 | </td> |
| 104 | <td>Return a handle for the underlying sequence database</td> |
| 105 | </tr> |
| 106 | <tr> |
| 107 | <td> |
| 108 | <a class="xref" href="seqget_key.html" title="DbSequence::get_key()">DbSequence::get_key()</a> |
| 109 | </td> |
| 110 | <td>Return the key for a sequence</td> |
| 111 | </tr> |
| 112 | <tr> |
| 113 | <td> |
| 114 | <a class="xref" href="seqinitial_value.html" title="DbSequence::initial_value()">DbSequence::initial_value()</a> |
| 115 | </td> |
| 116 | <td>Set the initial value of a sequence</td> |
| 117 | </tr> |
| 118 | <tr> |
| 119 | <td> |
| 120 | <a class="xref" href="seqopen.html" title="DbSequence::open()">DbSequence::open()</a> |
| 121 | </td> |
| 122 | <td>Open a sequence</td> |
| 123 | </tr> |
| 124 | <tr> |
| 125 | <td> |
| 126 | <a class="xref" href="seqremove.html" title="DbSequence::remove()">DbSequence::remove()</a> |
| 127 | </td> |
| 128 | <td>Remove a sequence</td> |
| 129 | </tr> |
| 130 | <tr> |
| 131 | <td> |
| 132 | <a class="xref" href="seqstat.html" title="DbSequence::stat()">DbSequence::stat()</a> |
| 133 | </td> |
| 134 | <td>Return sequence statistics</td> |
| 135 | </tr> |
| 136 | <tr> |
| 137 | <td> |
| 138 | <a class="xref" href="seqstat_print.html" title="DbSequence::stat_print()">DbSequence::stat_print()</a> |
| 139 | </td> |
| 140 | <td>Print sequence statistics</td> |
| 141 | </tr> |
| 142 | <tr> |
| 143 | <td colspan="2"> |
| 144 | <span class="bold"> |
| 145 | <strong>Sequences Configuration</strong> |
| 146 | </span> |
| 147 | </td> |
| 148 | </tr> |
| 149 | <tr> |
| 150 | <td><a class="xref" href="seqset_cachesize.html" title="DbSequence::set_cachesize()">DbSequence::set_cachesize()</a>, <a class="xref" href="seqget_cachesize.html" title="DbSequence::get_cachesize()">DbSequence::get_cachesize()</a></td> |
| 151 | <td>Set/get the cache size of a sequence</td> |
| 152 | </tr> |
| 153 | <tr> |
| 154 | <td><a class="xref" href="seqset_flags.html" title="DbSequence::set_flags()">DbSequence::set_flags()</a>, <a class="xref" href="seqget_flags.html" title="DbSequence::get_flags()">DbSequence::get_flags()</a></td> |
| 155 | <td>Set/get the flags for a sequence</td> |
| 156 | </tr> |
| 157 | <tr> |
| 158 | <td><a class="xref" href="seqset_range.html" title="DbSequence::set_range()">DbSequence::set_range()</a>, <a class="xref" href="seqget_range.html" title="DbSequence::get_range()">DbSequence::get_range()</a></td> |
| 159 | <td>Set/get the range for a sequence</td> |
| 160 | </tr> |
| 161 | </tbody> |
| 162 | </table> |
| 163 | </div> |
| 164 | </div> |
| 165 | </div> |
| 166 | <div class="navfooter"> |
| 167 | <hr /> |
| 168 | <table width="100%" summary="Navigation footer"> |
| 169 | <tr> |
| 170 | <td width="40%" align="left"><a accesskey="p" href="txnset_commit_token.html">Prev</a> </td> |
| 171 | <td width="20%" align="center"> </td> |
| 172 | <td width="40%" align="right"> <a accesskey="n" href="seqcreate.html">Next</a></td> |
| 173 | </tr> |
| 174 | <tr> |
| 175 | <td width="40%" align="left" valign="top">DbTxn::set_commit_token() </td> |
| 176 | <td width="20%" align="center"> |
| 177 | <a accesskey="h" href="index.html">Home</a> |
| 178 | </td> |
| 179 | <td width="40%" align="right" valign="top"> DbSequence</td> |
| 180 | </tr> |
| 181 | </table> |
| 182 | </div> |
| 183 | </body> |
| 184 | </html> |