ee,hash,hashing,transaction,transactions,locking,logging,access method,access me thods,java,C,C++">
This manual page describes the specific details of the Dbc class, which provides cursor support for the access methods in Db.
The Dbc functions are the library interface supporting sequential access to the records stored by the access methods of the Berkeley DB library. Cursors are created by calling the Db.cursor method which returns a Dbc object.
Each cursor maintains positioning information within a set of key/data pairs. In the presence of transactions, cursors are only valid within the context of a single transaction, the one specified during the Db.cursor call. All cursor operations will be executed in the context of that transaction. Before aborting or committing a transaction, all cursors used within that transaction must be closed. In the presence of transactions, the application must call DbTxn.abort if any of the cursor operations returns that a deadlock (EAGAIN) or system failure occurred.
When locking is enabled, page locks are retained between consecutive cursor calls. For this reason, in the presence of locking, applications should discard cursors as soon as they are done with them. Calling the Db.close method discards any cursors opened in the context of a particular Db object returned by the Db.open call.