In: |
bdb.rb
|
Parent: | Object |
A database cursor is a sequential pointer to the database entries. It allows traversal of the database and access to duplicate keyed entries. Cursors are used for operating on collections of records, for iterating over a database, and for saving handles to individual records, so that they can be modified after they have been read.
Creates new cursor that uses the same transaction and locker ID as the original cursor. This is useful when an application is using locking and requires two or more cursors in the same thread of control.
flags can have the value BDB::DB_POSITION, in this case the newly created cursor is initialized to reference the same position in the database as the original cursor and hold the same locks.
Retrieve key/data pair from the database
See the description of c_get in the Berkeley distribution for the different values of the flags parameter.
key must be given if the flags parameter is BDB::SET | BDB::SET_RANGE | BDB::SET_RECNO
key and value must be specified for BDB::GET_BOTH
Stores data value into the database.
See the description of c_put in the Berkeley distribution for the different values of the flags parameter.