| 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>DB_SEQUENCE->remove()</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 11. The DB_SEQUENCE Handle" /> |
| 11 | <link rel="prev" href="seqopen.html" title="DB_SEQUENCE->open()" /> |
| 12 | <link rel="next" href="seqset_cachesize.html" title="DB_SEQUENCE->set_cachesize()" /> |
| 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">DB_SEQUENCE->remove()</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="seqopen.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 11. |
| 26 | The DB_SEQUENCE Handle |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="seqset_cachesize.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="seqremove"></a>DB_SEQUENCE->remove()</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db.h> |
| 42 | |
| 43 | int |
| 44 | DB_SEQUENCE->remove(DB_SEQUENCE *seq, DB_TXN *txnid, u_int32_t flags); </pre> |
| 45 | <p> |
| 46 | The <code class="methodname">DB_SEQUENCE->remove()</code> method removes the sequence from the |
| 47 | database. This method should not be called if there are other open |
| 48 | handles on this sequence. |
| 49 | </p> |
| 50 | <p> |
| 51 | The <a class="link" href="seq.html" title="Chapter 11. The DB_SEQUENCE Handle">DB_SEQUENCE</a> handle |
| 52 | may not be accessed again after <code class="methodname">DB_SEQUENCE->remove()</code> is called, |
| 53 | regardless of its return. |
| 54 | </p> |
| 55 | <p> |
| 56 | The <code class="methodname">DB_SEQUENCE->remove()</code> <span> |
| 57 | <span> |
| 58 | method returns a non-zero error value on failure and 0 on success. |
| 59 | </span> |
| 60 | |
| 61 | </span> |
| 62 | </p> |
| 63 | <div class="sect2" lang="en" xml:lang="en"> |
| 64 | <div class="titlepage"> |
| 65 | <div> |
| 66 | <div> |
| 67 | <h3 class="title"><a id="idp54650448"></a>Parameters</h3> |
| 68 | </div> |
| 69 | </div> |
| 70 | </div> |
| 71 | <div class="sect3" lang="en" xml:lang="en"> |
| 72 | <div class="titlepage"> |
| 73 | <div> |
| 74 | <div> |
| 75 | <h4 class="title"><a id="idp54662168"></a>txnid</h4> |
| 76 | </div> |
| 77 | </div> |
| 78 | </div> |
| 79 | <p> |
| 80 | If the operation is part of an application-specified transaction, the |
| 81 | <span class="bold"><strong>txnid</strong></span> parameter is a transaction |
| 82 | handle returned from <a class="xref" href="txnbegin.html" title="DB_ENV->txn_begin()">DB_ENV->txn_begin()</a>; if the |
| 83 | operation is part of a Berkeley DB Concurrent Data Store group, the |
| 84 | <span class="bold"><strong>txnid</strong></span> parameter is a handle returned |
| 85 | from <a class="xref" href="envcdsgroup_begin.html" title="DB_ENV->cdsgroup_begin()">DB_ENV->cdsgroup_begin()</a>; |
| 86 | otherwise NULL. If no transaction handle is specified, but the |
| 87 | operation occurs in a transactional database, the operation will be |
| 88 | implicitly transaction protected. |
| 89 | </p> |
| 90 | </div> |
| 91 | <div class="sect3" lang="en" xml:lang="en"> |
| 92 | <div class="titlepage"> |
| 93 | <div> |
| 94 | <div> |
| 95 | <h4 class="title"><a id="idp54620896"></a>flags</h4> |
| 96 | </div> |
| 97 | </div> |
| 98 | </div> |
| 99 | <p> |
| 100 | The <span class="bold"><strong>flags</strong></span> parameter must be set to 0 |
| 101 | or by bitwise inclusively <span class="bold"><strong>OR</strong></span>'ing |
| 102 | together one or more of the following values: |
| 103 | </p> |
| 104 | <div class="itemizedlist"> |
| 105 | <ul type="disc"> |
| 106 | <li> |
| 107 | <p> |
| 108 | <code class="literal">DB_TXN_NOSYNC</code> |
| 109 | </p> |
| 110 | <p> |
| 111 | If the operation is implicitly transaction protected (the <span class="bold"><strong>txnid</strong></span> argument is NULL but the operation occurs |
| 112 | to a transactional database), do not synchronously flush the log when |
| 113 | the transaction commits. |
| 114 | </p> |
| 115 | </li> |
| 116 | </ul> |
| 117 | </div> |
| 118 | </div> |
| 119 | </div> |
| 120 | <div class="sect2" lang="en" xml:lang="en"> |
| 121 | <div class="titlepage"> |
| 122 | <div> |
| 123 | <div> |
| 124 | <h3 class="title"><a id="idp54668432"></a>Errors</h3> |
| 125 | </div> |
| 126 | </div> |
| 127 | </div> |
| 128 | <p> |
| 129 | The <code class="methodname">DB_SEQUENCE->remove()</code> <span> |
| 130 | <span> |
| 131 | method may fail and return one of the following non-zero errors: |
| 132 | </span> |
| 133 | |
| 134 | </span> |
| 135 | </p> |
| 136 | <div class="sect3" lang="en" xml:lang="en"> |
| 137 | <div class="titlepage"> |
| 138 | <div> |
| 139 | <div> |
| 140 | <h4 class="title"><a id="idp54666984"></a>EINVAL</h4> |
| 141 | </div> |
| 142 | </div> |
| 143 | </div> |
| 144 | <p> |
| 145 | An invalid flag value or parameter was specified. |
| 146 | </p> |
| 147 | </div> |
| 148 | </div> |
| 149 | <div class="sect2" lang="en" xml:lang="en"> |
| 150 | <div class="titlepage"> |
| 151 | <div> |
| 152 | <div> |
| 153 | <h3 class="title"><a id="idp54673664"></a>Class</h3> |
| 154 | </div> |
| 155 | </div> |
| 156 | </div> |
| 157 | <p> |
| 158 | <a class="link" href="seq.html" title="Chapter 11. The DB_SEQUENCE Handle">DB_SEQUENCE</a> |
| 159 | </p> |
| 160 | </div> |
| 161 | <div class="sect2" lang="en" xml:lang="en"> |
| 162 | <div class="titlepage"> |
| 163 | <div> |
| 164 | <div> |
| 165 | <h3 class="title"><a id="idp54675824"></a>See Also</h3> |
| 166 | </div> |
| 167 | </div> |
| 168 | </div> |
| 169 | <p> |
| 170 | <a class="xref" href="seq.html#seqlist" title="Sequences and Related Methods">Sequences and Related Methods</a> |
| 171 | </p> |
| 172 | </div> |
| 173 | </div> |
| 174 | <div class="navfooter"> |
| 175 | <hr /> |
| 176 | <table width="100%" summary="Navigation footer"> |
| 177 | <tr> |
| 178 | <td width="40%" align="left"><a accesskey="p" href="seqopen.html">Prev</a> </td> |
| 179 | <td width="20%" align="center"> |
| 180 | <a accesskey="u" href="seq.html">Up</a> |
| 181 | </td> |
| 182 | <td width="40%" align="right"> <a accesskey="n" href="seqset_cachesize.html">Next</a></td> |
| 183 | </tr> |
| 184 | <tr> |
| 185 | <td width="40%" align="left" valign="top">DB_SEQUENCE->open() </td> |
| 186 | <td width="20%" align="center"> |
| 187 | <a accesskey="h" href="index.html">Home</a> |
| 188 | </td> |
| 189 | <td width="40%" align="right" valign="top"> DB_SEQUENCE->set_cachesize()</td> |
| 190 | </tr> |
| 191 | </table> |
| 192 | </div> |
| 193 | </body> |
| 194 | </html> |