|
![]() ![]() ![]() |
Once a database handle has been created using db_create, there are several standard access method operations. Each of these operations is performed using a method referred to by the returned handle. Generally, the database will be opened using DB->open. If the database is from an old release of Berkeley DB, it may need to be upgraded to the current release before it is opened using DB->upgrade.
Once a database has been opened, records may be retrieved (DB->get), stored (DB->put), and deleted (DB->del).
Additional operations supported by the database handle include statistics (DB->stat), truncation (DB->truncate), version upgrade (DB->upgrade), verification and salvage (DB->verify), flushing to a backing file (DB->sync), and association of secondary indices (DB->associate). Database handles are eventually closed using DB->close.
Database Operations | Description |
---|---|
db_create | Create a database handle |
DB->associate | Associate a secondary index |
DB->close | Close a database |
DB->close | Create a cursor |
DB->del | Delete items from a database |
DB->err, DB->errx | Error message |
DB->fd | Return a file descriptor from a database |
DB->get, DB->pget | Get items from a database |
DB->get_byteswapped | Return if the underlying database is in host order |
DB->get_env | Return database environment handle |
DB->mpf | Return underlying DB_MPOOLFILE handle |
DB->get_type | Return the database type |
DB->join | Perform a database join on cursors |
DB->key_range | Return estimate of key location |
DB->open | Open a database |
DB->put | Store items into a database |
DB->remove | Remove a database |
DB->rename | Rename a database |
DB->stat, |