Google

Berkeley DB: C Interface

SectionMethodDescription
Database Environmentdb_env_createCreate an environment handle

DB_ENV->closeClose an environment

DB_ENV->dbremoveRemove a database

DB_ENV->dbrenameRename a database

DB_ENV->errError message with error string

DB_ENV->errxError message

DB_ENV->openOpen an environment

DB_ENV->removeRemove an environment

db_strerrorError strings

db_versionReturn version information
Environment ConfigurationDB_ENV->set_app_dispatchConfigure application recovery interface

DB_ENV->set_allocSet local space allocation functions

DB_ENV->set_data_dirSet the environment data directory

DB_ENV->set_encryptSet the environment cryptographic key

DB_ENV->set_errcallSet error message callback

DB_ENV->set_errfileSet error message FILE

DB_ENV->set_errpfxSet error message prefix

DB_ENV->set_feedbackSet feedback callback

DB_ENV->set_flagsEnvironment configuration

DB_ENV->set_paniccallSet panic callback

DB_ENV->set_rpc_serverEstablish an RPC server connection

DB_ENV->set_shm_keySet system memory shared segment ID

DB_ENV->set_tas_spinsSet the number of test-and-set spins

DB_ENV->set_timeoutSet lock and transaction timeout

DB_ENV->set_tmp_dirSet the environment temporary file directory

DB_ENV->set_verboseSet verbose messages
Database Operationsdb_createCreate a database handle

DB->associateAssociate a secondary index

DB->closeClose a database

DB->delDelete items from a database

DB->errError message with error string

DB->errxError message

DB->fdReturn a file descriptor from a database

DB->get, DB->pgetGet items from a database

DB->get_byteswappedReturn if the underlying database is in host order

DB->get_typeReturn the database type

DB->joinPerform a database join on cursors

DB->key_rangeReturn estimate of key location

DB->openOpen a database

DB->putStore items into a database

DB->removeRemove a database

DB->renameRename a database

DB->statReturn database statistics

DB->syncFlush a database to stable storage

DB->truncateEmpty a database

DB->upgradeUpgrade a database

DB->verifyVerify/salvage a database
Database ConfigurationDB->set_allocSet local space allocation functions

DB->set_cache_prioritySet the database cache priority

DB->set_cachesizeSet the database cache size

DB->set_dup_compareSet a duplicate comparison function

DB->set_encryptSet the database cryptographic key

DB->set_errcallSet error message callback

DB->set_errfileSet error message FILE

DB->set_errpfxSet error message prefix

DB->set_feedbackSet feedback callback

DB->set_flagsGeneral database configuration

DB->set_lorderSet the database byte order

DB->set_pagesizeSet the underlying database page size

DB->set_paniccallSet panic callback
Btree/Recno ConfigurationDB->set_append_recnoSet record append callback

DB->set_bt_compareSet a Btree comparison function

DB->set_bt_minkeySet the minimum number of keys per Btree page

DB->set_bt_prefixSet a Btree prefix comparison function

DB->set_re_delimSet the variable-length record delimiter

DB->set_re_lenSet the fixed-length record length

DB->set_re_padSet the fixed-length record pad byte

DB->set_re_sourceSet the backing Recno text file
Hash ConfigurationDB->set_h_ffactorSet the Hash table density

DB->set_h_hashSet a hashing function

DB->set_h_nelemSet the Hash table size
Queue ConfigurationDB->set_q_extentsizeSet Queue database extent size
Database Cursor OperationsDB->cursorCreate a cursor handle

DBcursor->c_closeClose a cursor

DBcursor->c_countReturn count of duplicates

DBcursor->c_delDelete by cursor

DBcursor->c_dupDuplicate a cursor

DBcursor->c_get, DBcursor->c_pgetRetrieve by cursor

DBcursor->c_putStore by cursor
Key/Data PairsDBT
Bulk RetrievalDB_MULTIPLE_INIT
Lock SubsystemDB_ENV->set_lk_conflictsSet lock conflicts matrix

