Next: Transaction API, Previous: BTree Cursor API, Up: User API Reference
Index cursors are made the same way standard cursors are, with a call
to make-cursor
, except with the index as the argument instead
of a standard btree. In addition to the standard cursor operations,
which provide the direct key and value of a btree-index
, the
following class of “p” cursors work on an index and allow you to get
the primary value of the indexed-btree
that the
btree-index
belongs to.
They each return multiple values (exists? key primary-value
primary-key)
.
Returns has-tuple / secondary key / value / primary key at the current position.
Moves the key to the beginning of the secondary index. Returns has-tuple / secondary key / value / primary key.
Moves the key to the end of the secondary index. Returns has-tuple / secondary key / value / primary key.
Advances the cursor. Returns has-tuple / secondary key / value / primary key.
Moves the cursor back. Returns has-tuple / secondary key / value / primary key.
Moves the cursor to a particular key. Returns has-tuple / secondary key / value / primary key.
Move the cursor to the first key-value pair with key greater or equal to the key argument, according to the lisp sorter. Returns has-pair secondary key value primary key.
Moves the cursor to a particular secondary key / primary key pair. Returns has-tuple / secondary key / value / primary key.
Moves the cursor to a the first secondary key / primary key pair, with secondary key equal to the key argument, and primary key greater or equal to the pkey argument. Returns has-tuple / secondary key / value / primary key.
Move to the next non-duplicate element (with different key.) Returns has-pair key value.
Move to the next duplicate element (with the same key.) Returns has-pair key value.
Move to the next non-duplicate element (with different key.) Returns has-tuple / secondary key / value / primary key.
Move to the next duplicate element (with the same key.) Returns has-tuple / secondary key / value / primary key.
Move to the previous non-duplicate element (with different key.) Returns has-pair key value.
Move to the previous duplicate element (with the same key.) Returns has-pair key value.