Sophie

Sophie

distrib > Fedora > 13 > i386 > media > os > by-pkgid > 38d9966b2e862f62a2028762250d72f3 > files > 28

ruby-bdb-0.6.5-3.fc12.i686.rpm

<?xml version="1.0" ?>
<!DOCTYPE html 
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>docs/sequence.rd</title>
</head>
<body>
<h2><a name="label-0" id="label-0">BDB::Sequence</a></h2><!-- RDLabel: "BDB::Sequence" -->
<p>A sequence is created with BDB::Common::create_sequence or 
BDB::Common::open_sequence (only with db &gt;= 4.3)</p>
<h3><a name="label-1" id="label-1">class BDB::Common</a></h3><!-- RDLabel: "class BDB::Common" -->
<dl>
<dt><a name="label-2" id="label-2"><code>create_sequence(<var>key</var>, <var>init</var> = <var>nil</var>, <var>options</var> = {}) {|<var>sequence</var>| }</code></a></dt><!-- RDLabel: "create_sequence" -->
<dd>
<p>create a new sequence (see also <var>open_sequence</var>)</p>
<p>equivalent to 
<var>open_sequence(key, BDB::CREATE|BDB::EXCL, init, options)</var></p>
<p>return (or yield) an object BDB::Sequence</p></dd>
<dt><a name="label-3" id="label-3"><code>open_sequence(<var>key</var>, <var>flags</var> = <var>0</var>, <var>init</var> = <var>nil</var>, <var>options</var> = {}) {|<var>sequence</var>| }</code></a></dt><!-- RDLabel: "open_sequence" -->
<dd>
<p>create or open a sequence (see BDB::Sequence)</p>
<p><var>key</var> : key for the sequence</p>
<p><var>flags</var> : flags can have BDB::CREATE, BDB::EXCL, BDB::AUTO_COMMIT,
BDB::THREAD</p>
<p><var>init</var> : initial value for the sequence</p>
<p><var>options</var> : hash with the possible keys "set_cachesize",
"set_flags" and "set_range"</p>
<p>return (or yield) an object BDB::Sequence</p></dd>
</dl>
<h3><a name="label-4" id="label-4">Methods</a></h3><!-- RDLabel: "Methods" -->
<dl>
<dt><a name="label-5" id="label-5"><code>cachesize</code></a></dt><!-- RDLabel: "cachesize" -->
<dd>
return the current cache size</dd>
<dt><a name="label-6" id="label-6"><code>close</code></a></dt><!-- RDLabel: "close" -->
<dd>
close the sequence</dd>
<dt><a name="label-7" id="label-7"><code>db</code></a></dt><!-- RDLabel: "db" -->
<dd>
return the bdb file associated with the sequence</dd>
<dt><a name="label-8" id="label-8"><code>flags</code></a></dt><!-- RDLabel: "flags" -->
<dd>
return the current flags</dd>
<dt><a name="label-9" id="label-9"><code>get(<var>delta</var> = <var>1</var>, <var>flags</var> = <var>0</var>)</code></a></dt><!-- RDLabel: "get" -->
<dd>
<p>return the next available element in the sequence and changes
the sequence value by <var>delta</var></p>
<p><var>flags</var> can have the value BDB::AUTO_COMMIT, BDB::TXN_NOSYNC</p></dd>
<dt><a name="label-10" id="label-10"><code>key</code></a></dt><!-- RDLabel: "key" -->
<dd>
return the key associated with the sequence</dd>
<dt><a name="label-11" id="label-11"><code>range</code></a></dt><!-- RDLabel: "range" -->
<dd>
return the range of values in the sequence</dd>
<dt><a name="label-12" id="label-12"><code>remove(<var>flags</var> = <var>0</var>)</code></a></dt><!-- RDLabel: "remove" -->
<dd>
<p>remove the sequence</p>
<p><var>flags</var> can have the value BDB::AUTO_COMMIT, BDB::TXN_NOSYNC</p></dd>
<dt><a name="label-13" id="label-13"><code>stat(<var>flags</var> = <var>0</var>)</code></a></dt><!-- RDLabel: "stat" -->
<dd>
<p>return statistics about the sequence</p>
<p><var>flags</var> can have the value BDB::STAT_CLEAR</p></dd>
</dl>

</body>
</html>