DB_ENV->set_lk_detectSet automatic deadlock detection

DB_ENV->set_lk_max_lockersSet maximum number of lockers

DB_ENV->set_lk_max_locksSet maximum number of locks

DB_ENV->set_lk_max_objectsSet maximum number of lock objects

DB_ENV->lock_detectPerform deadlock detection

DB_ENV->lock_getAcquire a lock

DB_ENV->lock_idAcquire a locker ID

DB_ENV->lock_id_freeRelease a locker ID

DB_ENV->lock_putRelease a lock

DB_ENV->lock_statReturn lock subsystem statistics

DB_ENV->lock_vecAcquire/release locks
Log SubsystemDB_ENV->set_lg_bsizeSet log buffer size

DB_ENV->set_lg_dirSet the environment logging directory

DB_ENV->set_lg_maxSet log file size

DB_ENV->set_lg_regionmaxSet logging region size

DB_ENV->log_archiveList log and database files

DB_ENV->log_fileMap Log Sequence Numbers to log files

DB_ENV->log_flushFlush log records

DB_ENV->log_putWrite a log record

DB_ENV->log_statReturn log subsystem statistics
Log Cursor OperationsDB_ENV->log_cursorCreate a log cursor handle

DB_LOGC->closeClose a log cursor

DB_LOGC->getRetrieve a log record
Log Sequence NumbersDB_LSN

log_compareCompare two Log Sequence Numbers
Memory Pool SubsystemDB_ENV->set_cachesizeSet the environment cache size

DB_ENV->set_mp_mmapsizeSet maximum mapped-in database file size

DB_ENV->memp_registerRegister input/output functions for a file in a memory pool

DB_ENV->memp_statReturn memory pool statistics

DB_ENV->memp_syncFlush pages from a memory pool

DB_ENV->memp_trickleTrickle flush pages from a memory pool
Memory Pool FilesDB_ENV->memp_fcreateOpen a file in a memory pool

DB_MPOOLFILE->closeClose a file in a memory pool

DB_MPOOLFILE->getGet page from a file in a memory pool

DB_MPOOLFILE->openOpen a file in a memory pool

DB_MPOOLFILE->putReturn a page to a memory pool

DB_MPOOLFILE->setSet memory pool page status

DB_MPOOLFILE->syncFlush pages from a file in a memory pool

DB_MPOOLFILE->set_clear_lenSet file page bytes to be cleared

DB_MPOOLFILE->set_fileidSet file unique identifier

DB_MPOOLFILE->set_ftypeSet file type

DB_MPOOLFILE->set_lsn_offsetSet file log-sequence-number offset

DB_MPOOLFILE->set_pgcookieSet file cookie for pgin/pgout
Transaction SubsystemDB_ENV->set_tx_maxSet maximum number of transactions

DB_ENV->set_tx_timestampSet recovery timestamp

DB_ENV->txn_checkpointCheckpoint the transaction subsystem

DB_ENV->txn_recoverDistributed transaction recovery

DB_ENV->txn_statReturn transaction subsystem statistics
TransactionsDB_ENV->txn_beginBegin a transaction

DB_TXN->abortAbort a transaction

DB_TXN->commitCommit a transaction

DB_TXN->discardDiscard a prepared but not resolved transaction handle

DB_TXN->idReturn a transaction's ID

DB_TXN->preparePrepare a transaction for commit

DB_TXN->set_timeoutSet transaction timeout
ReplicationDB_ENV->set_rep_transportConfigure replication transport

DB_ENV->rep_electHold a replication election

DB_ENV->set_rep_limitLimit data sent in response to a single message

DB_ENV->rep_process_messageProcess a replication message

DB_ENV->rep_startConfigure an environment for replication

DB_ENV->rep_statReplication statistics
Historic InterfacesdbmUNIX Dbm/Ndbm Interfaces

hsearchUNIX Hsearch Interfaces
System ConfigurationRun-time configurationReplace underlying Berkeley DB system interfaces

Copyright Sleepycat Software