C Interface

SectionMethodDescription
Database Environmentdb_env_createCreate an environment handle

DB_ENV->closeClose an environment

DB_ENV->errError message with error string

DB_ENV->errxError message

DB_ENV->openOpen an environment

DB_ENV->removeRemove an environment

DB_ENV->set_allocSet local space allocation functions

DB_ENV->set_data_dirSet the environment data directory

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_recovery_initSet recovery initialization 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_tmp_dirSet the environment temporary file directory

DB_ENV->set_timeoutSet lock and transaction timeout

DB_ENV->set_verboseSet verbose messages

db_strerrorError strings

db_versionReturn version information
Database Operationsdb_createCreate a database handle

DB->associateAssociate a secondary index

DB->closeClose a database

DB->delDelete items from a database

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->errError message with error string

DB->errxError message

DB->set_allocSet local space allocation functions

DB->set_cachesizeSet the database cache size

DB->set_dup_compareSet a duplicate comparison function

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_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

DB->set_lorderSet the database byte order
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_registerRegister a filename with the log manager

DB_ENV->log_statReturn log subsystem statistics

DB_ENV->log_unregisterUnregister a filename with the log manager
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_recoverSet transaction abort recover function

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->rep_process_messageProcess a replication message

DB_ENV->rep_startConfigure an environment for replication
Historic InterfacesdbmUNIX Dbm/Ndbm Interfaces

hsearchUNIX Hsearch Interfaces
System Configurationdb_env_set_func_closeReplace underlying Berkeley DB system interfaces

db_env_set_func_dirfree

db_env_set_func_dirlist

db_env_set_func_exists

db_env_set_func_free

db_env_set_func_fsync

db_env_set_func_ioinfo

db_env_set_func_malloc

db_env_set_func_map

db_env_set_func_open

db_env_set_func_read

db_env_set_func_realloc

db_env_set_func_rename

db_env_set_func_seek

db_env_set_func_sleep

db_env_set_func_unlink

db_env_set_func_unmap

db_env_set_func_write

db_env_set_func_yield

Copyright Sleepycat Software