10000 Iterator api by rtsisyk · Pull Request #7 · tarantool/tarantool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Iterator api #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
33fba52
New iteration API (C/ObjC and Lua)
rtsisyk Nov 6, 2012
781e258
Fix broken test case for Bug#1073476
rtsisyk Nov 7, 2012
b105ea0
ITER_ALL iteration strategy.
rtsisyk Nov 7, 2012
8112669
Lua index.iter and index.pairs refactoring
rtsisyk Nov 7, 2012
2e5f9b6
Replace undocumented iterator API from test cases
rtsisyk Nov 7, 2012
6259603
ITER_GT and ITER_LT support for TreeIndex
rtsisyk Nov 7, 2012
6930c1b
New iteration API (documentation)
rtsisyk Nov 7, 2012
e70e211
Fix broken test case for Bug#1043858
rtsisyk Nov 8, 2012
2002870
Fix ITER_LT and ITER_GT for NULL keys (must iter from first/last tuple)
rtsisyk Nov 8, 2012
d8f9628
New iteration API (test cases)
rtsisyk Nov 8, 2012
717810d
Update error message for ITER_EQ
rtsisyk Nov 8, 2012
230497b
ITER_REQ iteration strategy
rtsisyk Nov 21, 2012
07aa5ab
Allow ITER_ALL with NULL for tree
rtsisyk Nov 21, 2012
67378e1
iterator-api: review fixes
kostja Nov 23, 2012
3565bff
Revert "Allow ITER_ALL with NULL for tree" to comply new documentation
rtsisyk Nov 23, 2012
14a32d7
Fix a typo.
kostja Nov 23, 2012
4218719
Rename box.index.iter to box.index.iterator in order to comply docume…
rtsisyk Nov 23, 2012
9a42652
Remove "ITER_" prefix from box.index.ITER_XXX constants
rtsisyk Nov 23, 2012
ea0dbaa
8000 Use box.index.REQ instead of box.index.EQ for prev_equal wrapper
rtsisyk Nov 23, 2012
15aacb2
Merge branch 'iterator-api' of git://github.com/mailru/tarantool into…
rtsisyk Nov 23, 2012
fc5fa6e
Rename iteration_strategy back to iterator_type
rtsisyk Nov 23, 2012
3d3e0a5
Test case for REQ iterator_type
rtsisyk Nov 23, 2012
6957cf5
Remove confusing comments
rtsisyk Nov 26, 2012
50cd22c
iterator-api: review fixes
kostja Nov 26, 2012
8816e16
Merge branch 'master' into iterator-api
kostja Nov 28, 2012
8b3cf5b
Split toiterator() into two functions (review request).
kostja Nov 28, 2012
f3d3da9
Merge branch 'master' into iterator-api
kostja Nov 28, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 159 additions & 0 deletions doc/user/iterator-types.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<!DOCTYPE table [
<!ENTITY % tnt SYSTEM "../tnt.ent">
%tnt;
]>
<table xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="iterator-types" frame='all' pgwide='1'>

<title>Iterator types</title>

<tgroup cols='3' colsep='1' rowsep='1'>
<colspec colnum="5" colname="col4" colwidth="6*"/>

<thead>
<row>
<entry>Type</entry>
<entry>Arguments</entry>
<entry>HASH</entry>
<entry>TREE</entry>
<entry>Description</entry>
</row>
</thead>

<tbody>
<row>
<entry>box.index.ALL</entry>
<entry>none</entry>
<entry>yes</entry>
<entry>yes</entry>
<entry>
Iterate over all tuples in an index. When iterating
over a TREE index, tuples are returned in ascending
order of the key. When iterating over a HASH index,
tuples are returned in physical order or, in other words,
unordered.
</entry>
</row>

<row>
<entry>box.index.EQ</entry>
<entry>key</entry>
<entry>yes</entry>
<entry>yes</entry>
<entry>
<simpara>
Equality iterator: iterate over all tuples matching
the key.
Parts of a multipart key need to be separated by
comma.
</simpara>
<simpara>
Semantics of the match depends on the index.
A HASH index only supports exact match: all parts
of a key participating in the index must be provided.
In case of TREE index, only few parts of a key or a
key prefix are accepted for search.
In this case, all tuples with the same prefix or
matching key parts are considered matching the search
criteria.
</simpara>
<simpara>
A non-unique HASH index returns tuples in unspecified
order.
When a TREE index is not unique, or only part of a key
is given as a search criteria, matching tuples are
returned in ascending order.
</simpara>
</entry>
</row>

<row>
<entry>box.index.REQ</entry>
<entry>key</entry>
<entry>no</entry>
<entry>yes</entry>
<entry>
Reverse equality iterator. Is equivalent to
<code>box.index.EQ</code> with only distinction that
the order of returned tuples is descending, not
ascending. Is only supported by TREE
index.
</entry>
</row>

<row>
<entry>box.index.GT</entry>
<entry>key</entry>
<entry>yes (*)</entry>
<entry>yes </entry>
<entry>
Iterate over tuples strictly greater than the search key.
For TREE indexes, a key prefix or key part can be sufficient.
If the key is <code>nil</code>, iteration starts from
the smallest key in the index. The tuples are returned
in ascending order of the key.
HASH index also supports this iterator type, but returns
tuples in unspecified order. However, if the server
does not receive updates, this iterator can be used
to retrieve all tuples via a HASH index piece by piece,
by supplying the last key from the previous range as the
start key for an iterator over the next range.
</entry>
</row>

<row>
<entry>box.index.GE</entry>
<entry>key</entry>
<entry>no</entry>
<entry>yes</entry>
<entry>
Iterate over all tuples for which the corresponding fields are
greater or equal to the search key. TREE index returns
tuples in ascending order. Similarly to <code>box.index.EQ</code>,
key prefix or key part can be used to seed the iterator.
If the key is <code>nil</code>, iteration starts from the
smallest key in the index.
</entry>
</row>

<row>
<entry>box.index.LT</entry>
<entry>key</entry>
<entry>no</entry>
<entry>yes</entry>
<entry>
Similar to <code>box.index.GT</code>,
but returns all tuples which are strictly less
than the search key. The tuples are returned
in the descending order of the key.
<code>nil</code> key can be used to start
from the end of the index range.
</entry>
</row>

<row>
<entry>box.index.LE</entry>
<entry>key</entry>
<entry>no</entry>
<entry>yes</entry>
<entry>
Similar to <code>box.index.GE</code>, but
returns all tuples which are less or equal to the
search key or key prefix, and returns tuples
in descending order, from biggest to smallest.
If the key is <code>nil</code>, iteration starts
from the end of the index range.
</entry>
</row>

</tbody>

</tgroup>
</table>

<!--
vim: tw=66 syntax=docbk
vim: spell spelllang=en_us
-->
2 changes: 1 addition & 1 deletion doc/user/persistence-architecture.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ example:
The master and the WAL writer threads communicate using asynchronous (yet reliable)
messaging; the master thread, not being blocked on
WAL tasks, continues to handle requests quickly
even at hight volumes of disk I/O. For instance, SELECT performance,
even when volume of disk I/O is high. For instance, SELECT performance,
provided SELECTs are run in their own connections, remains
unaffected by disk load.
</para>
Expand Down
Loading
0