Chapter 3. The DBcursor Handle
A DBcursor object is a handle for a cursor into a Berkeley DB database.
DBcursor handles are not free-threaded. Cursor handles may be shared by multiple threads if access is serialized by the application.
You create a DBcursor using the DB->cursor() method.
If the cursor is to be used to perform operations on behalf of a transaction, the cursor must be opened and closed within the context of that single transaction.
Once DBcursor->close() has been called, the handle may not be accessed again, regardless of the method's return.
Database Cursors and Related Methods
| Database Cursors and Related Methods | Description |
|---|---|
| DB->cursor() | Create a cursor handle |
| DBcursor->close() | Close a cursor handle |
| DBcursor->cmp() | Compare two cursors for equality. |
| DBcursor->count() | Return count of duplicates for current key |
| DBcursor->del() | Delete current key/data pair |
| DBcursor->dup() | Duplicate the cursor handle |
| DBcursor->get() | Retrieve by cursor |
| DBcursor->put() | Store by cursor |
| DBcursor->set_priority(), DBcursor->get_priority() | Set/get the cursor's cache priority |