directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r887857 - in /websites/staging/directory/trunk/content: ./ mavibot/user-guide/4-btree-operations.html
Date Sat, 23 Nov 2013 23:25:37 GMT
Author: buildbot
Date: Sat Nov 23 23:25:36 2013
New Revision: 887857

Log:
Staging update by buildbot for directory

Modified:
    websites/staging/directory/trunk/content/   (props changed)
    websites/staging/directory/trunk/content/mavibot/user-guide/4-btree-operations.html

Propchange: websites/staging/directory/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Nov 23 23:25:36 2013
@@ -1 +1 @@
-1544867
+1544890

Modified: websites/staging/directory/trunk/content/mavibot/user-guide/4-btree-operations.html
==============================================================================
--- websites/staging/directory/trunk/content/mavibot/user-guide/4-btree-operations.html (original)
+++ websites/staging/directory/trunk/content/mavibot/user-guide/4-btree-operations.html Sat
Nov 23 23:25:36 2013
@@ -147,6 +147,36 @@
 
 
 <h1 id="4-btree-operations">4 - BTree operations</h1>
+<p>We will now list all the possible operations that can be applied on a <strong>BTree</strong>.
But first, let's introduce the <em>Cursor</em> interface, as it's used by all
the <em>browse</em> operation.</p>
+<h2 id="41-the-cursor-interface">4.1 The Cursor interface</h2>
+<p>All the browse operations will return a <em>Cursor</em> instance. A
<em>Cursor</em> allows one to move forward and backward on a <strong>BTree</strong>.
It starts at a specific position, and can be moved to a specific position too. The default
position for a <em>Cursor</em> is before the very first element of the <strong>BTree</strong></p>
+<DIV class="note" markdown="1">
+It's important to understand that a <b>Cursor</b> returns tuples, not keys. A
Key may be associated to many values, so a cursor may return many tuples with a given key
(each one will have a different value though).
+</DIV>
+
+<h3 id="411-cursor-position-management">4.1.1 Cursor position management</h3>
+<ul>
+<li>afterLast() : move the current position after the last element (last key and last
value)</li>
+<li>beforeFirst() : move the current position before the first element (first key and
first value)</li>
+</ul>
+<h3 id="412-cursor-operations">4.1.2 Cursor operations</h3>
+<p>We have to sets of methods depending on the elements we are browsing : tuples or
keys.</p>
+<h4 id="4121-browsing-tuples">4.1.2.1 Browsing tuples</h4>
+<ul>
+<li>hasNext() : tells if there is a next available tuple</li>
+<li>hasPrev() : tells if there is a previous available tuple</li>
+<li>next() : move to the next value, or to the next key if all the values have been
processed, and return the associated tuple</li>
+<li>prev() : move to the previous value, or to the next key if all the values have
been processed, and return the associated tuple</li>
+</ul>
+<h4 id="4121-browsing-keys">4.1.2.1 Browsing keys</h4>
+<ul>
+<li>hasNextKey() : tells if there is a next available key</li>
+<li>hasPrevKey() : tells if there is a previous available key</li>
+<li>nextKey() : move to the next key, even if we have more values to process</li>
+<li>prevKey() : move to the previous key, even if we have more values to process</li>
+</ul>
+<h2 id="41-browse-operations">4.1 Browse Operations</h2>
+<p>Now that we know what the <em>Cursor</em> is about, we can describe
the various <em>browse</em> operations.</p>
 
 
     <div class="nav">



Mime
View raw message