DBCursor Get Methods
These DBCursor methods are all wrappers around the get() function in the
C API.
-
current(flags=0, dlen=-1, doff=-1)
- Returns the key/data pair currently referenced by the cursor.
More info...
-
get_current_size()
- Returns length of the data for the current entry referenced by the
cursor.
-
first(flags=0, dlen=-1, doff=-1)
- Position the cursor to the first key/data pair and return it.
More info...
-
last(flags=0, dlen=-1, doff=-1)
- Position the cursor to the last key/data pair and return it.
More info...
-
next(flags=0, dlen=-1, doff=-1)
- Position the cursor to the next key/data pair and return it.
More info...
-
prev(flags=0, dlen=-1, doff=-1)
- Position the cursor to the previous key/data pair and return it.
More info...
-
consume(flags=0, dlen=-1, doff=-1)
For a database with the Queue access method, returns the record
number and data from the first available record and deletes it from
the queue.
NOTE: This method is deprecated in Berkeley DB version 3.2 in favor
of the new consume method in the DB class.
-
get_both(key, data, flags=0)
- Like set() but positions the cursor to the record matching both key
and data. (An alias for this is set_both, which makes more sense to
me...)
More info...
-
get_recno()
- Return the record number associated with the cursor. The database
must use the BTree access method and have been created with the
DB_RECNUM flag.
More info...
-
join_item(flags=0)
- For cursors returned from the DB.join method, returns the combined
key value from the joined cursors.
More info...
-
next_dup(flags=0, dlen=-1, doff=-1)
- If the next key/data pair of the database is a duplicate record for
the current key/data pair, the cursor is moved to the next key/data
pair of the database, and that pair is returned.
More info...
-
next_nodup(flags=0, dlen=-1, doff=-1)
- The cursor is moved to the next non-duplicate key/data pair of the
database, and that pair is returned.
More info...
-
prev_dup(flags=0, dlen=-1, doff=-1)
- If the previous key/data pair of the database is a duplicate data
record for the current key/data pair, the cursor is moved to the
previous key/data pair of the database, and that pair is returned.
More info...
-
prev_nodup(flags=0, dlen=-1, doff=-1)
- The cursor is moved to the previous non-duplicate key/data pair of
the database, and that pair is returned.
More info...
-
set(key, flags=0, dlen=-1, doff=-1)
- Move the cursor to the specified key in the database and return the
key/data pair found there.
More info...
-
set_range(key, flags=0, dlen=-1, doff=-1)
- Identical to set() except that in the case of the BTree access
method, the returned key/data pair is the smallest key greater than
or equal to the specified key (as determined by the comparison
function), permitting partial key matches and range searches.
More info...
-
set_recno(recno, flags=0, dlen=-1, doff=-1)
- Move the cursor to the specific numbered record of the database, and
return the associated key/data pair. The underlying database must be
of type Btree and it must have been created with the DB_RECNUM flag.
More info...
-
set_both(key, data, flags=0)
- See get_both(). The only difference in behaviour can be disabled
using set_get_returns_none(2).
More info...