Import BSDDB 4.7.25 (as of svn r89086)

This commit is contained in:
Zachary Ware
2017-09-04 13:40:25 -05:00
parent 4b29e0458f
commit 8f590873d0
4781 changed files with 2241032 additions and 6 deletions

225
docs/api_c/api_core.html Normal file
View File

@@ -0,0 +1,225 @@
<!--DO NOT EDIT: automatically built by build script.-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: Berkeley DB: C Handle Methods (version 4.7.25)</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<p align=center><b>Berkeley DB: C Handle Methods (version 4.7.25)</b></p>
<table border=1 align=center>
<tr><th>C Handle Methods</th><th>Description</th></tr>
<!--Db::--><tr><td><a href="../api_c/db_class.html">db_create</a></td><td>Create a database handle</td></tr>
<!--Db::associate--><tr><td><a href="../api_c/db_associate.html">DB-&gt;associate</a></td><td>Associate a secondary index</td></tr>
<!--Db::close--><tr><td><a href="../api_c/db_close.html">DB-&gt;close</a></td><td>Close a database</td></tr>
<!--Db::compact--><tr><td><a href="../api_c/db_compact.html">DB-&gt;compact</a></td><td>Compact a database</td></tr>
<!--Db::cursor--><tr><td><a href="../api_c/db_cursor.html">DB-&gt;cursor</a></td><td>Create a cursor</td></tr>
<!--Db::del--><tr><td><a href="../api_c/db_del.html">DB-&gt;del</a></td><td>Delete items from a database</td></tr>
<!--Db::err--><tr><td><a href="../api_c/db_err.html">DB-&gt;err</a>, <a href="../api_c/db_err.html">DB-&gt;errx</a></td><td>Error message</td></tr>
<!--Db::exists--><tr><td><a href="../api_c/db_exists.html">DB-&gt;exists</a></td><td>Return if an item appears in a database</td></tr>
<!--Db::fd--><tr><td><a href="../api_c/db_fd.html">DB-&gt;fd</a></td><td>Return a file descriptor from a database</td></tr>
<!--Db::get--><tr><td><a href="../api_c/db_get.html">DB-&gt;get</a>, <a href="../api_c/db_get.html">DB-&gt;pget</a></td><td>Get items from a database</td></tr>
<!--Db::get_byteswapped--><tr><td><a href="../api_c/db_get_byteswapped.html">DB-&gt;get_byteswapped</a></td><td>Return if the underlying database is in host order</td></tr>
<!--Db::get_env--><tr><td><a href="../api_c/db_getenv.html">DB-&gt;get_env</a></td><td>Return <a href="../api_c/db_class.html">DB</a>'s underlying <a href="../api_c/env_class.html">DB_ENV</a> handle</td></tr>
<!--Db::get_type--><tr><td><a href="../api_c/db_get_type.html">DB-&gt;get_type</a></td><td>Return the database type</td></tr>
<!--Db::join--><tr><td><a href="../api_c/db_join.html">DB-&gt;join</a></td><td>Perform a database join on cursors</td></tr>
<!--Db::key_range--><tr><td><a href="../api_c/db_key_range.html">DB-&gt;key_range</a></td><td>Return estimate of key location</td></tr>
<!--Db::mpf--><tr><td><a href="../api_c/db_get_mpf.html">DB-&gt;get_mpf</a></td><td>Return <a href="../api_c/db_class.html">DB</a>'s underlying <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a> handle</td></tr>
<!--Db::open--><tr><td><a href="../api_c/db_open.html">DB-&gt;open</a></td><td>Open a database</td></tr>
<!--Db::put--><tr><td><a href="../api_c/db_put.html">DB-&gt;put</a></td><td>Store items into a database</td></tr>
<!--Db::remove--><tr><td><a href="../api_c/db_remove.html">DB-&gt;remove</a></td><td>Remove a database</td></tr>
<!--Db::rename--><tr><td><a href="../api_c/db_rename.html">DB-&gt;rename</a></td><td>Rename a database</td></tr>
<!--Db::set_alloc--><tr><td><a href="../api_c/db_set_alloc.html">DB-&gt;set_alloc</a></td><td>Set local space allocation functions</td></tr>
<!--Db::set_append_recno--><tr><td><a href="../api_c/db_set_append_recno.html">DB-&gt;set_append_recno</a></td><td>Set record append callback</td></tr>
<!--Db::set_bt_compare--><tr><td><a href="../api_c/db_set_bt_compare.html">DB-&gt;set_bt_compare</a></td><td>Set a Btree comparison function</td></tr>
<!--Db::set_bt_minkey--><tr><td><a href="../api_c/db_set_bt_minkey.html">DB-&gt;set_bt_minkey</a></td><td>Set the minimum number of keys per Btree page</td></tr>
<!--Db::set_bt_prefix--><tr><td><a href="../api_c/db_set_bt_prefix.html">DB-&gt;set_bt_prefix</a></td><td>Set a Btree prefix comparison function</td></tr>
<!--Db::set_cachesize--><tr><td><a href="../api_c/db_set_cachesize.html">DB-&gt;set_cachesize</a></td><td>Set the database cache size</td></tr>
<!--Db::set_dup_compare--><tr><td><a href="../api_c/db_set_dup_compare.html">DB-&gt;set_dup_compare</a></td><td>Set a duplicate comparison function</td></tr>
<!--Db::set_encrypt--><tr><td><a href="../api_c/db_set_encrypt.html">DB-&gt;set_encrypt</a></td><td>Set the database cryptographic key</td></tr>
<!--Db::set_errcall--><tr><td><a href="../api_c/db_set_errcall.html">DB-&gt;set_errcall</a>, <a href="../api_c/db_set_msgcall.html">DB-&gt;set_msgcall</a></td><td>Set error and informational message callback</td></tr>
<!--Db::set_errfile--><tr><td><a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a>, <a href="../api_c/db_set_msgfile.html">DB-&gt;set_msgfile</a></td><td>Set error and informational message FILE</td></tr>
<!--Db::set_error_stream-->
<!--Db::set_errpfx--><tr><td><a href="../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a></td><td>Set error message prefix</td></tr>
<!--Db::set_feedback--><tr><td><a href="../api_c/db_set_feedback.html">DB-&gt;set_feedback</a></td><td>Set feedback callback</td></tr>
<!--Db::set_flags--><tr><td><a href="../api_c/db_set_flags.html">DB-&gt;set_flags</a></td><td>General database configuration</td></tr>
<!--Db::set_h_compare--><tr><td><a href="../api_c/db_set_h_compare.html">DB-&gt;set_h_compare</a></td><td>Set a Hash comparison function</td></tr>
<!--Db::set_h_ffactor--><tr><td><a href="../api_c/db_set_h_ffactor.html">DB-&gt;set_h_ffactor</a></td><td>Set the Hash table density</td></tr>
<!--Db::set_h_hash--><tr><td><a href="../api_c/db_set_h_hash.html">DB-&gt;set_h_hash</a></td><td>Set a hashing function</td></tr>
<!--Db::set_h_nelem--><tr><td><a href="../api_c/db_set_h_nelem.html">DB-&gt;set_h_nelem</a></td><td>Set the Hash table size</td></tr>
<!--Db::set_lorder--><tr><td><a href="../api_c/db_set_lorder.html">DB-&gt;set_lorder</a></td><td>Set the database byte order</td></tr>
<!--Db::set_pagesize--><tr><td><a href="../api_c/db_set_pagesize.html">DB-&gt;set_pagesize</a></td><td>Set the underlying database page size</td></tr>
<!--Db::set_priority--><tr><td><a href="../api_c/db_set_priority.html">DB-&gt;set_priority</a></td><td>Set cache page priority</td></tr>
<!--Db::set_q_extentsize--><tr><td><a href="../api_c/db_set_q_extentsize.html">DB-&gt;set_q_extentsize</a></td><td>Set Queue database extent size</td></tr>
<!--Db::set_re_delim--><tr><td><a href="../api_c/db_set_re_delim.html">DB-&gt;set_re_delim</a></td><td>Set the variable-length record delimiter</td></tr>
<!--Db::set_re_len--><tr><td><a href="../api_c/db_set_re_len.html">DB-&gt;set_re_len</a></td><td>Set the fixed-length record length</td></tr>
<!--Db::set_re_pad--><tr><td><a href="../api_c/db_set_re_pad.html">DB-&gt;set_re_pad</a></td><td>Set the fixed-length record pad byte</td></tr>
<!--Db::set_re_source--><tr><td><a href="../api_c/db_set_re_source.html">DB-&gt;set_re_source</a></td><td>Set the backing Recno text file</td></tr>
<!--Db::stat--><tr><td><a href="../api_c/db_stat.html">DB-&gt;stat</a>, <a href="../api_c/db_stat.html">DB-&gt;stat_print</a></td><td>Database statistics</td></tr>
<!--Db::sync--><tr><td><a href="../api_c/db_sync.html">DB-&gt;sync</a></td><td>Flush a database to stable storage</td></tr>
<!--Db::truncate--><tr><td><a href="../api_c/db_truncate.html">DB-&gt;truncate</a></td><td>Empty a database</td></tr>
<!--Db::upgrade--><tr><td><a href="../api_c/db_upgrade.html">DB-&gt;upgrade</a></td><td>Upgrade a database</td></tr>
<!--Db::verify--><tr><td><a href="../api_c/db_verify.html">DB-&gt;verify</a></td><td>Verify/salvage a database</td></tr>
<!--DbCursor::close--><tr><td><a href="../api_c/dbc_close.html">DBcursor-&gt;close</a></td><td>Close a cursor</td></tr>
<!--DbCursor::count--><tr><td><a href="../api_c/dbc_count.html">DBcursor-&gt;count</a></td><td>Return count of duplicates</td></tr>
<!--DbCursor::del--><tr><td><a href="../api_c/dbc_del.html">DBcursor-&gt;del</a></td><td>Delete by cursor</td></tr>
<!--DbCursor::dup--><tr><td><a href="../api_c/dbc_dup.html">DBcursor-&gt;dup</a></td><td>Duplicate a cursor</td></tr>
<!--DbCursor::get--><tr><td><a href="../api_c/dbc_get.html">DBcursor-&gt;get</a>, <a href="../api_c/dbc_get.html">DBcursor-&gt;pget</a></td><td>Retrieve by cursor</td></tr>
<!--DbCursor::put--><tr><td><a href="../api_c/dbc_put.html">DBcursor-&gt;put</a></td><td>Store by cursor</td></tr>
<!--DbCursor::set_priority--><tr><td><a href="../api_c/dbc_set_priority.html">DBcursor-&gt;set_priority</a></td><td>Set the cursor's cache priority</td></tr>
<!--DbDeadlockException-->
<!--DbEnv::--><tr><td><a href="../api_c/env_class.html">db_env_create</a></td><td>Create an environment handle</td></tr>
<!--DbEnv::cdsgroup_begin--><tr><td><a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a></td><td>Get a locker ID in Berkeley DB Concurrent Data Store</td></tr>
<!--DbEnv::close--><tr><td><a href="../api_c/env_close.html">DB_ENV-&gt;close</a></td><td>Close an environment</td></tr>
<!--DbEnv::dbremove--><tr><td><a href="../api_c/env_dbremove.html">DB_ENV-&gt;dbremove</a></td><td>Remove a database</td></tr>
<!--DbEnv::dbrename--><tr><td><a href="../api_c/env_dbrename.html">DB_ENV-&gt;dbrename</a></td><td>Rename a database</td></tr>
<!--DbEnv::err--><tr><td><a href="../api_c/env_err.html">DB_ENV-&gt;err</a>, <a href="../api_c/env_err.html">DB_ENV-&gt;errx</a></td><td>Error message</td></tr>
<!--DbEnv::failchk--><tr><td><a href="../api_c/env_failchk.html">DB_ENV-&gt;failchk</a></td><td>Check for thread failure</td></tr>
<!--DbEnv::fileid_reset--><tr><td><a href="../api_c/env_fileid_reset.html">DB_ENV-&gt;fileid_reset</a></td><td>Reset database file IDs</td></tr>
<!--DbEnv::get_home--><tr><td><a href="../api_c/env_open.html">DB_ENV-&gt;get_home</a></td><td>Return environment's home directory</td></tr>
<!--DbEnv::get_open_flags--><tr><td><a href="../api_c/env_open.html">DB_ENV-&gt;get_open_flags</a></td><td>Return flags with which the environment was opened</td></tr>
<!--DbEnv::lock_detect--><tr><td><a href="../api_c/lock_detect.html">DB_ENV-&gt;lock_detect</a></td><td>Perform deadlock detection</td></tr>
<!--DbEnv::lock_get--><tr><td><a href="../api_c/lock_get.html">DB_ENV-&gt;lock_get</a></td><td>Acquire a lock</td></tr>
<!--DbEnv::lock_id--><tr><td><a href="../api_c/lock_id.html">DB_ENV-&gt;lock_id</a></td><td>Acquire a locker ID</td></tr>
<!--DbEnv::lock_id_free--><tr><td><a href="../api_c/lock_id_free.html">DB_ENV-&gt;lock_id_free</a></td><td>Release a locker ID</td></tr>
<!--DbEnv::lock_put--><tr><td><a href="../api_c/lock_put.html">DB_ENV-&gt;lock_put</a></td><td>Release a lock</td></tr>
<!--DbEnv::lock_stat--><tr><td><a href="../api_c/lock_stat.html">DB_ENV-&gt;lock_stat</a></td><td>Return lock subsystem statistics</td></tr>
<!--DbEnv::lock_vec--><tr><td><a href="../api_c/lock_vec.html">DB_ENV-&gt;lock_vec</a></td><td>Acquire/release locks</td></tr>
<!--DbEnv::log_archive--><tr><td><a href="../api_c/log_archive.html">DB_ENV-&gt;log_archive</a></td><td>List log and database files</td></tr>
<!--DbEnv::log_file--><tr><td><a href="../api_c/log_file.html">DB_ENV-&gt;log_file</a></td><td>Map Log Sequence Numbers to log files</td></tr>
<!--DbEnv::log_flush--><tr><td><a href="../api_c/log_flush.html">DB_ENV-&gt;log_flush</a></td><td>Flush log records</td></tr>
<!--DbEnv::log_printf--><tr><td><a href="../api_c/log_printf.html">DB_ENV-&gt;log_printf</a></td><td>Append informational message to the log</td></tr>
<!--DbEnv::log_put--><tr><td><a href="../api_c/log_put.html">DB_ENV-&gt;log_put</a></td><td>Write a log record</td></tr>
<!--DbEnv::log_set_config--><tr><td><a href="../api_c/env_log_set_config.html">DB_ENV-&gt;log_set_config</a></td><td>Configure the logging subsystem</td></tr>
<!--DbEnv::log_stat--><tr><td><a href="../api_c/log_stat.html">DB_ENV-&gt;log_stat</a></td><td>Return log subsystem statistics</td></tr>
<!--DbEnv::lsn_reset--><tr><td><a href="../api_c/env_lsn_reset.html">DB_ENV-&gt;lsn_reset</a></td><td>Reset database file LSNs</td></tr>
<!--DbEnv::memp_fcreate--><tr><td><a href="../api_c/memp_fcreate.html">DB_ENV-&gt;memp_fcreate</a></td><td>Create a memory pool file handle</td></tr>
<!--DbEnv::memp_register--><tr><td><a href="../api_c/memp_register.html">DB_ENV-&gt;memp_register</a></td><td>Register input/output functions for a file in a memory pool</td></tr>
<!--DbEnv::memp_stat--><tr><td><a href="../api_c/memp_stat.html">DB_ENV-&gt;memp_stat</a></td><td>Return memory pool statistics</td></tr>
<!--DbEnv::memp_sync--><tr><td><a href="../api_c/memp_sync.html">DB_ENV-&gt;memp_sync</a></td><td>Flush pages from a memory pool</td></tr>
<!--DbEnv::memp_trickle--><tr><td><a href="../api_c/memp_trickle.html">DB_ENV-&gt;memp_trickle</a></td><td>Trickle flush pages from a memory pool</td></tr>
<!--DbEnv::mutex_alloc--><tr><td><a href="../api_c/mutex_alloc.html">DB_ENV-&gt;mutex_alloc</a></td><td>Allocate a mutex</td></tr>
<!--DbEnv::mutex_free--><tr><td><a href="../api_c/mutex_free.html">DB_ENV-&gt;mutex_free</a></td><td>Free a mutex</td></tr>
<!--DbEnv::mutex_lock--><tr><td><a href="../api_c/mutex_lock.html">DB_ENV-&gt;mutex_lock</a></td><td>Lock a mutex</td></tr>
<!--DbEnv::mutex_set_align--><tr><td><a href="../api_c/mutex_set_align.html">DB_ENV-&gt;mutex_set_align</a></td><td>Configure mutex alignment</td></tr>
<!--DbEnv::mutex_set_increment--><tr><td><a href="../api_c/mutex_set_max.html">DB_ENV-&gt;mutex_set_increment</a></td><td>Configure number of additional mutexes</td></tr>
<!--DbEnv::mutex_set_max--><tr><td><a href="../api_c/mutex_set_max.html">DB_ENV-&gt;mutex_set_max</a></td><td>Configure total number of mutexes</td></tr>
<!--DbEnv::mutex_set_tas_spins--><tr><td><a href="../api_c/mutex_set_tas_spins.html">DB_ENV-&gt;mutex_set_tas_spins</a></td><td>Configure test-and-set mutex spin count</td></tr>
<!--DbEnv::mutex_stat--><tr><td><a href="../api_c/mutex_stat.html">DB_ENV-&gt;mutex_stat</a></td><td>Mutex statistics</td></tr>
<!--DbEnv::mutex_unlock--><tr><td><a href="../api_c/mutex_unlock.html">DB_ENV-&gt;mutex_unlock</a></td><td>Unlock a mutex</td></tr>
<!--DbEnv::open--><tr><td><a href="../api_c/env_open.html">DB_ENV-&gt;open</a></td><td>Open an environment</td></tr>
<!--DbEnv::remove--><tr><td><a href="../api_c/env_remove.html">DB_ENV-&gt;remove</a></td><td>Remove an environment</td></tr>
<!--DbEnv::rep_elect--><tr><td><a href="../api_c/rep_elect.html">DB_ENV-&gt;rep_elect</a></td><td>Hold a replication election</td></tr>
<!--DbEnv::rep_process_message--><tr><td><a href="../api_c/rep_message.html">DB_ENV-&gt;rep_process_message</a></td><td>Process a replication message</td></tr>
<!--DbEnv::rep_set_clockskew--><tr><td><a href="../api_c/rep_clockskew.html">DB_ENV-&gt;rep_set_clockskew</a></td><td>Configure master lease clock adjustment</td></tr>
<!--DbEnv::rep_set_config--><tr><td><a href="../api_c/rep_config.html">DB_ENV-&gt;rep_set_config</a></td><td>Configure the replication subsystem</td></tr>
<!--DbEnv::rep_set_limit--><tr><td><a href="../api_c/rep_limit.html">DB_ENV-&gt;rep_set_limit</a></td><td>Limit data sent in response to a single message</td></tr>
<!--DbEnv::rep_set_nsites--><tr><td><a href="../api_c/rep_nsites.html">DB_ENV-&gt;rep_set_nsites</a></td><td>Configure replication group site count</td></tr>
<!--DbEnv::rep_set_priority--><tr><td><a href="../api_c/rep_priority.html">DB_ENV-&gt;rep_set_priority</a></td><td>Configure replication site priority</td></tr>
<!--DbEnv::rep_set_request--><tr><td><a href="../api_c/rep_request.html">DB_ENV-&gt;rep_set_request</a></td><td>Configure replication client retransmission requests</td></tr>
<!--DbEnv::rep_set_timeout--><tr><td><a href="../api_c/rep_timeout.html">DB_ENV-&gt;rep_set_timeout</a></td><td>Configure replication timeouts</td></tr>
<!--DbEnv::rep_set_transport--><tr><td><a href="../api_c/rep_transport.html">DB_ENV-&gt;rep_set_transport</a></td><td>Configure replication transport callback</td></tr>
<!--DbEnv::rep_start--><tr><td><a href="../api_c/rep_start.html">DB_ENV-&gt;rep_start</a></td><td>Configure an environment for replication</td></tr>
<!--DbEnv::rep_stat--><tr><td><a href="../api_c/rep_stat.html">DB_ENV-&gt;rep_stat</a></td><td>Replication statistics</td></tr>
<!--DbEnv::rep_sync--><tr><td><a href="../api_c/rep_sync.html">DB_ENV-&gt;rep_sync</a></td><td>Replication synchronization</td></tr>
<!--DbEnv::repmgr_add_remote_site--><tr><td><a href="../api_c/repmgr_remote_site.html">DB_ENV-&gt;repmgr_add_remote_site</a></td><td>Specify the replication manager's remote sites</td></tr>
<!--DbEnv::repmgr_set_ack_policy--><tr><td><a href="../api_c/repmgr_ack_policy.html">DB_ENV-&gt;repmgr_set_ack_policy</a></td><td>Specify the replication manager's client acknowledgement policy</td></tr>
<!--DbEnv::repmgr_set_local_site--><tr><td><a href="../api_c/repmgr_local_site.html">DB_ENV-&gt;repmgr_set_local_site</a></td><td>Specify the replication manager's local site</td></tr>
<!--DbEnv::repmgr_site_list--><tr><td><a href="../api_c/repmgr_site_list.html">DB_ENV-&gt;repmgr_site_list</a></td><td>List the sites and their status</td></tr>
<!--DbEnv::repmgr_start--><tr><td><a href="../api_c/repmgr_start.html">DB_ENV-&gt;repmgr_start</a></td><td>Start the replication manager</td></tr>
<!--DbEnv::repmgr_stat--><tr><td><a href="../api_c/repmgr_stat.html">DB_ENV-&gt;repmgr_stat</a></td><td>Replication manager statistics</td></tr>
<!--DbEnv::set_alloc--><tr><td><a href="../api_c/env_set_alloc.html">DB_ENV-&gt;set_alloc</a></td><td>Set local space allocation functions</td></tr>
<!--DbEnv::set_app_dispatch--><tr><td><a href="../api_c/env_set_app_dispatch.html">DB_ENV-&gt;set_app_dispatch</a></td><td>Configure application recovery</td></tr>
<!--DbEnv::set_cache_max--><tr><td><a href="../api_c/env_set_cache_max.html">DB_ENV-&gt;set_cache_max</a></td><td>Set the maximum cache size</td></tr>
<!--DbEnv::set_cachesize--><tr><td><a href="../api_c/env_set_cachesize.html">DB_ENV-&gt;set_cachesize</a></td><td>Set the environment cache size</td></tr>
<!--DbEnv::set_data_dir--><tr><td><a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a></td><td>Set the environment data directory</td></tr>
<!--DbEnv::set_encrypt--><tr><td><a href="../api_c/env_set_encrypt.html">DB_ENV-&gt;set_encrypt</a></td><td>Set the environment cryptographic key</td></tr>
<!--DbEnv::set_errcall--><tr><td><a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a>, <a href="../api_c/env_set_msgcall.html">DB_ENV-&gt;set_msgcall</a></td><td>Set error and informational message callbacks</td></tr>
<!--DbEnv::set_errfile--><tr><td><a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a>, <a href="../api_c/env_set_msgfile.html">DB_ENV-&gt;set_msgfile</a></td><td>Set error and informational message FILE</td></tr>
<!--DbEnv::set_error_stream-->
<!--DbEnv::set_errpfx--><tr><td><a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a></td><td>Set error message prefix</td></tr>
<!--DbEnv::set_event_notify--><tr><td><a href="../api_c/env_event_notify.html">DB_ENV-&gt;set_event_notify</a></td><td>Set event notification callback</td></tr>
<!--DbEnv::set_feedback--><tr><td><a href="../api_c/env_set_feedback.html">DB_ENV-&gt;set_feedback</a></td><td>Set feedback callback</td></tr>
<!--DbEnv::set_flags--><tr><td><a href="../api_c/env_set_flags.html">DB_ENV-&gt;set_flags</a></td><td>Environment configuration</td></tr>
<!--DbEnv::set_intermediate_dir_mode--><tr><td><a href="../api_c/env_set_intermediate_dir_mode.html">DB_ENV-&gt;set_intermediate_dir_mode</a></td><td>Set intermediate directory creation mode</td></tr>
<!--DbEnv::set_isalive--><tr><td><a href="../api_c/env_set_isalive.html">DB_ENV-&gt;set_isalive</a></td><td>Set thread is-alive callback</td></tr>
<!--DbEnv::set_lg_bsize--><tr><td><a href="../api_c/env_set_lg_bsize.html">DB_ENV-&gt;set_lg_bsize</a></td><td>Set log buffer size</td></tr>
<!--DbEnv::set_lg_dir--><tr><td><a href="../api_c/env_set_lg_dir.html">DB_ENV-&gt;set_lg_dir</a></td><td>Set the environment logging directory</td></tr>
<!--DbEnv::set_lg_filemode--><tr><td><a href="../api_c/env_set_lg_mode.html">DB_ENV-&gt;set_lg_filemode</a></td><td>Set log file mode</td></tr>
<!--DbEnv::set_lg_max--><tr><td><a href="../api_c/env_set_lg_max.html">DB_ENV-&gt;set_lg_max</a></td><td>Set log file size</td></tr>
<!--DbEnv::set_lg_regionmax--><tr><td><a href="../api_c/env_set_lg_regionmax.html">DB_ENV-&gt;set_lg_regionmax</a></td><td>Set logging region size</td></tr>
<!--DbEnv::set_lk_conflicts--><tr><td><a href="../api_c/env_set_lk_conflicts.html">DB_ENV-&gt;set_lk_conflicts</a></td><td>Set lock conflicts matrix</td></tr>
<!--DbEnv::set_lk_max_detect--><tr><td><a href="../api_c/env_set_lk_detect.html">DB_ENV-&gt;set_lk_detect</a></td><td>Set automatic deadlock detection</td></tr>
<!--DbEnv::set_lk_max_lockers--><tr><td><a href="../api_c/env_set_lk_max_lockers.html">DB_ENV-&gt;set_lk_max_lockers</a></td><td>Set maximum number of lockers</td></tr>
<!--DbEnv::set_lk_max_locks--><tr><td><a href="../api_c/env_set_lk_max_locks.html">DB_ENV-&gt;set_lk_max_locks</a></td><td>Set maximum number of locks</td></tr>
<!--DbEnv::set_lk_max_objects--><tr><td><a href="../api_c/env_set_lk_max_objects.html">DB_ENV-&gt;set_lk_max_objects</a></td><td>Set maximum number of lock objects</td></tr>
<!--DbEnv::set_lk_partitions--><tr><td><a href="../api_c/env_set_lk_partitions.html">DB_ENV-&gt;set_lk_partitions</a></td><td>Set number of lock partitions</td></tr>
<!--DbEnv::set_mp_max_openfd--><tr><td><a href="../api_c/memp_openfd.html">DB_ENV-&gt;set_mp_max_openfd</a></td><td>Set the maximum number of open file descriptors</td></tr>
<!--DbEnv::set_mp_max_write--><tr><td><a href="../api_c/memp_maxwrite.html">DB_ENV-&gt;set_mp_max_write</a></td><td>Set the maximum number of sequential disk writes</td></tr>
<!--DbEnv::set_mp_mmapsize--><tr><td><a href="../api_c/env_set_mp_mmapsize.html">DB_ENV-&gt;set_mp_mmapsize</a></td><td>Set maximum mapped-in database file size</td></tr>
<!--DbEnv::set_rpc_server--><tr><td><a href="../api_c/env_set_rpc_server.html">DB_ENV-&gt;set_rpc_server</a></td><td>Establish an RPC server connection</td></tr>
<!--DbEnv::set_shm_key--><tr><td><a href="../api_c/env_set_shm_key.html">DB_ENV-&gt;set_shm_key</a></td><td>Set system memory shared segment ID</td></tr>
<!--DbEnv::set_thread_count--><tr><td><a href="../api_c/env_set_thread_count.html">DB_ENV-&gt;set_thread_count</a></td><td>Set approximate thread count</td></tr>
<!--DbEnv::set_thread_id--><tr><td><a href="../api_c/env_set_thread_id.html">DB_ENV-&gt;set_thread_id</a></td><td>Set thread of control ID function</td></tr>
<!--DbEnv::set_thread_id_string--><tr><td><a href="../api_c/env_set_thread_id_string.html">DB_ENV-&gt;set_thread_id_string</a></td><td>Set thread of control ID format function</td></tr>
<!--DbEnv::set_timeout--><tr><td><a href="../api_c/env_set_timeout.html">DB_ENV-&gt;set_timeout</a></td><td>Set lock and transaction timeout</td></tr>
<!--DbEnv::set_tmp_dir--><tr><td><a href="../api_c/env_set_tmp_dir.html">DB_ENV-&gt;set_tmp_dir</a></td><td>Set the environment temporary file directory</td></tr>
<!--DbEnv::set_tx_max--><tr><td><a href="../api_c/env_set_tx_max.html">DB_ENV-&gt;set_tx_max</a></td><td>Set maximum number of transactions</td></tr>
<!--DbEnv::set_tx_timestamp--><tr><td><a href="../api_c/env_set_tx_timestamp.html">DB_ENV-&gt;set_tx_timestamp</a></td><td>Set recovery timestamp</td></tr>
<!--DbEnv::set_verbose--><tr><td><a href="../api_c/env_set_verbose.html">DB_ENV-&gt;set_verbose</a></td><td>Set verbose messages</td></tr>
<!--DbEnv::stat_print--><tr><td><a href="../api_c/env_stat.html">DB_ENV-&gt;stat_print</a></td><td>Environment statistics</td></tr>
<!--DbEnv::txn_begin--><tr><td><a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a></td><td>Begin a transaction</td></tr>
<!--DbEnv::txn_checkpoint--><tr><td><a href="../api_c/txn_checkpoint.html">DB_ENV-&gt;txn_checkpoint</a></td><td>Checkpoint the transaction subsystem</td></tr>
<!--DbEnv::txn_recover--><tr><td><a href="../api_c/txn_recover.html">DB_ENV-&gt;txn_recover</a></td><td>Distributed transaction recovery</td></tr>
<!--DbEnv::txn_stat--><tr><td><a href="../api_c/txn_stat.html">DB_ENV-&gt;txn_stat</a></td><td>Return transaction subsystem statistics</td></tr>
<!--DbLockNotGrantedException-->
<!--DbLock-->
<!--DbLogc::-->
<!--DbLogc::--><tr><td><a href="../api_c/log_cursor.html">DB_ENV-&gt;log_cursor</a></td><td>Create a log cursor handle</td></tr>
<!--DbLogc::close--><tr><td><a href="../api_c/logc_close.html">DB_LOGC-&gt;close</a></td><td>Close a log cursor</td></tr>
<!--DbLogc::get--><tr><td><a href="../api_c/logc_get.html">DB_LOGC-&gt;get</a></td><td>Retrieve a log record</td></tr>
<!--DbLsn--><tr><td><a href="../api_c/lsn_class.html">DB_LSN</a></td><td>Log Sequence Numbers</td></tr>
<!--DbMemoryException-->
<!--DbMpoolFile::-->
<!--DbMpoolFile::close--><tr><td><a href="../api_c/memp_fclose.html">DB_MPOOLFILE-&gt;close</a></td><td>Close a file in a memory pool</td></tr>
<!--DbMpoolFile::get--><tr><td><a href="../api_c/memp_fget.html">DB_MPOOLFILE-&gt;get</a></td><td>Get page from a file in a memory pool</td></tr>
<!--DbMpoolFile::open--><tr><td><a href="../api_c/memp_fopen.html">DB_MPOOLFILE-&gt;open</a></td><td>Open a file in a memory pool</td></tr>
<!--DbMpoolFile::put--><tr><td><a href="../api_c/memp_fput.html">DB_MPOOLFILE-&gt;put</a></td><td>Return a page to a memory pool</td></tr>
<!--DbMpoolFile::set_clear_len--><tr><td><a href="../api_c/memp_set_clear_len.html">DB_MPOOLFILE-&gt;set_clear_len</a></td><td>Set file page bytes to be cleared</td></tr>
<!--DbMpoolFile::set_fileid--><tr><td><a href="../api_c/memp_set_fileid.html">DB_MPOOLFILE-&gt;set_fileid</a></td><td>Set file unique identifier</td></tr>
<!--DbMpoolFile::set_flags--><tr><td><a href="../api_c/memp_set_flags.html">DB_MPOOLFILE-&gt;set_flags</a></td><td>General memory pool file configuration</td></tr>
<!--DbMpoolFile::set_ftype--><tr><td><a href="../api_c/memp_set_ftype.html">DB_MPOOLFILE-&gt;set_ftype</a></td><td>Set file type</td></tr>
<!--DbMpoolFile::set_lsn_offset--><tr><td><a href="../api_c/memp_set_lsn_offset.html">DB_MPOOLFILE-&gt;set_lsn_offset</a></td><td>Set file log-sequence-number offset</td></tr>
<!--DbMpoolFile::set_maxsize--><tr><td><a href="../api_c/memp_set_maxsize.html">DB_MPOOLFILE-&gt;set_maxsize</a></td><td>Set maximum file size</td></tr>
<!--DbMpoolFile::set_pgcookie--><tr><td><a href="../api_c/memp_set_pgcookie.html">DB_MPOOLFILE-&gt;set_pgcookie</a></td><td>Set file cookie for pgin/pgout</td></tr>
<!--DbMpoolFile::set_priority--><tr><td><a href="../api_c/memp_set_priority.html">DB_MPOOLFILE-&gt;set_priority</a></td><td>Set memory pool file priority</td></tr>
<!--DbMpoolFile::sync--><tr><td><a href="../api_c/memp_fsync.html">DB_MPOOLFILE-&gt;sync</a></td><td>Flush pages from a file in a memory pool</td></tr>
<!--DbSequence::--><tr><td><a href="../api_c/seq_class.html">db_sequence_create</a></td><td>Create a sequence handle</td></tr>
<!--DbSequence::close--><tr><td><a href="../api_c/seq_close.html">DB_SEQUENCE-&gt;close</a></td><td>Close a sequence</td></tr>
<!--DbSequence::get--><tr><td><a href="../api_c/seq_get.html">DB_SEQUENCE-&gt;get</a></td><td>Get the next sequence element(s)</td></tr>
<!--DbSequence::get_dbp--><tr><td><a href="../api_c/seq_open.html">DB_SEQUENCE-&gt;get_dbp</a></td><td>Return a handle for the underlying sequence database</td></tr>
<!--DbSequence::get_key--><tr><td><a href="../api_c/seq_open.html">DB_SEQUENCE-&gt;get_key</a></td><td>Return the key for a sequence</td></tr>
<!--DbSequence::initial_value--><tr><td><a href="../api_c/seq_initial_value.html">DB_SEQUENCE-&gt;initial_value</a></td><td>Set the initial value of a sequence</td></tr>
<!--DbSequence::open--><tr><td><a href="../api_c/seq_open.html">DB_SEQUENCE-&gt;open</a></td><td>Open a sequence</td></tr>
<!--DbSequence::remove--><tr><td><a href="../api_c/seq_remove.html">DB_SEQUENCE-&gt;remove</a></td><td>Remove a sequence</td></tr>
<!--DbSequence::set_cachesize--><tr><td><a href="../api_c/seq_set_cachesize.html">DB_SEQUENCE-&gt;set_cachesize</a></td><td>Set the cache size of a sequence</td></tr>
<!--DbSequence::set_flags--><tr><td><a href="../api_c/seq_set_flags.html">DB_SEQUENCE-&gt;set_flags</a></td><td>Set the flags for a sequence</td></tr>
<!--DbSequence::set_range--><tr><td><a href="../api_c/seq_set_range.html">DB_SEQUENCE-&gt;set_range</a></td><td>Set the range for a sequence</td></tr>
<!--DbSequence::stat--><tr><td><a href="../api_c/seq_stat.html">DB_SEQUENCE-&gt;stat</a></td><td>Return sequence statistics</td></tr>
<!--DbTxn::-->
<!--DbTxn::abort--><tr><td><a href="../api_c/txn_abort.html">DB_TXN-&gt;abort</a></td><td>Abort a transaction</td></tr>
<!--DbTxn::commit--><tr><td><a href="../api_c/txn_commit.html">DB_TXN-&gt;commit</a></td><td>Commit a transaction</td></tr>
<!--DbTxn::discard--><tr><td><a href="../api_c/txn_discard.html">DB_TXN-&gt;discard</a></td><td>Discard a prepared but not resolved transaction handle</td></tr>
<!--DbTxn::id--><tr><td><a href="../api_c/txn_id.html">DB_TXN-&gt;id</a></td><td>Return a transaction's ID</td></tr>
<!--DbTxn::prepare--><tr><td><a href="../api_c/txn_prepare.html">DB_TXN-&gt;prepare</a></td><td>Prepare a transaction for commit</td></tr>
<!--DbTxn::set_name--><tr><td><a href="../api_c/txn_set_name.html">DB_TXN-&gt;set_name</a></td><td>Associate a string with a transaction</td></tr>
<!--DbTxn::set_timeout--><tr><td><a href="../api_c/txn_set_timeout.html">DB_TXN-&gt;set_timeout</a></td><td>Set transaction timeout</td></tr>
<!--db_strerror--><tr><td><a href="../api_c/env_strerror.html">db_strerror</a></td><td>Error strings</td></tr>
<!--db_version--><tr><td><a href="../api_c/env_version.html">db_version</a></td><td>Return version information</td></tr>
<!--log_compare--><tr><td><a href="../api_c/log_compare.html">log_compare</a></td><td>Compare two Log Sequence Numbers</td></tr>
</table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

714
docs/api_c/c_pindex.html Normal file
View File

@@ -0,0 +1,714 @@
<html>
<head>
<title>Berkeley DB: C API Index</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
</head>
<body bgcolor=white>
<h1 align=center>C API Index</h1>
<center>
<table cellspacing=0 cellpadding=0>
<tr><td align=right>Building a small memory footprint library </td><td>&nbsp;<a href="../ref/build_unix/small.html#--disable-cryptography">--disable-cryptography</a></td></tr>
<tr><td align=right>Building a small memory footprint library </td><td>&nbsp;<a href="../ref/build_unix/small.html#--disable-hash">--disable-hash</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--disable-largefile">--disable-largefile</a></td></tr>
<tr><td align=right>Building a small memory footprint library </td><td>&nbsp;<a href="../ref/build_unix/small.html#--disable-queue">--disable-queue</a></td></tr>
<tr><td align=right>Building a small memory footprint library </td><td>&nbsp;<a href="../ref/build_unix/small.html#--disable-replication">--disable-replication</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--disable-shared">--disable-shared</a></td></tr>
<tr><td align=right>QNX </td><td>&nbsp;<a href="../ref/build_unix/qnx.html#--disable-shared">--disable-shared</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--disable-static">--disable-static</a></td></tr>
<tr><td align=right>Building a small memory footprint library </td><td>&nbsp;<a href="../ref/build_unix/small.html#--disable-statistics">--disable-statistics</a></td></tr>
<tr><td align=right>Building a small memory footprint library </td><td>&nbsp;<a href="../ref/build_unix/small.html#--disable-verify">--disable-verify</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-compat185">--enable-compat185</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-cxx">--enable-cxx</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-debug">--enable-debug</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-debug_rop">--enable-debug_rop</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-debug_wop">--enable-debug_wop</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-diagnostic">--enable-diagnostic</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-dump185">--enable-dump185</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-java">--enable-java</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-posixmutexes">--enable-posixmutexes</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-pthread_api">--enable-pthread_api</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-rpc">--enable-rpc</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-smallbuild">--enable-smallbuild</a></td></tr>
<tr><td align=right>Building a small memory footprint library </td><td>&nbsp;<a href="../ref/build_unix/small.html#--enable-smallbuild">--enable-smallbuild</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-tcl">--enable-tcl</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-test">--enable-test</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-uimutexes">--enable-uimutexes</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--enable-umrw">--enable-umrw</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--with-mutex=MUTEX">--with-mutex=MUTEX</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--with-tcl=DIR">--with-tcl=DIR</a></td></tr>
<tr><td align=right>Configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#--with-uniquename=NAME">--with-uniquename=NAME</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/install/file.html#2">/etc/magic</a></td></tr>
<tr><td align=right>configuring Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#7">1.85</a> API compatibility</td></tr>
<tr><td align=right>building a utility to dump Berkeley DB </td><td>&nbsp;<a href="../ref/build_unix/conf.html#9">1.85</a> databases</td></tr>
<tr><td align=right>selecting an </td><td>&nbsp;<a href="../ref/am_conf/select.html#2">access</a> method</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_misc/faq.html#2">access</a> method FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_misc/tune.html#2">access</a> method tuning</td></tr>
<tr><td align=right>introduction to the </td><td>&nbsp;<a href="../ref/am_conf/intro.html#2">access</a> methods</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/aix.html#2">AIX</a></td></tr>
<tr><td align=right>data </td><td>&nbsp;<a href="../ref/am_misc/align.html#2">alignment</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/ext/mod.html#2">Apache</a></td></tr>
<tr><td align=right>programmatic </td><td>&nbsp;<a href="../ref/arch/apis.html#2">APIs</a></td></tr>
<tr><td align=right>hot </td><td>&nbsp;<a href="../ref/transapp/archival.html#4">backup</a></td></tr>
<tr><td align=right>introduction to the </td><td>&nbsp;<a href="../ref/mp/intro.html#4">buffer</a> pool subsystem</td></tr>
<tr><td align=right>turn off system </td><td>&nbsp;<a href="../api_c/memp_fopen.html#2">buffering</a></td></tr>
<tr><td align=right>turn off system </td><td>&nbsp;<a href="../api_c/env_set_flags.html#3">buffering</a> for database files</td></tr>
<tr><td align=right>turn off system </td><td>&nbsp;<a href="../api_c/env_set_flags.html#4">buffering</a> for database files</td></tr>
<tr><td align=right>turn off system </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#2">buffering</a> for log files</td></tr>
<tr><td align=right>turn off system </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#3">buffering</a> for log files</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_brew/intro.html#2">building</a> for BREW</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/intro.html#3">building</a> for QNX</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_s60/intro.html#2">building</a> for S60</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/intro.html#2">building</a> for UNIX</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/notes.html#2">building</a> for UNIX FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_vxworks/intro.html#2">building</a> for VxWorks</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_vxworks/introae.html#2">building</a> for VxWorks AE</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_vxworks/faq.html#2">building</a> for VxWorks FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_vxworks/intro6x.html#2">building</a> for VxWorks6.x</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_win/intro.html#2">building</a> for Windows</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_wince/intro.html#2">building</a> for Windows CE</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_win/faq.html#2">building</a> for Windows FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/dbt_bulk.html#2">bulk</a> retrieval</td></tr>
<tr><td align=right>selecting a </td><td>&nbsp;<a href="../ref/am_conf/byteorder.html#2">byte</a> order</td></tr>
<tr><td align=right>configuring the </td><td>&nbsp;<a href="../ref/build_unix/conf.html#8">C++</a> API</td></tr>
<tr><td align=right>flushing the database </td><td>&nbsp;<a href="../ref/am/sync.html#2">cache</a></td></tr>
<tr><td align=right>selecting a </td><td>&nbsp;<a href="../ref/am_conf/cachesize.html#2">cache</a> size</td></tr>
<tr><td align=right>introduction to the memory </td><td>&nbsp;<a href="../ref/mp/intro.html#3">cache</a> subsystem</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/archival.html#3">catastrophic</a> recovery</td></tr>
<tr><td align=right>Patches, Updates and </td><td>&nbsp;<a href="http://www.oracle.com/technology/software/products/berkeley-db/db/index.html">Change</a> logs</td></tr>
<tr><td align=right>database page </td><td>&nbsp;<a href="../api_c/db_set_flags.html#2">checksum</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/curclose.html#2">closing</a> a cursor</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/close.html#2">closing</a> a database</td></tr>
<tr><td align=right>specifying a Btree </td><td>&nbsp;<a href="../ref/am_conf/bt_compare.html#2">comparison</a> function</td></tr>
<tr><td align=right>changing </td><td>&nbsp;<a href="../ref/build_unix/flags.html#2">compile</a> or load options</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/cam/intro.html#2">Concurrent</a> Data Store</td></tr>
<tr><td align=right>database environment </td><td>&nbsp;<a href="../ref/env/db_config.html#3">configuration</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/conf.html#2">configuring</a> Berkeley DB for UNIX systems</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/program/copy.html#2">copying</a> databases</td></tr>
<tr><td align=right>salvaging </td><td>&nbsp;<a href="../ref/am/verify.html#4">corrupted</a> databases</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/count.html#2">counting</a> data items for a key</td></tr>
<tr><td align=right>closing a </td><td>&nbsp;<a href="../ref/am/curclose.html#3">cursor</a></td></tr>
<tr><td align=right>deleting records with a </td><td>&nbsp;<a href="../ref/am/curdel.html#3">cursor</a></td></tr>
<tr><td align=right>duplicating a </td><td>&nbsp;<a href="../ref/am/curdup.html#3">cursor</a></td></tr>
<tr><td align=right>retrieving records with a </td><td>&nbsp;<a href="../ref/am/curget.html#3">cursor</a></td></tr>
<tr><td align=right>storing records with a </td><td>&nbsp;<a href="../ref/am/curput.html#3">cursor</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_misc/stability.html#2">cursor</a> stability</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/read.html#4">cursor</a> stability</td></tr>
<tr><td align=right>database </td><td>&nbsp;<a href="../ref/am/cursor.html#2">cursors</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#data">data</a></td></tr>
<tr><td align=right>DBcursor-&gt;put </td><td>&nbsp;<a href="../api_c/dbc_put.html#DB_AFTER">DB_AFTER</a></td></tr>
<tr><td align=right>DB-&gt;verify </td><td>&nbsp;<a href="../api_c/db_verify.html#DB_AGGRESSIVE">DB_AGGRESSIVE</a></td></tr>
<tr><td align=right>DB-&gt;put </td><td>&nbsp;<a href="../api_c/db_put.html#DB_APPEND">DB_APPEND</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_archive </td><td>&nbsp;<a href="../api_c/log_archive.html#DB_ARCH_ABS">DB_ARCH_ABS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_archive </td><td>&nbsp;<a href="../api_c/log_archive.html#DB_ARCH_DATA">DB_ARCH_DATA</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_archive </td><td>&nbsp;<a href="../api_c/log_archive.html#DB_ARCH_LOG">DB_ARCH_LOG</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_archive </td><td>&nbsp;<a href="../api_c/log_archive.html#DB_ARCH_REMOVE">DB_ARCH_REMOVE</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;dbremove </td><td>&nbsp;<a href="../api_c/env_dbremove.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;dbrename </td><td>&nbsp;<a href="../api_c/env_dbrename.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></td></tr>
<tr><td align=right>DBcursor-&gt;put </td><td>&nbsp;<a href="../api_c/dbc_put.html#DB_BEFORE">DB_BEFORE</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_BTREE">DB_BTREE</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/dbt_class.html#3">DB_BUFFER_SMALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_CDB_ALLDB">DB_CDB_ALLDB</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_CHKSUM">DB_CHKSUM</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/env/db_config.html#2">DB_CONFIG</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/env/db_config.html#4">DB_CONFIG</a></td></tr>
<tr><td align=right>DB-&gt;get </td><td>&nbsp;<a href="../api_c/db_get.html#DB_CONSUME">DB_CONSUME</a></td></tr>
<tr><td align=right>DB-&gt;get </td><td>&nbsp;<a href="../api_c/db_get.html#DB_CONSUME_WAIT">DB_CONSUME_WAIT</a></td></tr>
<tr><td align=right>DB-&gt;associate </td><td>&nbsp;<a href="../api_c/db_associate.html#DB_CREATE">DB_CREATE</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_CREATE">DB_CREATE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_CREATE">DB_CREATE</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;open </td><td>&nbsp;<a href="../api_c/memp_fopen.html#DB_CREATE">DB_CREATE</a></td></tr>
<tr><td align=right>DB_SEQUENCE-&gt;open </td><td>&nbsp;<a href="../api_c/seq_open.html#DB_CREATE">DB_CREATE</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_CURRENT">DB_CURRENT</a></td></tr>
<tr><td align=right>DBcursor-&gt;put </td><td>&nbsp;<a href="../api_c/dbc_put.html#DB_CURRENT">DB_CURRENT</a></td></tr>
<tr><td align=right>DB_LOGC-&gt;get </td><td>&nbsp;<a href="../api_c/logc_get.html#DB_CURRENT">DB_CURRENT</a></td></tr>
<tr><td align=right>DB-&gt;associate </td><td>&nbsp;<a href="../api_c/db_associate.html#DB_DBT_APPMALLOC">DB_DBT_APPMALLOC</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#DB_DBT_APPMALLOC">DB_DBT_APPMALLOC</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#DB_DBT_MALLOC">DB_DBT_MALLOC</a></td></tr>
<tr><td align=right>DB-&gt;associate </td><td>&nbsp;<a href="../api_c/db_associate.html#DB_DBT_MULTIPLE">DB_DBT_MULTIPLE</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#DB_DBT_MULTIPLE">DB_DBT_MULTIPLE</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#DB_DBT_PARTIAL">DB_DBT_PARTIAL</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#DB_DBT_REALLOC">DB_DBT_REALLOC</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#DB_DBT_USERMEM">DB_DBT_USERMEM</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;open </td><td>&nbsp;<a href="../api_c/memp_fopen.html#DB_DIRECT">DB_DIRECT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_DIRECT_DB">DB_DIRECT_DB</a></td></tr>
<tr><td align=right>DB-&gt;associate </td><td>&nbsp;<a href="../api_c/db_associate.html#DB_DONOTINDEX">DB_DONOTINDEX</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_DSYNC_DB">DB_DSYNC_DB</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_DUP">DB_DUP</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_DUPSORT">DB_DUPSORT</a></td></tr>
<tr><td align=right>DB-&gt;upgrade </td><td>&nbsp;<a href="../api_c/db_upgrade.html#DB_DUPSORT">DB_DUPSORT</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/rep/id.html#2">DB_EID_BROADCAST</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/rep/id.html#3">DB_EID_INVALID</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_ENCRYPT">DB_ENCRYPT</a></td></tr>
<tr><td align=right>DB-&gt;set_encrypt </td><td>&nbsp;<a href="../api_c/db_set_encrypt.html#DB_ENCRYPT_AES">DB_ENCRYPT_AES</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_encrypt </td><td>&nbsp;<a href="../api_c/env_set_encrypt.html#DB_ENCRYPT_AES">DB_ENCRYPT_AES</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_event_notify </td><td>&nbsp;<a href="../api_c/env_event_notify.html#DB_EVENT_PANIC">DB_EVENT_PANIC</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_event_notify </td><td>&nbsp;<a href="../api_c/env_event_notify.html#DB_EVENT_REP_CLIENT">DB_EVENT_REP_CLIENT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_event_notify </td><td>&nbsp;<a href="../api_c/env_event_notify.html#DB_EVENT_REP_ELECTED">DB_EVENT_REP_ELECTED</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_event_notify </td><td>&nbsp;<a href="../api_c/env_event_notify.html#DB_EVENT_REP_MASTER">DB_EVENT_REP_MASTER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_event_notify </td><td>&nbsp;<a href="../api_c/env_event_notify.html#DB_EVENT_REP_NEWMASTER">DB_EVENT_REP_NEWMASTER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_event_notify </td><td>&nbsp;<a href="../api_c/env_event_notify.html#DB_EVENT_REP_PERM_FAILED">DB_EVENT_REP_PERM_FAILED</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_event_notify </td><td>&nbsp;<a href="../api_c/env_event_notify.html#DB_EVENT_REP_STARTUPDONE">DB_EVENT_REP_STARTUPDONE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_event_notify </td><td>&nbsp;<a href="../api_c/env_event_notify.html#DB_EVENT_WRITE_FAILED">DB_EVENT_WRITE_FAILED</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_EXCL">DB_EXCL</a></td></tr>
<tr><td align=right>DB_SEQUENCE-&gt;open </td><td>&nbsp;<a href="../api_c/seq_open.html#DB_EXCL">DB_EXCL</a></td></tr>
<tr><td align=right>DB-&gt;stat </td><td>&nbsp;<a href="../api_c/db_stat.html#DB_FAST_STAT">DB_FAST_STAT</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_FIRST">DB_FIRST</a></td></tr>
<tr><td align=right>DB_LOGC-&gt;get </td><td>&nbsp;<a href="../api_c/logc_get.html#DB_FIRST">DB_FIRST</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_recover </td><td>&nbsp;<a href="../api_c/txn_recover.html#DB_FIRST">DB_FIRST</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_put </td><td>&nbsp;<a href="../api_c/log_put.html#DB_FLUSH">DB_FLUSH</a></td></tr>
<tr><td align=right>DB_ENV-&gt;remove </td><td>&nbsp;<a href="../api_c/env_remove.html#DB_FORCE">DB_FORCE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_checkpoint </td><td>&nbsp;<a href="../api_c/txn_checkpoint.html#DB_FORCE">DB_FORCE</a></td></tr>
<tr><td align=right>DB-&gt;compact </td><td>&nbsp;<a href="../api_c/db_compact.html#DB_FREELIST_ONLY">DB_FREELIST_ONLY</a></td></tr>
<tr><td align=right>DB-&gt;compact </td><td>&nbsp;<a href="../api_c/db_compact.html#DB_FREE_SPACE">DB_FREE_SPACE</a></td></tr>
<tr><td align=right>DB-&gt;get </td><td>&nbsp;<a href="../api_c/db_get.html#DB_GET_BOTH">DB_GET_BOTH</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_GET_BOTH">DB_GET_BOTH</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_GET_BOTH_RANGE">DB_GET_BOTH_RANGE</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_GET_RECNO">DB_GET_RECNO</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_HASH">DB_HASH</a></td></tr>
<tr><td align=right>File naming </td><td>&nbsp;<a href="../ref/env/naming.html#DB_HOME">DB_HOME</a></td></tr>
<tr><td align=right>File naming </td><td>&nbsp;<a href="../ref/env/naming.html#db_home">db_home</a></td></tr>
<tr><td align=right>DB-&gt;get </td><td>&nbsp;<a href="../api_c/db_get.html#DB_IGNORE_LEASE">DB_IGNORE_LEASE</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_IGNORE_LEASE">DB_IGNORE_LEASE</a></td></tr>
<tr><td align=right>DB-&gt;associate </td><td>&nbsp;<a href="../api_c/db_associate.html#DB_IMMUTABLE_KEY">DB_IMMUTABLE_KEY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_INIT_LOCK">DB_INIT_LOCK</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_INIT_LOG">DB_INIT_LOG</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_INIT_MPOOL">DB_INIT_MPOOL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_INIT_REP">DB_INIT_REP</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_INIT_TXN">DB_INIT_TXN</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_INORDER">DB_INORDER</a></td></tr>
<tr><td align=right>DB-&gt;join </td><td>&nbsp;<a href="../api_c/db_join.html#DB_JOIN_ITEM">DB_JOIN_ITEM</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_JOIN_ITEM">DB_JOIN_ITEM</a></td></tr>
<tr><td align=right>DB-&gt;join </td><td>&nbsp;<a href="../api_c/db_join.html#DB_JOIN_NOSORT">DB_JOIN_NOSORT</a></td></tr>
<tr><td align=right>Error returns to applications </td><td>&nbsp;<a href="../ref/program/errorret.html#DB_KEYEMPTY">DB_KEYEMPTY</a></td></tr>
<tr><td align=right>Error returns to applications </td><td>&nbsp;<a href="../ref/program/errorret.html#DB_KEYEXIST">DB_KEYEXIST</a></td></tr>
<tr><td align=right>DBcursor-&gt;put </td><td>&nbsp;<a href="../api_c/dbc_put.html#DB_KEYFIRST">DB_KEYFIRST</a></td></tr>
<tr><td align=right>DBcursor-&gt;put </td><td>&nbsp;<a href="../api_c/dbc_put.html#DB_KEYLAST">DB_KEYLAST</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_LAST">DB_LAST</a></td></tr>
<tr><td align=right>DB_LOGC-&gt;get </td><td>&nbsp;<a href="../api_c/logc_get.html#DB_LAST">DB_LAST</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_LOCKDOWN">DB_LOCKDOWN</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_begin </td><td>&nbsp;<a href="../api_c/txn_begin.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/program/errorret.html#4">DB_LOCK_DEADLOCK</a></td></tr>
<tr><td align=right>Error returns to applications </td><td>&nbsp;<a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_lk_detect </td><td>&nbsp;<a href="../api_c/env_set_lk_detect.html#DB_LOCK_DEFAULT">DB_LOCK_DEFAULT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_detect </td><td>&nbsp;<a href="../api_c/lock_detect.html#DB_LOCK_DEFAULT">DB_LOCK_DEFAULT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_lk_detect </td><td>&nbsp;<a href="../api_c/env_set_lk_detect.html#DB_LOCK_EXPIRE">DB_LOCK_EXPIRE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_detect </td><td>&nbsp;<a href="../api_c/lock_detect.html#DB_LOCK_EXPIRE">DB_LOCK_EXPIRE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_GET">DB_LOCK_GET</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_GET_TIMEOUT">DB_LOCK_GET_TIMEOUT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_IREAD">DB_LOCK_IREAD</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_IWR">DB_LOCK_IWR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_IWRITE">DB_LOCK_IWRITE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_lk_detect </td><td>&nbsp;<a href="../api_c/env_set_lk_detect.html#DB_LOCK_MAXLOCKS">DB_LOCK_MAXLOCKS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_detect </td><td>&nbsp;<a href="../api_c/lock_detect.html#DB_LOCK_MAXLOCKS">DB_LOCK_MAXLOCKS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_lk_detect </td><td>&nbsp;<a href="../api_c/env_set_lk_detect.html#DB_LOCK_MAXWRITE">DB_LOCK_MAXWRITE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_detect </td><td>&nbsp;<a href="../api_c/lock_detect.html#DB_LOCK_MAXWRITE">DB_LOCK_MAXWRITE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_lk_detect </td><td>&nbsp;<a href="../api_c/env_set_lk_detect.html#DB_LOCK_MINLOCKS">DB_LOCK_MINLOCKS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_detect </td><td>&nbsp;<a href="../api_c/lock_detect.html#DB_LOCK_MINLOCKS">DB_LOCK_MINLOCKS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_lk_detect </td><td>&nbsp;<a href="../api_c/env_set_lk_detect.html#DB_LOCK_MINWRITE">DB_LOCK_MINWRITE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_detect </td><td>&nbsp;<a href="../api_c/lock_detect.html#DB_LOCK_MINWRITE">DB_LOCK_MINWRITE</a></td></tr>
<tr><td align=right>Error returns to applications </td><td>&nbsp;<a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_get </td><td>&nbsp;<a href="../api_c/lock_get.html#DB_LOCK_NOWAIT">DB_LOCK_NOWAIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_NOWAIT">DB_LOCK_NOWAIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_lk_detect </td><td>&nbsp;<a href="../api_c/env_set_lk_detect.html#DB_LOCK_OLDEST">DB_LOCK_OLDEST</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_detect </td><td>&nbsp;<a href="../api_c/lock_detect.html#DB_LOCK_OLDEST">DB_LOCK_OLDEST</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_PUT">DB_LOCK_PUT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_PUT_ALL">DB_LOCK_PUT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_PUT_OBJ">DB_LOCK_PUT_OBJ</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_lk_detect </td><td>&nbsp;<a href="../api_c/env_set_lk_detect.html#DB_LOCK_RANDOM">DB_LOCK_RANDOM</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_detect </td><td>&nbsp;<a href="../api_c/lock_detect.html#DB_LOCK_RANDOM">DB_LOCK_RANDOM</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_READ">DB_LOCK_READ</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_TIMEOUT">DB_LOCK_TIMEOUT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#DB_LOCK_WRITE">DB_LOCK_WRITE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_lk_detect </td><td>&nbsp;<a href="../api_c/env_set_lk_detect.html#DB_LOCK_YOUNGEST">DB_LOCK_YOUNGEST</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_detect </td><td>&nbsp;<a href="../api_c/lock_detect.html#DB_LOCK_YOUNGEST">DB_LOCK_YOUNGEST</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_set_config </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#DB_LOG_AUTO_REMOVE">DB_LOG_AUTO_REMOVE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_set_config </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#DB_LOG_BUFFER_FULL">DB_LOG_BUFFER_FULL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_set_config </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#DB_LOG_DIRECT">DB_LOG_DIRECT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_set_config </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#DB_LOG_DSYNC">DB_LOG_DSYNC</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_set_config </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#DB_LOG_IN_MEMORY">DB_LOG_IN_MEMORY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_set_config </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#DB_LOG_ZERO">DB_LOG_ZERO</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;get </td><td>&nbsp;<a href="../api_c/memp_fget.html#DB_MPOOL_CREATE">DB_MPOOL_CREATE</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;get </td><td>&nbsp;<a href="../api_c/memp_fget.html#DB_MPOOL_DIRTY">DB_MPOOL_DIRTY</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;get </td><td>&nbsp;<a href="../api_c/memp_fget.html#DB_MPOOL_EDIT">DB_MPOOL_EDIT</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;get </td><td>&nbsp;<a href="../api_c/memp_fget.html#DB_MPOOL_LAST">DB_MPOOL_LAST</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;get </td><td>&nbsp;<a href="../api_c/memp_fget.html#DB_MPOOL_NEW">DB_MPOOL_NEW</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;set_flags </td><td>&nbsp;<a href="../api_c/memp_set_flags.html#DB_MPOOL_NOFILE">DB_MPOOL_NOFILE</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;set_flags </td><td>&nbsp;<a href="../api_c/memp_set_flags.html#DB_MPOOL_UNLINK">DB_MPOOL_UNLINK</a></td></tr>
<tr><td align=right>DB-&gt;get </td><td>&nbsp;<a href="../api_c/db_get.html#DB_MULTIPLE">DB_MULTIPLE</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_bulk.html#DB_MULTIPLE_INIT">DB_MULTIPLE_INIT</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_bulk.html#DB_MULTIPLE_KEY_NEXT">DB_MULTIPLE_KEY_NEXT</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_bulk.html#DB_MULTIPLE_NEXT">DB_MULTIPLE_NEXT</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_bulk.html#DB_MULTIPLE_RECNO_NEXT">DB_MULTIPLE_RECNO_NEXT</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_MULTIVERSION">DB_MULTIVERSION</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_MULTIVERSION">DB_MULTIVERSION</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;open </td><td>&nbsp;<a href="../api_c/memp_fopen.html#DB_MULTIVERSION">DB_MULTIVERSION</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_isalive </td><td>&nbsp;<a href="../api_c/env_set_isalive.html#DB_MUTEX_PROCESS_ONLY">DB_MUTEX_PROCESS_ONLY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;mutex_alloc </td><td>&nbsp;<a href="../api_c/mutex_alloc.html#DB_MUTEX_PROCESS_ONLY">DB_MUTEX_PROCESS_ONLY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;mutex_alloc </td><td>&nbsp;<a href="../api_c/mutex_alloc.html#DB_MUTEX_SELF_BLOCK">DB_MUTEX_SELF_BLOCK</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_NEXT">DB_NEXT</a></td></tr>
<tr><td align=right>DB_LOGC-&gt;get </td><td>&nbsp;<a href="../api_c/logc_get.html#DB_NEXT">DB_NEXT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_recover </td><td>&nbsp;<a href="../api_c/txn_recover.html#DB_NEXT">DB_NEXT</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_NEXT_DUP">DB_NEXT_DUP</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_NEXT_NODUP">DB_NEXT_NODUP</a></td></tr>
<tr><td align=right>DB-&gt;put </td><td>&nbsp;<a href="../api_c/db_put.html#DB_NODUPDATA">DB_NODUPDATA</a></td></tr>
<tr><td align=right>DBcursor-&gt;put </td><td>&nbsp;<a href="../api_c/dbc_put.html#DB_NODUPDATA">DB_NODUPDATA</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_NOLOCKING">DB_NOLOCKING</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_NOMMAP">DB_NOMMAP</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_NOMMAP">DB_NOMMAP</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;open </td><td>&nbsp;<a href="../api_c/memp_fopen.html#DB_NOMMAP">DB_NOMMAP</a></td></tr>
<tr><td align=right>DB-&gt;verify </td><td>&nbsp;<a href="../api_c/db_verify.html#DB_NOORDERCHK">DB_NOORDERCHK</a></td></tr>
<tr><td align=right>DB-&gt;put </td><td>&nbsp;<a href="../api_c/db_put.html#DB_NOOVERWRITE">DB_NOOVERWRITE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_NOPANIC">DB_NOPANIC</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/env_set_rpc_server.html#2">DB_NOSERVER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_rpc_server </td><td>&nbsp;<a href="../api_c/env_set_rpc_server.html#DB_NOSERVER">DB_NOSERVER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_rpc_server </td><td>&nbsp;<a href="../api_c/env_set_rpc_server.html#DB_NOSERVER_HOME">DB_NOSERVER_HOME</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/env_set_rpc_server.html#3">DB_NOSERVER_ID</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_rpc_server </td><td>&nbsp;<a href="../api_c/env_set_rpc_server.html#DB_NOSERVER_ID">DB_NOSERVER_ID</a></td></tr>
<tr><td align=right>DB-&gt;close </td><td>&nbsp;<a href="../api_c/db_close.html#DB_NOSYNC">DB_NOSYNC</a></td></tr>
<tr><td align=right>Error returns to applications </td><td>&nbsp;<a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;open </td><td>&nbsp;<a href="../api_c/memp_fopen.html#DB_ODDFILESIZE">DB_ODDFILESIZE</a></td></tr>
<tr><td align=right>DB-&gt;upgrade </td><td>&nbsp;<a href="../api_c/db_upgrade.html#DB_OLD_VERSION">DB_OLD_VERSION</a></td></tr>
<tr><td align=right>DB-&gt;verify </td><td>&nbsp;<a href="../api_c/db_verify.html#DB_ORDERCHKONLY">DB_ORDERCHKONLY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_OVERWRITE">DB_OVERWRITE</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/memp_fget.html#2">DB_PAGE_NOTFOUND</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_PANIC_ENVIRONMENT">DB_PANIC_ENVIRONMENT</a></td></tr>
<tr><td align=right>DBcursor-&gt;dup </td><td>&nbsp;<a href="../api_c/dbc_dup.html#DB_POSITION">DB_POSITION</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_PREV">DB_PREV</a></td></tr>
<tr><td align=right>DB_LOGC-&gt;get </td><td>&nbsp;<a href="../api_c/logc_get.html#DB_PREV">DB_PREV</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_PREV_DUP">DB_PREV_DUP</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_PREV_NODUP">DB_PREV_NODUP</a></td></tr>
<tr><td align=right>DB-&gt;verify </td><td>&nbsp;<a href="../api_c/db_verify.html#DB_PRINTABLE">DB_PRINTABLE</a></td></tr>
<tr><td align=right>DB-&gt;set_priority </td><td>&nbsp;<a href="../api_c/db_set_priority.html#DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></td></tr>
<tr><td align=right>DBcursor-&gt;set_priority </td><td>&nbsp;<a href="../api_c/dbc_set_priority.html#DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;put </td><td>&nbsp;<a href="../api_c/memp_fput.html#DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;set_priority </td><td>&nbsp;<a href="../api_c/memp_set_priority.html#DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></td></tr>
<tr><td align=right>DB-&gt;set_priority </td><td>&nbsp;<a href="../api_c/db_set_priority.html#DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></td></tr>
<tr><td align=right>DBcursor-&gt;set_priority </td><td>&nbsp;<a href="../api_c/dbc_set_priority.html#DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;put </td><td>&nbsp;<a href="../api_c/memp_fput.html#DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;set_priority </td><td>&nbsp;<a href="../api_c/memp_set_priority.html#DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></td></tr>
<tr><td align=right>DB-&gt;set_priority </td><td>&nbsp;<a href="../api_c/db_set_priority.html#DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></td></tr>
<tr><td align=right>DBcursor-&gt;set_priority </td><td>&nbsp;<a href="../api_c/dbc_set_priority.html#DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;put </td><td>&nbsp;<a href="../api_c/memp_fput.html#DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;set_priority </td><td>&nbsp;<a href="../api_c/memp_set_priority.html#DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;put </td><td>&nbsp;<a href="../api_c/memp_fput.html#DB_PRIORITY_UNCHANGED">DB_PRIORITY_UNCHANGED</a></td></tr>
<tr><td align=right>DB-&gt;set_priority </td><td>&nbsp;<a href="../api_c/db_set_priority.html#DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></td></tr>
<tr><td align=right>DBcursor-&gt;set_priority </td><td>&nbsp;<a href="../api_c/dbc_set_priority.html#DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;put </td><td>&nbsp;<a href="../api_c/memp_fput.html#DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;set_priority </td><td>&nbsp;<a href="../api_c/memp_set_priority.html#DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></td></tr>
<tr><td align=right>DB-&gt;set_priority </td><td>&nbsp;<a href="../api_c/db_set_priority.html#DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></td></tr>
<tr><td align=right>DBcursor-&gt;set_priority </td><td>&nbsp;<a href="../api_c/dbc_set_priority.html#DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;put </td><td>&nbsp;<a href="../api_c/memp_fput.html#DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;set_priority </td><td>&nbsp;<a href="../api_c/memp_set_priority.html#DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_QUEUE">DB_QUEUE</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_RDONLY">DB_RDONLY</a></td></tr>
<tr><td align=right>DB_MPOOLFILE-&gt;open </td><td>&nbsp;<a href="../api_c/memp_fopen.html#DB_RDONLY">DB_RDONLY</a></td></tr>
<tr><td align=right>DB-&gt;cursor </td><td>&nbsp;<a href="../api_c/db_cursor.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;exists </td><td>&nbsp;<a href="../api_c/db_exists.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;get </td><td>&nbsp;<a href="../api_c/db_get.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;stat </td><td>&nbsp;<a href="../api_c/db_stat.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_begin </td><td>&nbsp;<a href="../api_c/txn_begin.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;cursor </td><td>&nbsp;<a href="../api_c/db_cursor.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;exists </td><td>&nbsp;<a href="../api_c/db_exists.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;get </td><td>&nbsp;<a href="../api_c/db_get.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;join </td><td>&nbsp;<a href="../api_c/db_join.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;stat </td><td>&nbsp;<a href="../api_c/db_stat.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_begin </td><td>&nbsp;<a href="../api_c/txn_begin.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_RECNO">DB_RECNO</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_RECNUM">DB_RECNUM</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_RECOVER">DB_RECOVER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_feedback </td><td>&nbsp;<a href="../api_c/env_set_feedback.html#DB_RECOVER">DB_RECOVER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_RECOVER_FATAL">DB_RECOVER_FATAL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_REGION_INIT">DB_REGION_INIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_REGISTER">DB_REGISTER</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_set_ack_policy </td><td>&nbsp;<a href="../api_c/repmgr_ack_policy.html#DB_REPMGR_ACKS_ALL">DB_REPMGR_ACKS_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_set_ack_policy </td><td>&nbsp;<a href="../api_c/repmgr_ack_policy.html#DB_REPMGR_ACKS_ALL_PEERS">DB_REPMGR_ACKS_ALL_PEERS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_set_ack_policy </td><td>&nbsp;<a href="../api_c/repmgr_ack_policy.html#DB_REPMGR_ACKS_NONE">DB_REPMGR_ACKS_NONE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_set_ack_policy </td><td>&nbsp;<a href="../api_c/repmgr_ack_policy.html#DB_REPMGR_ACKS_ONE">DB_REPMGR_ACKS_ONE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_set_ack_policy </td><td>&nbsp;<a href="../api_c/repmgr_ack_policy.html#DB_REPMGR_ACKS_ONE_PEER">DB_REPMGR_ACKS_ONE_PEER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_set_ack_policy </td><td>&nbsp;<a href="../api_c/repmgr_ack_policy.html#DB_REPMGR_ACKS_QUORUM">DB_REPMGR_ACKS_QUORUM</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_config </td><td>&nbsp;<a href="../api_c/rep_config.html#DB_REPMGR_CONF_2SITE_STRICT">DB_REPMGR_CONF_2SITE_STRICT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_site_list </td><td>&nbsp;<a href="../api_c/repmgr_site_list.html#DB_REPMGR_CONNECTED">DB_REPMGR_CONNECTED</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_site_list </td><td>&nbsp;<a href="../api_c/repmgr_site_list.html#DB_REPMGR_DISCONNECTED">DB_REPMGR_DISCONNECTED</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_add_remote_site </td><td>&nbsp;<a href="../api_c/repmgr_remote_site.html#DB_REPMGR_PEER">DB_REPMGR_PEER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_timeout </td><td>&nbsp;<a href="../api_c/rep_timeout.html#DB_REP_ACK_TIMEOUT">DB_REP_ACK_TIMEOUT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_transport </td><td>&nbsp;<a href="../api_c/rep_transport.html#DB_REP_ANYWHERE">DB_REP_ANYWHERE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_timeout </td><td>&nbsp;<a href="../api_c/rep_timeout.html#DB_REP_CHECKPOINT_DELAY">DB_REP_CHECKPOINT_DELAY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_start </td><td>&nbsp;<a href="../api_c/rep_start.html#DB_REP_CLIENT">DB_REP_CLIENT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_start </td><td>&nbsp;<a href="../api_c/repmgr_start.html#DB_REP_CLIENT">DB_REP_CLIENT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_config </td><td>&nbsp;<a href="../api_c/rep_config.html#DB_REP_CONF_BULK">DB_REP_CONF_BULK</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_config </td><td>&nbsp;<a href="../api_c/rep_config.html#DB_REP_CONF_DELAYCLIENT">DB_REP_CONF_DELAYCLIENT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_config </td><td>&nbsp;<a href="../api_c/rep_config.html#DB_REP_CONF_LEASE">DB_REP_CONF_LEASE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_config </td><td>&nbsp;<a href="../api_c/rep_config.html#DB_REP_CONF_NOAUTOINIT">DB_REP_CONF_NOAUTOINIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_config </td><td>&nbsp;<a href="../api_c/rep_config.html#DB_REP_CONF_NOWAIT">DB_REP_CONF_NOWAIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_timeout </td><td>&nbsp;<a href="../api_c/rep_timeout.html#DB_REP_CONNECTION_RETRY">DB_REP_CONNECTION_RETRY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_process_message </td><td>&nbsp;<a href="../api_c/rep_message.html#DB_REP_DUPMASTER">DB_REP_DUPMASTER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_start </td><td>&nbsp;<a href="../api_c/repmgr_start.html#DB_REP_ELECTION">DB_REP_ELECTION</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_timeout </td><td>&nbsp;<a href="../api_c/rep_timeout.html#DB_REP_ELECTION_RETRY">DB_REP_ELECTION_RETRY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_timeout </td><td>&nbsp;<a href="../api_c/rep_timeout.html#DB_REP_ELECTION_TIMEOUT">DB_REP_ELECTION_TIMEOUT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_timeout </td><td>&nbsp;<a href="../api_c/rep_timeout.html#DB_REP_FULL_ELECTION_TIMEOUT">DB_REP_FULL_ELECTION_TIMEOUT</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/db_put.html#2">DB_REP_HANDLE_DEAD</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_timeout </td><td>&nbsp;<a href="../api_c/rep_timeout.html#DB_REP_HEARTBEAT_MONITOR">DB_REP_HEARTBEAT_MONITOR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_timeout </td><td>&nbsp;<a href="../api_c/rep_timeout.html#DB_REP_HEARTBEAT_SEND">DB_REP_HEARTBEAT_SEND</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_process_message </td><td>&nbsp;<a href="../api_c/rep_message.html#DB_REP_HOLDELECTION">DB_REP_HOLDELECTION</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_process_message </td><td>&nbsp;<a href="../api_c/rep_message.html#DB_REP_IGNORE">DB_REP_IGNORE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_process_message </td><td>&nbsp;<a href="../api_c/rep_message.html#DB_REP_ISPERM">DB_REP_ISPERM</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_process_message </td><td>&nbsp;<a href="../api_c/rep_message.html#DB_REP_JOIN_FAILURE">DB_REP_JOIN_FAILURE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_config </td><td>&nbsp;<a href="../api_c/rep_config.html#DB_REP_LEASE_EXPIRED">DB_REP_LEASE_EXPIRED</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_timeout </td><td>&nbsp;<a href="../api_c/rep_timeout.html#DB_REP_LEASE_TIMEOUT">DB_REP_LEASE_TIMEOUT</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/db_put.html#3">DB_REP_LOCKOUT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_start </td><td>&nbsp;<a href="../api_c/rep_start.html#DB_REP_MASTER">DB_REP_MASTER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_start </td><td>&nbsp;<a href="../api_c/repmgr_start.html#DB_REP_MASTER">DB_REP_MASTER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_process_message </td><td>&nbsp;<a href="../api_c/rep_message.html#DB_REP_NEWSITE">DB_REP_NEWSITE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_transport </td><td>&nbsp;<a href="../api_c/rep_transport.html#DB_REP_NOBUFFER">DB_REP_NOBUFFER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_process_message </td><td>&nbsp;<a href="../api_c/rep_message.html#DB_REP_NOTPERM">DB_REP_NOTPERM</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_transport </td><td>&nbsp;<a href="../api_c/rep_transport.html#DB_REP_PERMANENT">DB_REP_PERMANENT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_set_transport </td><td>&nbsp;<a href="../api_c/rep_transport.html#DB_REP_REREQUEST">DB_REP_REREQUEST</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/rep_elect.html#2">DB_REP_UNAVAIL</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_REVSPLITOFF">DB_REVSPLITOFF</a></td></tr>
<tr><td align=right>DB-&gt;exists </td><td>&nbsp;<a href="../api_c/db_exists.html#DB_RMW">DB_RMW</a></td></tr>
<tr><td align=right>DB-&gt;get </td><td>&nbsp;<a href="../api_c/db_get.html#DB_RMW">DB_RMW</a></td></tr>
<tr><td align=right>DB-&gt;join </td><td>&nbsp;<a href="../api_c/db_join.html#DB_RMW">DB_RMW</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_RMW">DB_RMW</a></td></tr>
<tr><td align=right>db_env_create </td><td>&nbsp;<a href="../api_c/env_class.html#DB_RPCCLIENT">DB_RPCCLIENT</a></td></tr>
<tr><td align=right>Error returns to applications </td><td>&nbsp;<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a></td></tr>
<tr><td align=right>DB-&gt;verify </td><td>&nbsp;<a href="../api_c/db_verify.html#DB_SALVAGE">DB_SALVAGE</a></td></tr>
<tr><td align=right>Error returns to applications </td><td>&nbsp;<a href="../ref/program/errorret.html#DB_SECONDARY_BAD">DB_SECONDARY_BAD</a></td></tr>
<tr><td align=right>DB_SEQUENCE-&gt;set_flags </td><td>&nbsp;<a href="../api_c/seq_set_flags.html#DB_SEQ_DEC">DB_SEQ_DEC</a></td></tr>
<tr><td align=right>DB_SEQUENCE-&gt;set_flags </td><td>&nbsp;<a href="../api_c/seq_set_flags.html#DB_SEQ_INC">DB_SEQ_INC</a></td></tr>
<tr><td align=right>DB_SEQUENCE-&gt;set_flags </td><td>&nbsp;<a href="../api_c/seq_set_flags.html#DB_SEQ_WRAP">DB_SEQ_WRAP</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_SET">DB_SET</a></td></tr>
<tr><td align=right>DB_LOGC-&gt;get </td><td>&nbsp;<a href="../api_c/logc_get.html#DB_SET">DB_SET</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_timeout </td><td>&nbsp;<a href="../api_c/env_set_timeout.html#DB_SET_LOCK_TIMEOUT">DB_SET_LOCK_TIMEOUT</a></td></tr>
<tr><td align=right>DB_TXN-&gt;set_timeout </td><td>&nbsp;<a href="../api_c/txn_set_timeout.html#DB_SET_LOCK_TIMEOUT">DB_SET_LOCK_TIMEOUT</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_SET_RANGE">DB_SET_RANGE</a></td></tr>
<tr><td align=right>DB-&gt;get </td><td>&nbsp;<a href="../api_c/db_get.html#DB_SET_RECNO">DB_SET_RECNO</a></td></tr>
<tr><td align=right>DBcursor-&gt;get </td><td>&nbsp;<a href="../api_c/dbc_get.html#DB_SET_RECNO">DB_SET_RECNO</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_timeout </td><td>&nbsp;<a href="../api_c/env_set_timeout.html#DB_SET_TXN_TIMEOUT">DB_SET_TXN_TIMEOUT</a></td></tr>
<tr><td align=right>DB_TXN-&gt;set_timeout </td><td>&nbsp;<a href="../api_c/txn_set_timeout.html#DB_SET_TXN_TIMEOUT">DB_SET_TXN_TIMEOUT</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_SNAPSHOT">DB_SNAPSHOT</a></td></tr>
<tr><td align=right>DB-&gt;stat </td><td>&nbsp;<a href="../api_c/db_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;stat_print </td><td>&nbsp;<a href="../api_c/env_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_stat </td><td>&nbsp;<a href="../api_c/lock_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_stat </td><td>&nbsp;<a href="../api_c/log_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;memp_stat </td><td>&nbsp;<a href="../api_c/memp_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;mutex_stat </td><td>&nbsp;<a href="../api_c/mutex_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_stat </td><td>&nbsp;<a href="../api_c/rep_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_stat </td><td>&nbsp;<a href="../api_c/repmgr_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_stat </td><td>&nbsp;<a href="../api_c/txn_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;stat_print </td><td>&nbsp;<a href="../api_c/env_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_stat </td><td>&nbsp;<a href="../api_c/lock_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;log_stat </td><td>&nbsp;<a href="../api_c/log_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;memp_stat </td><td>&nbsp;<a href="../api_c/memp_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;mutex_stat </td><td>&nbsp;<a href="../api_c/mutex_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;rep_stat </td><td>&nbsp;<a href="../api_c/rep_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;repmgr_stat </td><td>&nbsp;<a href="../api_c/repmgr_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
<tr><td align=right>DB_SEQUENCE-&gt;stat </td><td>&nbsp;<a href="../api_c/seq_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_stat </td><td>&nbsp;<a href="../api_c/txn_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_stat </td><td>&nbsp;<a href="../api_c/lock_stat.html#DB_STAT_LOCK_CONF">DB_STAT_LOCK_CONF</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_stat </td><td>&nbsp;<a href="../api_c/lock_stat.html#DB_STAT_LOCK_LOCKERS">DB_STAT_LOCK_LOCKERS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_stat </td><td>&nbsp;<a href="../api_c/lock_stat.html#DB_STAT_LOCK_OBJECTS">DB_STAT_LOCK_OBJECTS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_stat </td><td>&nbsp;<a href="../api_c/lock_stat.html#DB_STAT_LOCK_PARAMS">DB_STAT_LOCK_PARAMS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;memp_stat </td><td>&nbsp;<a href="../api_c/memp_stat.html#DB_STAT_MEMP_HASH">DB_STAT_MEMP_HASH</a></td></tr>
<tr><td align=right>DB_ENV-&gt;stat_print </td><td>&nbsp;<a href="../api_c/env_stat.html#DB_STAT_SUBSYSTEM">DB_STAT_SUBSYSTEM</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_THREAD">DB_THREAD</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_THREAD">DB_THREAD</a></td></tr>
<tr><td align=right>DB_SEQUENCE-&gt;open </td><td>&nbsp;<a href="../api_c/seq_open.html#DB_THREAD">DB_THREAD</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/env_set_thread_id_string.html#2">DB_THREADID_STRLEN</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_TIME_NOTGRANTED">DB_TIME_NOTGRANTED</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_TRUNCATE">DB_TRUNCATE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_app_dispatch </td><td>&nbsp;<a href="../api_c/env_set_app_dispatch.html#DB_TXN_ABORT">DB_TXN_ABORT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_app_dispatch </td><td>&nbsp;<a href="../api_c/env_set_app_dispatch.html#DB_TXN_APPLY">DB_TXN_APPLY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_app_dispatch </td><td>&nbsp;<a href="../api_c/env_set_app_dispatch.html#DB_TXN_BACKWARD_ROLL">DB_TXN_BACKWARD_ROLL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_app_dispatch </td><td>&nbsp;<a href="../api_c/env_set_app_dispatch.html#DB_TXN_FORWARD_ROLL">DB_TXN_FORWARD_ROLL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
<tr><td align=right>DB_SEQUENCE-&gt;get </td><td>&nbsp;<a href="../api_c/seq_get.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
<tr><td align=right>DB_SEQUENCE-&gt;remove </td><td>&nbsp;<a href="../api_c/seq_remove.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_begin </td><td>&nbsp;<a href="../api_c/txn_begin.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
<tr><td align=right>DB_TXN-&gt;commit </td><td>&nbsp;<a href="../api_c/txn_commit.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
<tr><td align=right>DB-&gt;set_flags </td><td>&nbsp;<a href="../api_c/db_set_flags.html#DB_TXN_NOT_DURABLE">DB_TXN_NOT_DURABLE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_TXN_NOWAIT">DB_TXN_NOWAIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_begin </td><td>&nbsp;<a href="../api_c/txn_begin.html#DB_TXN_NOWAIT">DB_TXN_NOWAIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_app_dispatch </td><td>&nbsp;<a href="../api_c/env_set_app_dispatch.html#DB_TXN_PRINT">DB_TXN_PRINT</a></td></tr>
<tr><td align=right>DB-&gt;cursor </td><td>&nbsp;<a href="../api_c/db_cursor.html#DB_TXN_SNAPSHOT">DB_TXN_SNAPSHOT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_TXN_SNAPSHOT">DB_TXN_SNAPSHOT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_begin </td><td>&nbsp;<a href="../api_c/txn_begin.html#DB_TXN_SNAPSHOT">DB_TXN_SNAPSHOT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_begin </td><td>&nbsp;<a href="../api_c/txn_begin.html#DB_TXN_SYNC">DB_TXN_SYNC</a></td></tr>
<tr><td align=right>DB_TXN-&gt;commit </td><td>&nbsp;<a href="../api_c/txn_commit.html#DB_TXN_SYNC">DB_TXN_SYNC</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_begin </td><td>&nbsp;<a href="../api_c/txn_begin.html#DB_TXN_WAIT">DB_TXN_WAIT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_TXN_WRITE_NOSYNC">DB_TXN_WRITE_NOSYNC</a></td></tr>
<tr><td align=right>DB_ENV-&gt;txn_begin </td><td>&nbsp;<a href="../api_c/txn_begin.html#DB_TXN_WRITE_NOSYNC">DB_TXN_WRITE_NOSYNC</a></td></tr>
<tr><td align=right>DB-&gt;open </td><td>&nbsp;<a href="../api_c/db_open.html#DB_UNKNOWN">DB_UNKNOWN</a></td></tr>
<tr><td align=right>DB-&gt;set_feedback </td><td>&nbsp;<a href="../api_c/db_set_feedback.html#DB_UPGRADE">DB_UPGRADE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_USE_ENVIRON">DB_USE_ENVIRON</a></td></tr>
<tr><td align=right>DB_ENV-&gt;remove </td><td>&nbsp;<a href="../api_c/env_remove.html#DB_USE_ENVIRON">DB_USE_ENVIRON</a></td></tr>
<tr><td align=right>DB_ENV-&gt;open </td><td>&nbsp;<a href="../api_c/env_open.html#DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;remove </td><td>&nbsp;<a href="../api_c/env_remove.html#DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_DEADLOCK">DB_VERB_DEADLOCK</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_FILEOPS">DB_VERB_FILEOPS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_FILEOPS_ALL">DB_VERB_FILEOPS_ALL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_RECOVERY">DB_VERB_RECOVERY</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_REGISTER">DB_VERB_REGISTER</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_REPLICATION">DB_VERB_REPLICATION</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_REPMGR_CONNFAIL">DB_VERB_REPMGR_CONNFAIL</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_REPMGR_MISC">DB_VERB_REPMGR_MISC</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_REP_ELECT">DB_VERB_REP_ELECT</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_REP_LEASE">DB_VERB_REP_LEASE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_REP_MISC">DB_VERB_REP_MISC</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_REP_MSGS">DB_VERB_REP_MSGS</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_REP_SYNC">DB_VERB_REP_SYNC</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_verbose </td><td>&nbsp;<a href="../api_c/env_set_verbose.html#DB_VERB_WAITSFOR">DB_VERB_WAITSFOR</a></td></tr>
<tr><td align=right>DB-&gt;set_feedback </td><td>&nbsp;<a href="../api_c/db_set_feedback.html#DB_VERIFY">DB_VERIFY</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/db_verify.html#2">DB_VERIFY_BAD</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/env_open.html#3">DB_VERSION_MISMATCH</a></td></tr>
<tr><td align=right>DB-&gt;cursor </td><td>&nbsp;<a href="../api_c/db_cursor.html#DB_WRITECURSOR">DB_WRITECURSOR</a></td></tr>
<tr><td align=right>db_create </td><td>&nbsp;<a href="../api_c/db_class.html#DB_XA_CREATE">DB_XA_CREATE</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/txn_prepare.html#2">DB_XIDDATASIZE</a></td></tr>
<tr><td align=right>DB_ENV-&gt;set_flags </td><td>&nbsp;<a href="../api_c/env_set_flags.html#DB_YIELDCPU">DB_YIELDCPU</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/lock/dead.html#2">deadlocks</a></td></tr>
<tr><td align=right>introduction to </td><td>&nbsp;<a href="../ref/debug/intro.html#2">debugging</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/read.html#8">degree</a> 1 isolation</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/read.html#6">degree</a> 2 isolation</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_misc/stability.html#4">degrees</a> of isolation</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/delete.html#2">deleting</a> records</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/curdel.html#2">deleting</a> records with a cursor</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/read.html#10">dirty</a> reads</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_misc/diskspace.html#2">disk</a> space requirements</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/xa/intro.html#2">Distributed</a> Transactions</td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#dlen">dlen</a></td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#doff">doff</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_misc/faq.html#3">double</a> buffering</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/db_set_flags.html#5">duplicate</a> data items</td></tr>
<tr><td align=right>sorted </td><td>&nbsp;<a href="../api_c/db_set_flags.html#6">duplicate</a> data items</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_conf/dup.html#2">duplicate</a> data items</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/curdup.html#2">duplicating</a> a cursor</td></tr>
<tr><td align=right>turn off database </td><td>&nbsp;<a href="../api_c/db_set_flags.html#4">durability</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/truncate.html#3">emptying</a> a database</td></tr>
<tr><td align=right>database </td><td>&nbsp;<a href="../api_c/db_set_flags.html#3">encryption</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/env/encrypt.html#2">encryption</a></td></tr>
<tr><td align=right>turn off access to a database </td><td>&nbsp;<a href="../api_c/env_set_flags.html#8">environment</a></td></tr>
<tr><td align=right>database </td><td>&nbsp;<a href="../ref/env/create.html#2">environment</a></td></tr>
<tr><td align=right>use </td><td>&nbsp;<a href="../api_c/env_open.html#2">environment</a> constants in naming</td></tr>
<tr><td align=right>use </td><td>&nbsp;<a href="../api_c/env_remove.html#2">environment</a> constants in naming</td></tr>
<tr><td align=right>database </td><td>&nbsp;<a href="../ref/env/faq.html#2">environment</a> FAQ</td></tr>
<tr><td align=right>fault database </td><td>&nbsp;<a href="../api_c/env_set_flags.html#9">environment</a> in during open</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/program/environ.html#2">environment</a> variables</td></tr>
<tr><td align=right>introduction to database </td><td>&nbsp;<a href="../ref/env/intro.html#2">environments</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/join.html#2">equality</a> join</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_misc/error.html#2">error</a> handling</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/program/errorret.html#3">error</a> name space</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/program/errorret.html#2">error</a> returns</td></tr>
<tr><td align=right>selecting a Queue </td><td>&nbsp;<a href="../ref/am_conf/extentsize.html#2">extent</a> size</td></tr>
<tr><td align=right>hot </td><td>&nbsp;<a href="../ref/transapp/hotfail.html#2">failover</a></td></tr>
<tr><td align=right>Java </td><td>&nbsp;<a href="../ref/java/faq.html#2">FAQ</a></td></tr>
<tr><td align=right>Tcl </td><td>&nbsp;<a href="../ref/tcl/faq.html#2">FAQ</a></td></tr>
<tr><td align=right>XA </td><td>&nbsp;<a href="../ref/xa/faq.html#2">FAQ</a></td></tr>
<tr><td align=right>configuring without large </td><td>&nbsp;<a href="../ref/build_unix/conf.html#4">file</a> support</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/install/file.html#3">file</a> utility</td></tr>
<tr><td align=right>recovery and </td><td>&nbsp;<a href="../ref/transapp/filesys.html#2">filesystem</a> operations</td></tr>
<tr><td align=right>remote </td><td>&nbsp;<a href="../ref/env/remote.html#2">filesystems</a></td></tr>
<tr><td align=right>page </td><td>&nbsp;<a href="../ref/am_conf/h_ffactor.html#2">fill</a> factor</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/program/ram.html#2">Flash</a> memory configurations</td></tr>
<tr><td align=right>configuring a small memory </td><td>&nbsp;<a href="../ref/build_unix/conf.html#12">footprint</a> library</td></tr>
<tr><td align=right>Berkeley DB </td><td>&nbsp;<a href="../ref/program/scope.html#3">free-threaded</a> handles</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/freebsd.html#2">FreeBSD</a></td></tr>
<tr><td align=right>specifying a database </td><td>&nbsp;<a href="../ref/am_conf/h_hash.html#2">hash</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_conf/h_nelem.html#2">hash</a> table size</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/hpux.html#2">HP-UX</a></td></tr>
<tr><td align=right>secondary </td><td>&nbsp;<a href="../ref/am/second.html#3">indices</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/install.html#2">installing</a> Berkeley DB for UNIX systems</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/program/compatible.html#2">interface</a> compatibility</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/irix.html#2">IRIX</a></td></tr>
<tr><td align=right>degrees of </td><td>&nbsp;<a href="../ref/am_misc/stability.html#5">isolation</a></td></tr>
<tr><td align=right>degree 2 </td><td>&nbsp;<a href="../ref/transapp/read.html#5">isolation</a></td></tr>
<tr><td align=right>degree 1 </td><td>&nbsp;<a href="../ref/transapp/read.html#7">isolation</a></td></tr>
<tr><td align=right>configuring the </td><td>&nbsp;<a href="../ref/build_unix/conf.html#10">Java</a> API</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/java/compat.html#2">Java</a> compatibility</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/java/conf.html#2">Java</a> configuration</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/java/faq.html#3">Java</a> FAQ</td></tr>
<tr><td align=right>equality </td><td>&nbsp;<a href="../ref/am/join.html#3">join</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/dbt_class.html#2">key/data</a> pairs</td></tr>
<tr><td align=right>retrieved </td><td>&nbsp;<a href="../ref/am_misc/perm.html#3">key/data</a> permanence</td></tr>
<tr><td align=right>database </td><td>&nbsp;<a href="../ref/am_misc/dbsizes.html#2">limits</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/linux.html#2">Linux</a></td></tr>
<tr><td align=right>changing compile or </td><td>&nbsp;<a href="../ref/build_unix/flags.html#3">load</a> options</td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#lock">lock</a></td></tr>
<tr><td align=right>standard </td><td>&nbsp;<a href="../ref/lock/stdmode.html#2">lock</a> modes</td></tr>
<tr><td align=right>allocate a </td><td>&nbsp;<a href="../api_c/env_cdsgroup_begin.html#2">locker</a> ID for Berkeley DB Concurrent Data Store</td></tr>
<tr><td align=right>ignore </td><td>&nbsp;<a href="../api_c/env_set_flags.html#5">locking</a></td></tr>
<tr><td align=right>page-level </td><td>&nbsp;<a href="../ref/lock/page.html#2">locking</a></td></tr>
<tr><td align=right>two-phase </td><td>&nbsp;<a href="../ref/lock/twopl.html#2">locking</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/lock/nondb.html#2">locking</a> and non-Berkeley DB applications</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/lock/config.html#2">locking</a> configuration</td></tr>
<tr><td align=right>Berkeley DB Transactional Data Store </td><td>&nbsp;<a href="../ref/lock/am_conv.html#2">locking</a> conventions</td></tr>
<tr><td align=right>Berkeley DB Concurrent Data Store </td><td>&nbsp;<a href="../ref/lock/cam_conv.html#2">locking</a> conventions</td></tr>
<tr><td align=right>configure </td><td>&nbsp;<a href="../api_c/env_set_flags.html#2">locking</a> for Berkeley DB Concurrent Data Store</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/lock/page.html#3">locking</a> granularity</td></tr>
<tr><td align=right>introduction to the </td><td>&nbsp;<a href="../ref/lock/intro.html#2">locking</a> subsystem</td></tr>
<tr><td align=right>sizing the </td><td>&nbsp;<a href="../ref/lock/max.html#2">locking</a> subsystem</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/lock/notxn.html#2">locking</a> without transactions</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/log/limits.html#2">log</a> file limits</td></tr>
<tr><td align=right>automatic </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#4">log</a> file removal</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/logfile.html#2">log</a> file removal</td></tr>
<tr><td align=right>pre-zero </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#6">log</a> files</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/log/config.html#2">logging</a> configuration</td></tr>
<tr><td align=right>introduction to the </td><td>&nbsp;<a href="../ref/log/intro.html#2">logging</a> subsystem</td></tr>
<tr><td align=right>retrieving Btree records by </td><td>&nbsp;<a href="../ref/am_conf/bt_recnum.html#3">logical</a> record @number</td></tr>
<tr><td align=right>in memory </td><td>&nbsp;<a href="../api_c/env_log_set_config.html#5">logs</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/macosx.html#2">Mac</a> OS X</td></tr>
<tr><td align=right>turn off database file </td><td>&nbsp;<a href="../api_c/env_set_flags.html#6">memory</a> mapping</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/mp/config.html#2">memory</a> pool configuration</td></tr>
<tr><td align=right>introduction to the </td><td>&nbsp;<a href="../ref/mp/intro.html#2">memory</a> pool subsystem</td></tr>
<tr><td align=right>configuring for </td><td>&nbsp;<a href="../ref/build_win/faq.html#4">MinGW</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/ext/mod.html#3">mod</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#mode">mode</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/program/copy.html#3">moving</a> databases</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/read.html#12">multiversion</a> concurrency control</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/read.html#13">MVCC</a></td></tr>
<tr><td align=right>Berkeley DB library </td><td>&nbsp;<a href="../ref/program/namespace.html#2">name</a> spaces</td></tr>
<tr><td align=right>file </td><td>&nbsp;<a href="../ref/env/naming.html#2">naming</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/join.html#4">natural</a> join</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/env/remote.html#3">NFS</a> problems</td></tr>
<tr><td align=right>retrieving Btree records by logical record </td><td>&nbsp;<a href="../ref/am_conf/bt_recnum.html#2">number</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#obj">obj</a></td></tr>
<tr><td align=right>DB_ENV-&gt;lock_vec </td><td>&nbsp;<a href="../api_c/lock_vec.html#op">op</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/open.html#2">opening</a> a database</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/db_set_flags.html#10">ordered</a> retrieval of records from Queue databases</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/osf1.html#2">OSF/1</a></td></tr>
<tr><td align=right>selecting a </td><td>&nbsp;<a href="../ref/am_conf/pagesize.html#2">page</a> size</td></tr>
<tr><td align=right>ignore database environment </td><td>&nbsp;<a href="../api_c/env_set_flags.html#7">panic</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_misc/partial.html#2">partial</a> record storage and retrieval</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="http://www.oracle.com/technology/software/products/berkeley-db/db/index.html">Patches,</a> Updates and Change logs</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/ext/perl.html#2">Perl</a></td></tr>
<tr><td align=right>retrieved key/data </td><td>&nbsp;<a href="../ref/am_misc/perm.html#2">permanence</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/ext/php.html#2">PHP</a></td></tr>
<tr><td align=right>task/thread </td><td>&nbsp;<a href="../ref/program/faq.html#2">priority</a></td></tr>
<tr><td align=right>Berkeley DB </td><td>&nbsp;<a href="../ref/intro/products.html#2">products</a></td></tr>
<tr><td align=right>building for </td><td>&nbsp;<a href="../ref/build_unix/intro.html#5">QNX</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/qnx.html#2">QNX</a></td></tr>
<tr><td align=right>dirty </td><td>&nbsp;<a href="../ref/transapp/read.html#9">reads</a></td></tr>
<tr><td align=right>accessing Btree records by </td><td>&nbsp;<a href="../api_c/db_set_flags.html#7">record</a> number</td></tr>
<tr><td align=right>logical </td><td>&nbsp;<a href="../ref/am_conf/logrec.html#2">record</a> numbers</td></tr>
<tr><td align=right>managing </td><td>&nbsp;<a href="../ref/am_conf/recno.html#2">record-based</a> databases</td></tr>
<tr><td align=right>logically renumbering </td><td>&nbsp;<a href="../ref/am_conf/renumber.html#2">records</a></td></tr>
<tr><td align=right>Berkeley DB </td><td>&nbsp;<a href="../ref/transapp/reclimit.html#2">recoverability</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/db_set_flags.html#11">renumbering</a> records in Recno databases</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/read.html#2">repeatable</a> reads</td></tr>
<tr><td align=right>introduction to </td><td>&nbsp;<a href="../ref/rep/intro.html#2">replication</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/xa/intro.html#3">Resource</a> Manager</td></tr>
<tr><td align=right>XA </td><td>&nbsp;<a href="../ref/xa/xa_intro.html#3">Resource</a> Manager</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/get.html#2">retrieving</a> records</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_misc/get_bulk.html#2">retrieving</a> records in bulk</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/curget.html#2">retrieving</a> records with a cursor</td></tr>
<tr><td align=right>turn off </td><td>&nbsp;<a href="../api_c/db_set_flags.html#8">reverse</a> splits in Btree databases</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/rpc/client.html#2">RPC</a> client</td></tr>
<tr><td align=right>configuring a </td><td>&nbsp;<a href="../ref/build_unix/conf.html#11">RPC</a> client/server</td></tr>
<tr><td align=right>introduction to </td><td>&nbsp;<a href="../ref/rpc/intro.html#2">rpc</a> client/server</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/rpc/faq.html#2">RPC</a> FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/rpc/server.html#2">RPC</a> server</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_s60/notes.html#2">S60</a> notes</td></tr>
<tr><td align=right>database </td><td>&nbsp;<a href="../ref/am/verify.html#3">salvage</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/sco.html#2">SCO</a></td></tr>
<tr><td align=right>Berkeley DB handle </td><td>&nbsp;<a href="../ref/program/scope.html#2">scope</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/second.html#2">secondary</a> indices</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/env/security.html#2">security</a></td></tr>
<tr><td align=right>introduction to </td><td>&nbsp;<a href="../ref/sequence/intro.html#2">sequences</a></td></tr>
<tr><td align=right>disabling </td><td>&nbsp;<a href="../ref/build_unix/conf.html#5">shared</a> libraries</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/shlib.html#2">shared</a> libraries</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/program/appsignals.html#2">signal</a> handling</td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#size">size</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/read.html#11">snapshot</a> isolation</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/solaris.html#2">Solaris</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/distrib/layout.html#2">source</a> code layout</td></tr>
<tr><td align=right>turn off reverse </td><td>&nbsp;<a href="../api_c/db_set_flags.html#9">splits</a> in Btree databases</td></tr>
<tr><td align=right>cursor </td><td>&nbsp;<a href="../ref/am_misc/stability.html#3">stability</a></td></tr>
<tr><td align=right>cursor </td><td>&nbsp;<a href="../ref/transapp/read.html#3">stability</a></td></tr>
<tr><td align=right>disabling </td><td>&nbsp;<a href="../ref/build_unix/conf.html#6">static</a> libraries</td></tr>
<tr><td align=right>database </td><td>&nbsp;<a href="../ref/am/stat.html#2">statistics</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/put.html#2">storing</a> records</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/curput.html#2">storing</a> records with a cursor</td></tr>
<tr><td align=right>configure for </td><td>&nbsp;<a href="../api_c/env_set_flags.html#12">stress</a> testing</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/sunos.html#2">SunOS</a></td></tr>
<tr><td align=right>loading Berkeley DB with </td><td>&nbsp;<a href="../ref/tcl/intro.html#2">Tcl</a></td></tr>
<tr><td align=right>using Berkeley DB with </td><td>&nbsp;<a href="../ref/tcl/using.html#2">Tcl</a></td></tr>
<tr><td align=right>configuring the </td><td>&nbsp;<a href="../ref/build_unix/conf.html#13">Tcl</a> API</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/tcl/program.html#2">Tcl</a> API programming notes</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/tcl/faq.html#3">Tcl</a> FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../api_c/env_set_tmp_dir.html#2">temporary</a> files</td></tr>
<tr><td align=right>configuring the </td><td>&nbsp;<a href="../ref/build_unix/conf.html#14">test</a> suite</td></tr>
<tr><td align=right>running the </td><td>&nbsp;<a href="../ref/test/run.html#2">test</a> suite</td></tr>
<tr><td align=right>running the </td><td>&nbsp;<a href="../ref/build_unix/test.html#2">test</a> suite under UNIX</td></tr>
<tr><td align=right>running the </td><td>&nbsp;<a href="../ref/build_win/test.html#2">test</a> suite under Windows</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am_conf/re_source.html#2">text</a> backing files</td></tr>
<tr><td align=right>pre-loading </td><td>&nbsp;<a href="../api_c/db_set_flags.html#12">text</a> files into Recno databases</td></tr>
<tr><td align=right>loading </td><td>&nbsp;<a href="../ref/dumpload/text.html#2">text</a> into databases</td></tr>
<tr><td align=right>dumping/loading </td><td>&nbsp;<a href="../ref/dumpload/utility.html#2">text</a> to/from databases</td></tr>
<tr><td align=right>building </td><td>&nbsp;<a href="../ref/program/mt.html#2">threaded</a> applications</td></tr>
<tr><td align=right>lock </td><td>&nbsp;<a href="../ref/lock/timeout.html#2">timeouts</a></td></tr>
<tr><td align=right>transaction </td><td>&nbsp;<a href="../ref/lock/timeout.html#3">timeouts</a></td></tr>
<tr><td align=right>turn off synchronous </td><td>&nbsp;<a href="../api_c/env_set_flags.html#10">transaction</a> commit</td></tr>
<tr><td align=right>turn off synchronous </td><td>&nbsp;<a href="../api_c/env_set_flags.html#11">transaction</a> commit</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/txn/config.html#2">transaction</a> configuration</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/faq.html#2">transaction</a> FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/txn/limits.html#2">transaction</a> limits</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/xa/build.html#2">Transaction</a> Manager</td></tr>
<tr><td align=right>administering </td><td>&nbsp;<a href="../ref/transapp/admin.html#2">transaction</a> protected applications</td></tr>
<tr><td align=right>archival in </td><td>&nbsp;<a href="../ref/transapp/archival.html#2">transaction</a> protected applications</td></tr>
<tr><td align=right>checkpoints in </td><td>&nbsp;<a href="../ref/transapp/checkpoint.html#2">transaction</a> protected applications</td></tr>
<tr><td align=right>deadlock detection in </td><td>&nbsp;<a href="../ref/transapp/deadlock.html#2">transaction</a> protected applications</td></tr>
<tr><td align=right>recovery in </td><td>&nbsp;<a href="../ref/transapp/recovery.html#2">transaction</a> protected applications</td></tr>
<tr><td align=right>introduction to the </td><td>&nbsp;<a href="../ref/txn/intro.html#2">transaction</a> subsystem</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/throughput.html#2">transaction</a> throughput</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/tune.html#2">transaction</a> tuning</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/transapp/intro.html#2">Transactional</a> Data Store</td></tr>
<tr><td align=right>nested </td><td>&nbsp;<a href="../ref/transapp/nested.html#2">transactions</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/truncate.html#2">truncating</a> a database</td></tr>
<tr><td align=right>access method </td><td>&nbsp;<a href="../ref/am_misc/tune.html#3">tuning</a></td></tr>
<tr><td align=right>transaction </td><td>&nbsp;<a href="../ref/transapp/tune.html#3">tuning</a></td></tr>
<tr><td align=right>configuring Berkeley DB with the </td><td>&nbsp;<a href="../ref/xa/xa_config.html#2">Tuxedo</a> System</td></tr>
<tr><td align=right>DBT </td><td>&nbsp;<a href="../api_c/dbt_class.html#ulen">ulen</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_unix/ultrix.html#2">Ultrix</a></td></tr>
<tr><td align=right>building for </td><td>&nbsp;<a href="../ref/build_unix/intro.html#4">UNIX</a></td></tr>
<tr><td align=right>building for </td><td>&nbsp;<a href="../ref/build_unix/notes.html#3">UNIX</a> FAQ</td></tr>
<tr><td align=right>configuring Berkeley DB for </td><td>&nbsp;<a href="../ref/build_unix/conf.html#3">UNIX</a> systems</td></tr>
<tr><td align=right>Patches, </td><td>&nbsp;<a href="http://www.oracle.com/technology/software/products/berkeley-db/db/index.html">Updates</a> and Change logs</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/am/upgrade.html#2">upgrading</a> databases</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.2.0/toc.html#2">Upgrading</a> to release 2.0</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.3.0/toc.html#2">Upgrading</a> to release 3.0</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.3.1/toc.html#2">Upgrading</a> to release 3.1</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.3.2/toc.html#2">Upgrading</a> to release 3.2</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.3.3/toc.html#2">Upgrading</a> to release 3.3</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.4.0/toc.html#2">Upgrading</a> to release 4.0</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.4.1/toc.html#2">Upgrading</a> to release 4.1</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.4.2/toc.html#2">Upgrading</a> to release 4.2</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.4.3/toc.html#2">Upgrading</a> to release 4.3</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.4.4/toc.html#2">Upgrading</a> to release 4.4</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.4.5/toc.html#2">Upgrading</a> to release 4.5</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.4.6/toc.html#2">Upgrading</a> to release 4.6</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/upgrade.4.7/toc.html#2">Upgrading</a> to release 4.7</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/arch/utilities.html#2">utilities</a></td></tr>
<tr><td align=right>database </td><td>&nbsp;<a href="../ref/am/verify.html#2">verification</a></td></tr>
<tr><td align=right>building for </td><td>&nbsp;<a href="../ref/build_vxworks/faq.html#3">VxWorks</a> FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_vxworks/notes.html#2">VxWorks</a> notes</td></tr>
<tr><td align=right>running the test suite under </td><td>&nbsp;<a href="../ref/build_win/test.html#3">Windows</a></td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_wince/notes.html#2">Windows</a> CE notes</td></tr>
<tr><td align=right>building for </td><td>&nbsp;<a href="../ref/build_win/faq.html#3">Windows</a> FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/build_win/notes.html#2">Windows</a> notes</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/xa/faq.html#3">XA</a> FAQ</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/xa/xa_intro.html#2">XA</a> Resource Manager</td></tr>
<tr><td align=right></td><td>&nbsp;<a href="../ref/env/region.html#2">__db.001</a></td></tr>
</table>
</center>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,189 @@
<!--$Id: db_associate.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;associate</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;associate</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;associate(DB *primary, DB_TXN *txnid, DB *secondary,
int (*callback)(DB *secondary,
const DBT *key, const DBT *data, DBT *result), u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;associate</b>
<p>The DB-&gt;associate function is used to declare one database a
secondary index for a primary database. After a secondary database has
been "associated" with a primary database, all updates to the primary
will be automatically reflected in the secondary and all reads from the
secondary will return corresponding data from the primary. Note that
as primary keys must be unique for secondary indices to work, the
primary database must be configured without support for duplicate data
items. See <a href="../ref/am/second.html">Secondary indices</a> for
more information.</p>
<p>The DB-&gt;associate method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>callback</b><ul compact><li>The <b>callback</b> parameter is a callback function that creates the
set of secondary keys corresponding to a given primary key and data
pair.
<p>The callback parameter may be NULL if both the primary and secondary
database handles were opened with the <a href="../api_c/db_open.html#DB_RDONLY">DB_RDONLY</a> flag.</p>
<p>The callback takes four arguments:</p>
<br>
<b><b>secondary</b></b><ul compact><li>The <b>secondary</b> parameter is the database handle for the secondary.</ul>
<b><b>key</b></b><ul compact><li>The <b>key</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a> referencing the primary key.</ul>
<b><b>data</b></b><ul compact><li>The <b>data</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a> referencing the primary data
item.</ul>
<b><b>result</b></b><ul compact><li>The <b>result</b> parameter is a zeroed <a href="../api_c/dbt_class.html">DBT</a> in which the callback
function should fill in <b>data</b> and <b>size</b> fields that describe
the secondary key or keys.</ul>
<br>
<p>The callback optionally returns some special values:</p>
<br>
<b><a name="DB_DBT_APPMALLOC">DB_DBT_APPMALLOC</a></b><ul compact><li>If the callback function needs to allocate memory for the <b>result</b>
data field (rather than simply pointing into the primary key or datum),
DB_DBT_APPMALLOC should be set in the <b>flags</b> field of the
<b>result</b> <a href="../api_c/dbt_class.html">DBT</a>, which indicates that Berkeley DB should free the
memory when it is done with it.</ul>
<b><a name="DB_DBT_MULTIPLE">DB_DBT_MULTIPLE</a></b><ul compact><li>To return multiple secondary keys, DB_DBT_MULTIPLE should be set
in the <b>flags</b> field of the <b>result</b> <a href="../api_c/dbt_class.html">DBT</a>, which
indicates Berkeley DB should treat the <b>size</b> field as the number of
secondary keys (zero or more), and the <b>data</b> field as a pointer
to an array of that number of <a href="../api_c/dbt_class.html">DBT</a>s describing the set of
secondary keys.
<p><b>When multiple secondary keys are returned, keys may not be repeated</b>.
In other words, there must be no repeated record numbers in the array
for Recno and Queue databases, and keys must not compare equally using
the secondary database's comparison function for Btree and Hash
databases. If keys are repeated, operations may fail and the secondary
may become inconsistent with the primary.</p>
<p>The DB_DBT_APPMALLOC flag may be set for any <a href="../api_c/dbt_class.html">DBT</a> in the
array of returned <a href="../api_c/dbt_class.html">DBT</a>'s to indicate that Berkeley DB should free the
memory referenced by that particular <a href="../api_c/dbt_class.html">DBT</a>'s data field when it
is done with it.</p>
<p>The DB_DBT_APPMALLOC flag may be combined with
DB_DBT_MULTIPLE in the <b>result</b> <a href="../api_c/dbt_class.html">DBT</a>'s <b>flag</b>
field to indicate that Berkeley DB should free the array once it is done with
all of the returned keys.</p></ul>
<b><a name="DB_DONOTINDEX">DB_DONOTINDEX</a></b><ul compact><li>If any key/data pair in the primary yields a null secondary key and
should be left out of the secondary index, the callback function may
optionally return DB_DONOTINDEX. Otherwise, the callback
function should return 0 in case of success or an error outside of the
Berkeley DB name space in case of failure; the error code will be returned
from the Berkeley DB call that initiated the callback.
<p>If the callback function returns DB_DONOTINDEX for any key/data
pairs in the primary database, the secondary index will not contain any
reference to those key/data pairs, and such operations as cursor
iterations and range queries will reflect only the corresponding subset
of the database. If this is not desirable, the application should
ensure that the callback function is well-defined for all possible
values and never returns DB_DONOTINDEX.</p>
<p>Returning DB_DONOTINDEX is equivalent to setting
DB_DBT_MULTIPLE on the <b>result</b> <a href="../api_c/dbt_class.html">DBT</a> and setting
the <b>size</b> field to zero.</p></ul>
<br>
<p>Berkeley DB is not re-entrant. Callback functions should not attempt to make
library calls (for example, to release locks or close open handles).
Re-entering Berkeley DB is not guaranteed to work correctly, and the results
are undefined.</p></ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<br>
<b><a name="DB_CREATE">DB_CREATE</a></b><ul compact><li>If the secondary database is empty, walk through the primary and create
an index to it in the empty secondary. This operation is potentially
very expensive.
<p>If the secondary database has been opened in an environment configured
with transactions, each put necessary for its creation will be done in
the context of a transaction created for the purpose.</p>
<p>Care should be taken not to use a newly-populated secondary database in
another thread of control until the DB-&gt;associate call has
returned successfully in the first thread.</p>
<p>If transactions are not being used, care should be taken not to modify
a primary database being used to populate a secondary database, in
another thread of control, until the DB-&gt;associate call has
returned successfully in the first thread. If transactions are being
used, Berkeley DB will perform appropriate locking and the application need
not do any special operation ordering.</p></ul>
<b><a name="DB_IMMUTABLE_KEY">DB_IMMUTABLE_KEY</a></b><ul compact><li>Specifies the secondary key is immutable.
<p>This flag can be used to optimize updates when the secondary key in a
primary record will never be changed after the primary record is
inserted. For immutable secondary keys, a best effort is made to avoid
calling the secondary callback function when primary records are
updated. This optimization may reduce the overhead of update operations
significantly if the callback function is expensive.</p>
<p>Be sure to specify this flag only if the secondary key in the primary
record is never changed. If this rule is violated, the secondary index
will become corrupted, that is, it will become out of sync with the
primary.</p></ul>
<br></ul>
<b>primary</b><ul compact><li>The <b>primary</b> parameter should be a database handle for the primary
database that is to be indexed.</ul>
<b>secondary</b><ul compact><li>The <b>secondary</b> parameter should be an open database handle of
either a newly created and empty database that is to be used to store
a secondary index, or of a database that was previously associated with
the same primary and contains a secondary index. Note that it is not
safe to associate as a secondary database a handle that is in use by
another thread of control or has open cursors. If the handle was opened
with the <a href="../api_c/env_open.html#DB_THREAD">DB_THREAD</a> flag it is safe to use it in multiple threads
of control after the DB-&gt;associate method has returned. Note also
that either secondary keys must be unique or the secondary database must
be configured with support for duplicate data items.</ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
operation occurs in a transactional
database,
the operation will be implicitly transaction protected.
</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;associate method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If the secondary database handle has already been associated with this or
another database handle; the secondary database handle is not open; the
primary database has been configured to allow duplicates; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

97
docs/api_c/db_class.html Normal file
View File

@@ -0,0 +1,97 @@
<!--$Id: db_class.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: db_create</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>db_create</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
typedef struct __db DB;
<p>
int
db_create(DB **dbp, DB_ENV *dbenv, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: db_create</b>
<p>The DB handle is the handle for a Berkeley DB database, which may or
may not be part of a database environment.</p>
<p>DB handles are free-threaded if the <a href="../api_c/env_open.html#DB_THREAD">DB_THREAD</a> flag is
specified to the <a href="../api_c/db_open.html">DB-&gt;open</a> method when the database is opened or if the
database environment in which the database is opened is free-threaded.
The handle should not be closed while any other handle that refers to
the database is in use; for example, database handles must not be closed
while cursor handles into the database remain open, or transactions that
include operations on the database have not yet been committed or
aborted. Once the <a href="../api_c/db_close.html">DB-&gt;close</a>, <a href="../api_c/db_remove.html">DB-&gt;remove</a>,
<a href="../api_c/db_rename.html">DB-&gt;rename</a>, or <a href="../api_c/db_verify.html">DB-&gt;verify</a> methods are called, the handle may
not be accessed again, regardless of the method's return.</p>
<p>The db_create function creates a DB structure that is
the handle for a Berkeley DB database. This function allocates memory for the
structure, returning a pointer to the structure in the memory to which
<b>dbp</b> refers. To release the allocated memory and discard the
handle, call the <a href="../api_c/db_close.html">DB-&gt;close</a>, <a href="../api_c/db_remove.html">DB-&gt;remove</a>,
<a href="../api_c/db_rename.html">DB-&gt;rename</a>, or <a href="../api_c/db_verify.html">DB-&gt;verify</a> methods.</p>
<p>The DB handle contains a special field, "app_private", which is
declared as type "void *". This field is provided for the use of the
application program. It is initialized to NULL and is not further used
by Berkeley DB in any way.</p>
<p>The db_create method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>dbp</b><ul compact><li>The <b>dbp</b> parameter references the memory into which the returned
structure pointer is stored.</ul>
<b>dbenv</b><ul compact><li>If the <b>dbenv</b> parameter is NULL, the database is standalone; that
is, it is not part of any Berkeley DB environment.
<p>If the <b>dbenv</b> parameter is not NULL, the database is created
within the specified Berkeley DB environment. The database access methods
automatically make calls to the other subsystems in Berkeley DB, based on the
enclosing environment. For example, if the environment has been
configured to use locking, the access methods will automatically acquire
the correct locks when reading and writing pages of the database.</p></ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_XA_CREATE">DB_XA_CREATE</a></b><ul compact><li>Instead of creating a standalone database, create a database intended
to be accessed via applications running under an X/Open conformant
Transaction Manager. The database will be opened in the environment
specified by the OPENINFO parameter of the GROUPS section of the
ubbconfig file. See the <a href="../ref/xa/xa_intro.html">XA
Introduction</a> section in the Berkeley DB Reference Guide for more information.</ul>
<br></ul>
<br>
<br><b>Errors</b>
<p>The db_create method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
DB
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

91
docs/api_c/db_close.html Normal file
View File

@@ -0,0 +1,91 @@
<!--$Id: db_close.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;close</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;close</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;close(DB *db, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;close</b>
<p>The DB-&gt;close method flushes any cached database information to disk,
closes any open cursors, frees any allocated resources, and closes any
underlying files.</p>
<p>The <a href="../api_c/db_class.html">DB</a> handle should not be closed while any other handle that
refers to it is not yet closed; for example, database handles must not
be closed while cursor handles into the database remain open, or
transactions that include operations on the database have not yet been
committed or aborted. Specifically, this includes <a href="../api_c/dbc_class.html">DBC</a> and
<a href="../api_c/txn_class.html">DB_TXN</a> handles.</p>
<p>Because key/data pairs are cached in memory, failing to sync the file
with the DB-&gt;close or <a href="../api_c/db_sync.html">DB-&gt;sync</a> method may result in
inconsistent or lost information.</p>
<p>When called on a database that is the primary database for a secondary
index, the primary database should be closed only after all secondary
indices which reference it have been closed.</p>
<p>When multiple threads are using the <a href="../api_c/db_class.html">DB</a> concurrently, only a single
thread may call the DB-&gt;close method.</p>
<p>The <a href="../api_c/db_class.html">DB</a> handle may not be accessed again after DB-&gt;close is
called, regardless of its return.</p>
<p>The DB-&gt;close method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<br>
<b><a name="DB_NOSYNC">DB_NOSYNC</a></b><ul compact><li>Do not flush cached information to disk. The <a href="../api_c/db_close.html#DB_NOSYNC">DB_NOSYNC</a> flag is
a dangerous option. It should be set only if the application is doing
logging (with transactions) so that the database is recoverable after
a system or application crash, or if the database is always generated
from scratch after any system or application crash.
<p><b>It is important to understand that flushing cached information to disk
only minimizes the window of opportunity for corrupted data.</b> Although
unlikely, it is possible for database corruption to happen if a system
or application crash occurs while writing data to the database. To
ensure that database corruption never occurs, applications must either:
use transactions and logging with automatic recovery; use logging and
application-specific recovery; or edit a copy of the database, and once
all applications using the database have successfully called
DB-&gt;close, atomically replace the original database with the
updated copy.</p></ul>
<br></ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;close method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

140
docs/api_c/db_compact.html Normal file
View File

@@ -0,0 +1,140 @@
<!--$Id: db_compact.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;compact</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;compact</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;compact(DB *db, DB_TXN *txnid,
DBT *start, DBT *stop, DB_COMPACT *c_data, u_int32_t flags, DBT *end);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;compact</b>
<p>The DB-&gt;compact method compacts Btree and Recno access method
databases, and optionally returns unused Btree, Hash or Recno database
pages to the underlying filesystem.</p>
<p>The DB-&gt;compact method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; otherwise NULL. If no transaction handle is
specified, but the operation occurs in a transactional database, the
operation will be implicitly transaction protected using multiple
transactions. These transactions will be periodically committed to
avoid locking large sections of the tree. Any deadlocks encountered
cause the compaction operation to retried from the point of the last
transaction commit.</ul>
<b>start</b><ul compact><li>If non-NULL, the <b>start</b> parameter is the starting point for
compaction in a Btree or Recno database. Compaction will start at the
smallest key greater than or equal to the specified key. If NULL,
compaction will start at the beginning of the database.</ul>
<b>stop</b><ul compact><li>If non-NULL, the <b>stop</b> parameter is the stopping point for
compaction in a Btree or Recno database. Compaction will stop at the
page with the smallest key greater than the specified key. If NULL,
compaction will stop at the end of the database.</ul>
<b>c_data</b><ul compact><li><p>If non-NULL, the <b>c_data</b> parameter contains additional compaction
configuration parameters, and returns compaction operation statistics,
in a structure of type DB_COMPACT.</p>
<p>The following input configuration fields are available from the
DB_COMPACT structure:</p>
<br>
<b>int compact_fillpercent;</b><ul compact><li>If non-zero, the goal for filling pages, specified as a percentage
between 1 and 100. Any page in a Btree or Recno databases not at or
above this percentage full will be considered for compaction. The
default behavior is to consider every page for compaction, regardless
of its page fill percentage.</ul>
<b>int compact_pages;</b><ul compact><li>If non-zero, the call will return after that number of pages have been
freed.</ul>
<b>db_timeout_t compact_timeout;</b><ul compact><li>If non-zero, and no <b>txnid</b> parameter was specified, the lock
timeout set for implicit transactions, in microseconds.</ul>
<br>
<p>The following output statistics fields are available from the
DB_COMPACT structure:</p>
<br>
<b>u_int32_t compact_deadlock;</b><ul compact><li>An output statistics parameter: if no <b>txnid</b> parameter was
specified, the number of deadlocks which occurred.</ul>
<b>u_int32_t compact_pages_examine;</b><ul compact><li>An output statistics parameter: the number of database pages reviewed
during the compaction phase.</ul>
<b>u_int32_t compact_pages_free;</b><ul compact><li>An output statistics parameter: the number of database pages freed during
the compaction phase.</ul>
<b>u_int32_t compact_levels;</b><ul compact><li>An output statistics parameter: the number of levels removed from the
Btree or Recno database during the compaction phase.</ul>
<b>u_int32_t compact_pages_truncated;</b><ul compact><li>An output statistics parameter: the number of database pages returned
to the filesystem.</ul>
<br></ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
one of the following values:
<br>
<b><a name="DB_FREELIST_ONLY">DB_FREELIST_ONLY</a></b><ul compact><li>Do no page compaction, only returning pages to the filesystem that are
already free and at the end of the file. This flag must be set if the
database is a Hash access method database.</ul>
<b><a name="DB_FREE_SPACE">DB_FREE_SPACE</a></b><ul compact><li>Return pages to the filesystem when possible.
If this flag is not specified, pages emptied as a result of compaction
will be placed on the free list for re-use, but never returned to the
filesystem.
<p>Note that only pages at the end of a file can be returned to the
filesystem. Because of the one-pass nature of the compaction algorithm,
any not emptied page near the end of the file inhibits returning pages to
the file system. A repeated call to the DB-&gt;compact method with a low
<b>compact_fillpercent</b> may be used to return pages in this case.</p></ul>
<br></ul>
<b>end</b><ul compact><li>If non-NULL, the <b>end</b> parameter will be filled in with the
database key marking the end of the compaction operation in a Btree or
Recno database. This is generally the first key of the page where the
operation stopped.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;compact method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EACCES</b><ul compact><li>An attempt was made to modify a read-only database.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

97
docs/api_c/db_cursor.html Normal file
View File

@@ -0,0 +1,97 @@
<!--$Id: db_cursor.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;cursor</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;cursor</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;cursor(DB *db,
DB_TXN *txnid, DBC **cursorp, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;cursor</b>
<p>The DB-&gt;cursor method returns a created database cursor.</p>
<p>Cursors may span threads, but only serially, that is, the application
must serialize access to the cursor handle.</p>
<p>The DB-&gt;cursor method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>cursorp</b><ul compact><li>The <b>cursorp</b> parameter references memory into which
a pointer to the allocated cursor is copied.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<br>
<b><a name="DB_READ_COMMITTED">DB_READ_COMMITTED</a></b><ul compact><li>Configure a transactional cursor to have degree 2 isolation. This ensures
the stability of the current data item read by this cursor but permits data
read by this cursor to be modified or deleted prior to the commit of the
transaction for this cursor.</ul>
<b><a name="DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></b><ul compact><li>Configure a transactional cursor to have degree 1 isolation. Read
operations performed by the cursor may return modified but not yet
committed data. Silently ignored if the <a href="../api_c/db_open.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a>
flag was not specified when the underlying database was opened.</ul>
<b><a name="DB_WRITECURSOR">DB_WRITECURSOR</a></b><ul compact><li>Specify that the cursor will be used to update the database. The
underlying database environment must have been opened using the
<a href="../api_c/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a> flag.</ul>
<b><a name="DB_TXN_SNAPSHOT">DB_TXN_SNAPSHOT</a></b><ul compact><li>Configure a transactional cursor to operate with read-only
<a href="../ref/transapp/read.html">snapshot isolation</a>. For databases
with the <a href="../api_c/db_open.html#DB_MULTIVERSION">DB_MULTIVERSION</a> flag set, data values will be read as
they are when the cursor is opened, without taking read locks. This
flag implicitly begins a transaction that is committed when the cursor
is closed. Silently ignored if <a href="../api_c/db_open.html#DB_MULTIVERSION">DB_MULTIVERSION</a> not set on the
underlying database or if a transaction is supplied in the <b>txnid</b>
parameter.</ul>
<br></ul>
<b>txnid</b><ul compact><li>Cursor operations are not automatically transaction-protected, even if
the <a href="../api_c/env_set_flags.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a> flag is specified to the
<a href="../api_c/env_set_flags.html">DB_ENV-&gt;set_flags</a> or <a href="../api_c/db_open.html">DB-&gt;open</a> methods. If cursor operations are
to be transaction-protected, the <b>txnid</b> parameter must be a
transaction handle returned from <a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; otherwise, NULL. To
transaction-protect cursor operations, cursors must be opened and closed
within the context of a transaction, and the <b>txnid</b> parameter
specifies the transaction context in which the cursor may be used.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;cursor method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/dbc_class.html">DBC</a>
<br><b>See Also</b>
<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

96
docs/api_c/db_del.html Normal file
View File

@@ -0,0 +1,96 @@
<!--$Id: db_del.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;del</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;del</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;del(DB *db, DB_TXN *txnid, DBT *key, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;del</b>
<p>The DB-&gt;del method removes key/data pairs from the database. The
key/data pair associated with the specified <b>key</b> is discarded from
the database. In the presence of duplicate key values, all records
associated with the designated key will be discarded.</p>
<p>When called on a database that has been made into a secondary index
using the <a href="../api_c/db_associate.html">DB-&gt;associate</a> method, the DB-&gt;del method deletes the
key/data pair from the primary database and all secondary indices.</p>
<p>The DB-&gt;del method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if the specified key is not in the database.
The DB-&gt;del method will return <a href="../ref/program/errorret.html#DB_KEYEMPTY">DB_KEYEMPTY</a> if the database is a Queue or Recno database and
the specified key exists, but was never explicitly created by the
application or was later deleted.
Unless otherwise specified, the DB-&gt;del method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<b>key</b><ul compact><li>The key <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
operation occurs in a transactional
database,
the operation will be implicitly transaction protected.
</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;del method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>DB_SECONDARY_BAD</b><ul compact><li>A secondary index references a nonexistent primary key.</ul>
<br>
<br>
<b>EACCES</b><ul compact><li>An attempt was made to modify a read-only database.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

82
docs/api_c/db_err.html Normal file
View File

@@ -0,0 +1,82 @@
<!--$Id: db_err.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_err.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;err</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;err</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB-&gt;err(DB *db, int error, const char *fmt, ...);
<p>
void
DB-&gt;errx(DB *db, const char *fmt, ...);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;err</b>
<p>The <a href="../api_c/env_err.html">DB_ENV-&gt;err</a>, <a href="../api_c/env_err.html">DB_ENV-&gt;errx</a>, DB-&gt;err and
DB-&gt;errx methods provide error-messaging functionality for
applications written using the Berkeley DB library.</p>
<p>The DB-&gt;err and <a href="../api_c/env_err.html">DB_ENV-&gt;err</a> methods constructs an error message
consisting of the following elements:</p>
<blockquote><br>
<b>An optional prefix string</b><ul compact><li>If no error callback function has been set using the
<a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a> method, any prefix string specified using the
<a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a> method, followed by two separating characters: a colon
and a &lt;space&gt; character.</ul>
<b>An optional printf-style message</b><ul compact><li>The supplied message <b>fmt</b>, if non-NULL, in which the
ANSI C X3.159-1989 (ANSI C) printf function specifies how subsequent parameters
are converted for output.</ul>
<b>A separator</b><ul compact><li>Two separating characters: a colon and a &lt;space&gt; character.</ul>
<b>A standard error string</b><ul compact><li>The standard system or Berkeley DB library error string associated with the
<b>error</b> value, as returned by the <a href="../api_c/env_strerror.html">db_strerror</a> method.</ul>
<br>
</blockquote>
<p>The DB-&gt;errx and <a href="../api_c/env_err.html">DB_ENV-&gt;errx</a> methods are the same as the
DB-&gt;err and <a href="../api_c/env_err.html">DB_ENV-&gt;err</a> methods, except they do not append the
final separator characters and standard error string to the error
message.</p>
<p>This constructed error message is then handled as follows:</p>
<blockquote><p>If an error callback function has been set (see <a href="../api_c/db_set_errcall.html">DB-&gt;set_errcall</a>
and <a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a>), that function is called with two
parameters: any prefix string specified (see <a href="../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a> and
<a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a>) and the error message.</p>
<p>If a C library FILE * has been set (see <a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a> and
<a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a>), the error message is written to that output
stream.</p>
<p>If none of these output options has been configured, the error message
is written to stderr, the standard error output stream.</p></blockquote>
<b>Parameters</b> <br>
<b>error</b><ul compact><li>The <b>error</b> parameter is the error value for which the
<a href="../api_c/env_err.html">DB_ENV-&gt;err</a> and DB-&gt;err methods will display a explanatory
string.</ul>
<b>fmt</b><ul compact><li>The <b>fmt</b> parameter is an optional printf-style message to display.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

81
docs/api_c/db_exists.html Normal file
View File

@@ -0,0 +1,81 @@
<!--$Id: db_exists.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;exists</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;exists</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;exists(DB *db, DB_TXN *txnid, DBT *key, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;exists</b>
<p>The DB-&gt;exists method returns if the specified key appears in the
database.</p>
<p>The DB-&gt;exists method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if the specified key is not in the database.
The DB-&gt;exists method will return <a href="../ref/program/errorret.html#DB_KEYEMPTY">DB_KEYEMPTY</a> if the database is a Queue or Recno database and
the specified key exists, but was never explicitly created by the
application or was later deleted.
Unless otherwise specified, the DB-&gt;exists method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
one of the following values:
In addition, the following flags may be set by
bitwise inclusively <b>OR</b>'ing them into the <b>flags</b> parameter:
<br>
<b><a name="DB_READ_COMMITTED">DB_READ_COMMITTED</a></b><ul compact><li>Configure a transactional read operation to have degree 2 isolation (the
read is not repeatable).</ul>
<b><a name="DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></b><ul compact><li>Configure a transactional read operation to have degree 1 isolation,
reading modified but not yet committed data. Silently ignored if the
<a href="../api_c/db_open.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a> flag was not specified when the underlying
database was opened.</ul>
<b><a name="DB_RMW">DB_RMW</a></b><ul compact><li>Acquire write locks instead of read locks when doing the read, if
locking is configured. Setting this flag can eliminate deadlock during
a read-modify-write cycle by acquiring the write lock during the read
part of the cycle so that another thread of control acquiring a read
lock for the same item, in its own read-modify-write cycle, will not
result in deadlock.
<p>Because the DB-&gt;exists method will not hold locks across
Berkeley DB calls in non-transactional operations, the <a href="../api_c/dbc_get.html#DB_RMW">DB_RMW</a> flag to
the DB-&gt;exists call is meaningful only in the presence of
transactions.</p></ul>
<br></ul>
<b>key</b><ul compact><li>The key <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

56
docs/api_c/db_fd.html Normal file
View File

@@ -0,0 +1,56 @@
<!--$Id: db_fd.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;fd</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;fd</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;fd(DB *db, int *fdp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;fd</b>
<p>The DB-&gt;fd method provides access to a file descriptor representative
of the underlying database. A file descriptor referring to the same
file will be returned to all processes that call <a href="../api_c/db_open.html">DB-&gt;open</a> with
the same <b>file</b> parameter.</p>
<p>This file descriptor may be safely used as a parameter to the
<b>fcntl</b>(2) and <b>flock</b>(2) locking functions.</p>
<p>The DB-&gt;fd method only supports a coarse-grained form of locking.
Applications should instead use the Berkeley DB lock manager where possible.</p>
<p>The DB-&gt;fd method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>fdp</b><ul compact><li>The <b>fdp</b> parameter references memory into which
the current file descriptor is copied.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

206
docs/api_c/db_get.html Normal file
View File

@@ -0,0 +1,206 @@
<!--$Id: db_get.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;get</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;get</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;get(DB *db,
DB_TXN *txnid, DBT *key, DBT *data, u_int32_t flags);
<p>
int
DB-&gt;pget(DB *db,
DB_TXN *txnid, DBT *key, DBT *pkey, DBT *data, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;get</b>
<p>The DB-&gt;get method retrieves key/data pairs from the database. The
address and length of the data associated with the specified <b>key</b>
are returned in the structure to which <b>data</b> refers.</p>
<p>In the presence of duplicate key values, DB-&gt;get will return the
first data item for the designated key. Duplicates are sorted by insert
order, except where this order has been overridden by cursor operations.
<b>Retrieval of duplicates requires the use of cursor operations.</b>
See <a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> for details.</p>
<p>When called on a database that has been made into a secondary index
using the <a href="../api_c/db_associate.html">DB-&gt;associate</a> method, the DB-&gt;get and
DB-&gt;pget methods return the key from the secondary index and the data
item from the primary database. In addition, the DB-&gt;pget method
returns the key from the primary database. In databases that are not
secondary indices, the DB-&gt;pget method will always fail.</p>
<p>The DB-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if the specified key is not in the database.
The DB-&gt;get method will return <a href="../ref/program/errorret.html#DB_KEYEMPTY">DB_KEYEMPTY</a> if the database is a Queue or Recno database and
the specified key exists, but was never explicitly created by the
application or was later deleted.
Unless otherwise specified, the DB-&gt;get method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>data</b><ul compact><li>The data <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
one of the following values:
<br>
<b><a name="DB_CONSUME">DB_CONSUME</a></b><ul compact><li>Return the record number and data from the available record closest to
the head of the queue, and delete the record. The record number will
be returned in <b>key</b>, as described in <a href="../api_c/dbt_class.html">DBT</a>. The data will
be returned in the <b>data</b> parameter. A record is available if it
is not deleted and is not currently locked. The underlying database
must be of type Queue for DB_CONSUME to be specified.</ul>
<b><a name="DB_CONSUME_WAIT">DB_CONSUME_WAIT</a></b><ul compact><li>The DB_CONSUME_WAIT flag is the same as the DB_CONSUME
flag, except that if the Queue database is empty, the thread of control
will wait until there is data in the queue before returning. The
underlying database must be of type Queue for DB_CONSUME_WAIT
to be specified.
<p>If lock or transaction timeouts have been specified, the DB-&gt;get method
with the DB_CONSUME_WAIT flag
may return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a>.
This failure, by itself, does not require the enclosing transaction be
aborted.</p></ul>
<b><a name="DB_GET_BOTH">DB_GET_BOTH</a></b><ul compact><li>Retrieve the key/data pair only if both the key and data match the
arguments.
<p>When used with the DB-&gt;pget method version of this method on a
secondary index handle, return the secondary key/primary key/data tuple
only if both the primary and secondary keys match the arguments. It is
an error to use the DB_GET_BOTH flag with the DB-&gt;get
version of this method and a secondary index handle.</p></ul>
<b><a name="DB_SET_RECNO">DB_SET_RECNO</a></b><ul compact><li>Retrieve the specified numbered key/data pair from a database. Upon
return, both the <b>key</b> and <b>data</b> items will have been
filled in.
<p>The <b>data</b> field of the specified <b>key</b> must be a pointer
to a logical record number (that is, a <b>db_recno_t</b>). This record
number determines the record to be retrieved.</p>
<p>For DB_SET_RECNO to be specified, the underlying database must be
of type Btree, and it must have been created with the DB_RECNUM flag.</p></ul>
<br>
In addition, the following flags may be set by
bitwise inclusively <b>OR</b>'ing them into the <b>flags</b> parameter:
<br>
<b><a name="DB_IGNORE_LEASE">DB_IGNORE_LEASE</a></b><ul compact><li>Return the data item irrespective of the state of master leases. The
item will be returned under all conditions: if master leases are not
configured, if the request is made to a client, if the request is made
to a master with a valid lease, or if the request is made to a master
without a valid lease.</ul>
<b><a name="DB_MULTIPLE">DB_MULTIPLE</a></b><ul compact><li>Return multiple data items in the buffer to which the <b>data</b>
parameter refers.
<p>In the case of Btree or Hash databases, all of the data items associated
with the specified key are entered into the buffer. In the case of
Queue or Recno databases, all of the data items in the database,
starting at, and subsequent to, the specified key, are entered into the
buffer.</p>
<p>The buffer to which the <b>data</b> parameter refers must be provided
from user memory (see <a href="../api_c/dbt_class.html#DB_DBT_USERMEM">DB_DBT_USERMEM</a>). The buffer must be at
least as large as the page size of the underlying database, aligned for
unsigned integer access, and be a multiple of 1024 bytes in size. If
the buffer size is insufficient, then upon return from the call the size
field of the <b>data</b> parameter will have been set to an estimated
buffer size, and the error DB_BUFFER_SMALL is returned. (The size is an estimate as the
exact size needed may not be known until all entries are read. It is
best to initially provide a relatively large buffer, but applications
should be prepared to resize the buffer as necessary and repeatedly call
the method.)</p>
<p>The DB_MULTIPLE flag may only be used alone, or with the
DB_GET_BOTH and DB_SET_RECNO options. The
DB_MULTIPLE flag may not be used when accessing databases made
into secondary indices using the <a href="../api_c/db_associate.html">DB-&gt;associate</a> method.</p>
<p>See
<a href="../api_c/dbt_bulk.html#DB_MULTIPLE_INIT">DB_MULTIPLE_INIT</a>
for more information.</p></ul>
<b><a name="DB_READ_COMMITTED">DB_READ_COMMITTED</a></b><ul compact><li>Configure a transactional get operation to have degree 2 isolation (the
read is not repeatable).</ul>
<b><a name="DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></b><ul compact><li>Configure a transactional get operation to have degree 1 isolation,
reading modified but not yet committed data. Silently ignored if the
<a href="../api_c/db_open.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a> flag was not specified when the underlying
database was opened.</ul>
<b><a name="DB_RMW">DB_RMW</a></b><ul compact><li>Acquire write locks instead of read locks when doing the read, if
locking is configured. Setting this flag can eliminate deadlock during
a read-modify-write cycle by acquiring the write lock during the read
part of the cycle so that another thread of control acquiring a read
lock for the same item, in its own read-modify-write cycle, will not
result in deadlock.
<p>Because the DB-&gt;get method will not hold locks across
Berkeley DB calls in non-transactional operations, the <a href="../api_c/dbc_get.html#DB_RMW">DB_RMW</a> flag
to the DB-&gt;get call is meaningful only in the presence of
transactions.</p></ul>
<br></ul>
<b>key</b><ul compact><li>The key <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>pkey</b><ul compact><li>The <b>pkey</b> parameter is the return key from the primary database.</ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
operation occurs in a transactional
database,
the operation will be implicitly transaction protected.
</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;get method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_BUFFER_SMALL</b><ul compact><li>The requested item could not be returned due to undersized buffer.</ul>
<br>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>The DB_CONSUME_WAIT flag was specified, lock or transaction
timers were configured and the lock could not be granted before the wait-time expired.</ul>
<br>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LEASE_EXPIRED</b><ul compact><li>The operation failed because the site's replication master lease has expired.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>DB_SECONDARY_BAD</b><ul compact><li>A secondary index references a nonexistent primary key.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If a record number of 0 was specified;
the <a href="../api_c/env_open.html#DB_THREAD">DB_THREAD</a> flag was specified to the <a href="../api_c/db_open.html">DB-&gt;open</a> method and
none of the <a href="../api_c/dbt_class.html#DB_DBT_MALLOC">DB_DBT_MALLOC</a>, <a href="../api_c/dbt_class.html#DB_DBT_REALLOC">DB_DBT_REALLOC</a> or
<a href="../api_c/dbt_class.html#DB_DBT_USERMEM">DB_DBT_USERMEM</a> flags were set in the <a href="../api_c/dbt_class.html">DBT</a>;
the DB-&gt;pget method was called with a <a href="../api_c/db_class.html">DB</a> handle that does not
refer to a secondary index; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,65 @@
<!--$Id: db_get_byteswapped.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;get_byteswapped</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;get_byteswapped</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;get_byteswapped(DB *db, int *isswapped);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;get_byteswapped</b>
<p>The DB-&gt;get_byteswapped method returns if the underlying database
files were created on an architecture of the same byte order as the
current one, or if they were not (that is, big-endian on a little-endian
machine, or vice versa). This information may be used to determine
whether application data needs to be adjusted for this architecture or
not.</p>
<p>The DB-&gt;get_byteswapped method may not be called before the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.</p>
<p>The DB-&gt;get_byteswapped method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>isswapped</b><ul compact><li>If the underlying database files were created on an architecture of the
same byte order as the current one. 0 is stored into the memory location
referenced by <b>isswapped</b>. If the underlying database files were
created on an architecture of a different byte order as the current one,
1 is stored into the memory location referenced by <b>isswapped</b>.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;get_byteswapped method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called before <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,43 @@
<!--$Id: db_get_mpf.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;get_mpf</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;get_mpf</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
DB_MPOOLFILE *
DB-&gt;get_mpf(DB *db);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;get_mpf</b>
<p>The DB-&gt;get_mpf method returns the handle for the cache file underlying the database.</p>
<p>The DB-&gt;get_mpf method may be called at any time during the life of the
application.</p>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<!--$Id: db_get_type.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;get_type</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;get_type</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;get_type(DB *db, DBTYPE *type);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;get_type</b>
<p>The DB-&gt;get_type method returns the type of the underlying access
method (and file format). The type value is one of DB_BTREE, DB_HASH,
DB_RECNO, or DB_QUEUE. This value may be used to determine the type of
the database after a return from <a href="../api_c/db_open.html">DB-&gt;open</a> with the <b>type</b>
parameter set to DB_UNKNOWN.</p>
<p>The DB-&gt;get_type method may not be called before the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.</p>
<p>The DB-&gt;get_type method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>type</b><ul compact><li>The <b>type</b> parameter references memory into which
the type of the underlying access method is copied.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;get_type method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called before <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

43
docs/api_c/db_getenv.html Normal file
View File

@@ -0,0 +1,43 @@
<!--$Id: db_getenv.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;get_env</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;get_env</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
DB_ENV *
DB-&gt;get_env(DB *db);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;get_env</b>
<p>The DB-&gt;get_env method returns the handle for the database environment underlying the database.</p>
<p>The DB-&gt;get_env method may be called at any time during the life of the
application.</p>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

135
docs/api_c/db_join.html Normal file
View File

@@ -0,0 +1,135 @@
<!--$Id: db_join.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;join</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;join</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;join(DB *primary,
DBC **curslist, DBC **dbcp, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;join</b>
<p>The DB-&gt;join method creates a specialized join cursor for use in
performing equality or natural joins on secondary indices. For
information on how to organize your data to use this functionality, see
<a href="../ref/am/join.html">Equality join</a>.</p>
<p>The DB-&gt;join method method is called using the <a href="../api_c/db_class.html">DB</a> handle of
the primary database.</p>
<p>The join cursor supports only the <a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> and <b>dbc_close</b>
cursor functions:</p>
<br>
<b><a href="../api_c/dbc_get.html">DBcursor-&gt;get</a></b><ul compact><li>Iterates over the values associated with the keys to which each item in
<b>curslist</b> was initialized. Any data value that appears in all
items specified by the <b>curslist</b> parameter is then used as a key
into the <b>primary</b>, and the key/data pair found in the
<b>primary</b> is returned.
The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_JOIN_ITEM">DB_JOIN_ITEM</a></b><ul compact><li>Do not use the data value found in all the cursors as a lookup key for
the <b>primary</b>, but simply return it in the key parameter instead.
The data parameter is left unchanged.</ul>
<br>
In addition, the following flag may be set by
bitwise inclusively <b>OR</b>'ing it into the <b>flags</b> parameter:
<br>
<b><a name="DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></b><ul compact><li>Configure a transactional join operation to have degree 1 isolation,
reading modified but not yet committed data. Silently ignored if the
<a href="../api_c/db_open.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a> flag was not specified when the underlying
database was opened.</ul>
<b><a name="DB_RMW">DB_RMW</a></b><ul compact><li>Acquire write locks instead of read locks when doing the read, if
locking is configured. Setting this flag can eliminate deadlock during
a read-modify-write cycle by acquiring the write lock during the read
part of the cycle so that another thread of control acquiring a read
lock for the same item, in its own read-modify-write cycle, will not
result in deadlock.
</ul>
<br></ul>
<b><a href="../api_c/dbc_close.html">DBcursor-&gt;close</a></b><ul compact><li>Close the returned cursor and release all resources. (Closing the cursors
in <b>curslist</b> is the responsibility of the caller.)</ul>
<br>
<p>The DB-&gt;join method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>curslist</b><ul compact><li>The <b>curslist</b> parameter contains a NULL terminated array of cursors.
Each cursor must have been initialized to refer to the key on which the
underlying database should be joined. Typically, this initialization is done
by a <a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> call with the <a href="../api_c/dbc_get.html#DB_SET">DB_SET</a> flag specified. Once the
cursors have been passed as part of a <b>curslist</b>, they should not
be accessed or modified until the newly created join cursor has been closed,
or else inconsistent results may be returned.
<p>Joined values are retrieved by doing a sequential iteration over the first
cursor in the <b>curslist</b> parameter, and a nested iteration over each
secondary cursor in the order they are specified in the <b>curslist</b>
parameter. This requires database traversals to search for the current
datum in all the cursors after the first. For this reason, the best join
performance normally results from sorting the cursors from the one that
refers to the least number of data items to the one that refers to the
most. By default, DB-&gt;join does this sort on behalf of its caller.</p>
<p>For the returned join cursor to be used in a transaction-protected manner,
the cursors listed in <b>curslist</b> must have been created within the
context of the same transaction.</p></ul>
<b>dbcp</b><ul compact><li>The newly created join cursor is returned in the memory location to
which <b>dbcp</b> refers.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_JOIN_NOSORT">DB_JOIN_NOSORT</a></b><ul compact><li>Do not sort the cursors based on the number of data items to which they
refer. If the data are structured so that cursors with many data items
also share many common elements, higher performance will result from
listing those cursors before cursors with fewer data items; that is, a
sort order other than the default. The DB_JOIN_NOSORT flag
permits applications to perform join optimization prior to calling
DB-&gt;join.</ul>
<br></ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;join method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>DB_SECONDARY_BAD</b><ul compact><li>A secondary index references a nonexistent primary key.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If cursor methods other than <a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> or <a href="../api_c/dbc_close.html">DBcursor-&gt;close</a> were
called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,104 @@
<!--$Id: db_key_range.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;key_range</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;key_range</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;key_range(DB *db, DB_TXN *txnid,
DBT *key, DB_KEY_RANGE *key_range, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;key_range</b>
<p>The DB-&gt;key_range method returns an estimate of the proportion of keys
that are less than, equal to, and greater than the specified key. The
underlying database must be of type Btree.</p>
<p>The DB-&gt;key_range method fills in a structure of type DB_KEY_RANGE. The
following data fields are available from the DB_KEY_RANGE structure:</p>
<br>
<b>double less;</b><ul compact><li>A value between 0 and 1, the proportion of keys less than the specified
key.</ul>
<b>double equal;</b><ul compact><li>A value between 0 and 1, the proportion of keys equal to the specified
key.</ul>
<b>double greater;</b><ul compact><li>A value between 0 and 1, the proportion of keys greater than the
specified key.</ul>
<br>
<p>Values are in the range of 0 to 1; for example, if the field
<b>less</b> is 0.05, 5% of the keys in the database are less than the
<b>key</b> parameter. The value for <b>equal</b> will be zero if
there is no matching key, and will be non-zero otherwise.</p>
<p>The DB-&gt;key_range method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>key</b><ul compact><li>The key <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>key_range</b><ul compact><li>The estimates are returned in the <b>key_range</b> parameter, which
contains three elements of type double: <b>less</b>, <b>equal</b>, and
<b>greater</b>. Values are in the range of 0 to 1; for example, if the
field <b>less</b> is 0.05, 5% of the keys in the database are less than
the <b>key</b> parameter. The value for <b>equal</b> will be zero if
there is no matching key, and will be non-zero otherwise.</ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
operation occurs in a transactional
database,
the operation will be implicitly transaction protected.
The DB-&gt;key_range method does not retain the locks it acquires for the
life of the transaction, so estimates may not be repeatable.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;key_range method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If the underlying database was not of type Btree; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

71
docs/api_c/db_list.html Normal file
View File

@@ -0,0 +1,71 @@
<!--$Id: db_list.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: Berkeley DB: Databases and Related Methods</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<p align=center><b>Berkeley DB: Databases and Related Methods</b></p>
<!--$Id: db_list.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<table border=1 align=center>
<tr><th>Database Operations</th><th>Description</th></tr>
<!--Db::--><tr><td><a href="../api_c/db_class.html">db_create</a></td><td>Create a database handle</td></tr>
<!--Db::associate--><tr><td><a href="../api_c/db_associate.html">DB-&gt;associate</a></td><td>Associate a secondary index</td></tr>
<!--Db::close--><tr><td><a href="../api_c/db_close.html">DB-&gt;close</a></td><td>Close a database</td></tr>
<!--Db::compact--><tr><td><a href="../api_c/db_compact.html">DB-&gt;compact</a></td><td>Compact a database</td></tr>
<!--Db::cursor--><tr><td><a href="../api_c/db_cursor.html">DB-&gt;cursor</a></td><td>Create a cursor</td></tr>
<!--Db::del--><tr><td><a href="../api_c/db_del.html">DB-&gt;del</a></td><td>Delete items from a database</td></tr>
<!--Db::err--><tr><td><a href="../api_c/db_err.html">DB-&gt;err</a>, <a href="../api_c/db_err.html">DB-&gt;errx</a></td><td>Error message</td></tr>
<!--Db::exists--><tr><td><a href="../api_c/db_exists.html">DB-&gt;exists</a></td><td>Return if an item appears in a database</td></tr>
<!--Db::fd--><tr><td><a href="../api_c/db_fd.html">DB-&gt;fd</a></td><td>Return a file descriptor from a database</td></tr>
<!--Db::get--><tr><td><a href="../api_c/db_get.html">DB-&gt;get</a>, <a href="../api_c/db_get.html">DB-&gt;pget</a></td><td>Get items from a database</td></tr>
<!--Db::get_byteswapped--><tr><td><a href="../api_c/db_get_byteswapped.html">DB-&gt;get_byteswapped</a></td><td>Return if the underlying database is in host order</td></tr>
<!--Db::get_type--><tr><td><a href="../api_c/db_get_type.html">DB-&gt;get_type</a></td><td>Return the database type</td></tr>
<!--Db::join--><tr><td><a href="../api_c/db_join.html">DB-&gt;join</a></td><td>Perform a database join on cursors</td></tr>
<!--Db::key_range--><tr><td><a href="../api_c/db_key_range.html">DB-&gt;key_range</a></td><td>Return estimate of key location</td></tr>
<!--Db::open--><tr><td><a href="../api_c/db_open.html">DB-&gt;open</a></td><td>Open a database</td></tr>
<!--Db::put--><tr><td><a href="../api_c/db_put.html">DB-&gt;put</a></td><td>Store items into a database</td></tr>
<!--Db::remove--><tr><td><a href="../api_c/db_remove.html">DB-&gt;remove</a></td><td>Remove a database</td></tr>
<!--Db::rename--><tr><td><a href="../api_c/db_rename.html">DB-&gt;rename</a></td><td>Rename a database</td></tr>
<!--Db::set_priority--><tr><td><a href="../api_c/db_set_priority.html">DB-&gt;set_priority</a></td><td>Set cache page priority</td></tr>
<!--Db::stat--><tr><td><a href="../api_c/db_stat.html">DB-&gt;stat</a>, <a href="../api_c/db_stat.html">DB-&gt;stat_print</a></td><td>Database statistics</td></tr>
<!--Db::sync--><tr><td><a href="../api_c/db_sync.html">DB-&gt;sync</a></td><td>Flush a database to stable storage</td></tr>
<!--Db::truncate--><tr><td><a href="../api_c/db_truncate.html">DB-&gt;truncate</a></td><td>Empty a database</td></tr>
<!--Db::upgrade--><tr><td><a href="../api_c/db_upgrade.html">DB-&gt;upgrade</a></td><td>Upgrade a database</td></tr>
<!--Db::verify--><tr><td><a href="../api_c/db_verify.html">DB-&gt;verify</a></td><td>Verify/salvage a database</td></tr>
<tr><th>Database Configuration</th><th><br></th></tr>
<!--Db::set_alloc--><tr><td><a href="../api_c/db_set_alloc.html">DB-&gt;set_alloc</a></td><td>Set local space allocation functions</td></tr>
<!--Db::set_cachesize--><tr><td><a href="../api_c/db_set_cachesize.html">DB-&gt;set_cachesize</a></td><td>Set the database cache size</td></tr>
<!--Db::set_dup_compare--><tr><td><a href="../api_c/db_set_dup_compare.html">DB-&gt;set_dup_compare</a></td><td>Set a duplicate comparison function</td></tr>
<!--Db::set_encrypt--><tr><td><a href="../api_c/db_set_encrypt.html">DB-&gt;set_encrypt</a></td><td>Set the database cryptographic key</td></tr>
<!--Db::set_errcall--><tr><td><a href="../api_c/db_set_errcall.html">DB-&gt;set_errcall</a>, <a href="../api_c/db_set_msgcall.html">DB-&gt;set_msgcall</a></td><td>Set error and informational message callback</td></tr>
<!--Db::set_errfile--><tr><td><a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a>, <a href="../api_c/db_set_msgfile.html">DB-&gt;set_msgfile</a></td><td>Set error and informational message FILE</td></tr>
<!--Db::set_error_stream-->
<!--Db::set_errpfx--><tr><td><a href="../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a></td><td>Set error message prefix</td></tr>
<!--Db::set_feedback--><tr><td><a href="../api_c/db_set_feedback.html">DB-&gt;set_feedback</a></td><td>Set feedback callback</td></tr>
<!--Db::set_flags--><tr><td><a href="../api_c/db_set_flags.html">DB-&gt;set_flags</a></td><td>General database configuration</td></tr>
<!--Db::set_lorder--><tr><td><a href="../api_c/db_set_lorder.html">DB-&gt;set_lorder</a></td><td>Set the database byte order</td></tr>
<!--Db::set_pagesize--><tr><td><a href="../api_c/db_set_pagesize.html">DB-&gt;set_pagesize</a></td><td>Set the underlying database page size</td></tr>
<tr><th>Btree/Recno Configuration</th><th><br></th></tr>
<!--Db::set_append_recno--><tr><td><a href="../api_c/db_set_append_recno.html">DB-&gt;set_append_recno</a></td><td>Set record append callback</td></tr>
<!--Db::set_bt_compare--><tr><td><a href="../api_c/db_set_bt_compare.html">DB-&gt;set_bt_compare</a></td><td>Set a Btree comparison function</td></tr>
<!--Db::set_bt_minkey--><tr><td><a href="../api_c/db_set_bt_minkey.html">DB-&gt;set_bt_minkey</a></td><td>Set the minimum number of keys per Btree page</td></tr>
<!--Db::set_bt_prefix--><tr><td><a href="../api_c/db_set_bt_prefix.html">DB-&gt;set_bt_prefix</a></td><td>Set a Btree prefix comparison function</td></tr>
<!--Db::set_re_delim--><tr><td><a href="../api_c/db_set_re_delim.html">DB-&gt;set_re_delim</a></td><td>Set the variable-length record delimiter</td></tr>
<!--Db::set_re_len--><tr><td><a href="../api_c/db_set_re_len.html">DB-&gt;set_re_len</a></td><td>Set the fixed-length record length</td></tr>
<!--Db::set_re_pad--><tr><td><a href="../api_c/db_set_re_pad.html">DB-&gt;set_re_pad</a></td><td>Set the fixed-length record pad byte</td></tr>
<!--Db::set_re_source--><tr><td><a href="../api_c/db_set_re_source.html">DB-&gt;set_re_source</a></td><td>Set the backing Recno text file</td></tr>
<tr><th>Hash Configuration</th><th><br></th></tr>
<!--Db::set_h_compare--><tr><td><a href="../api_c/db_set_h_compare.html">DB-&gt;set_h_compare</a></td><td>Set a Hash comparison function</td></tr>
<!--Db::set_h_ffactor--><tr><td><a href="../api_c/db_set_h_ffactor.html">DB-&gt;set_h_ffactor</a></td><td>Set the Hash table density</td></tr>
<!--Db::set_h_hash--><tr><td><a href="../api_c/db_set_h_hash.html">DB-&gt;set_h_hash</a></td><td>Set a hashing function</td></tr>
<!--Db::set_h_nelem--><tr><td><a href="../api_c/db_set_h_nelem.html">DB-&gt;set_h_nelem</a></td><td>Set the Hash table size</td></tr>
<tr><th>Queue Configuration</th><th><br></th></tr>
<!--Db::set_q_extentsize--><tr><td><a href="../api_c/db_set_q_extentsize.html">DB-&gt;set_q_extentsize</a></td><td>Set Queue database extent size</td></tr>
</table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

267
docs/api_c/db_open.html Normal file
View File

@@ -0,0 +1,267 @@
<!--$Id: db_open.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;open</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;open</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;open(DB *db, DB_TXN *txnid, const char *file,
const char *database, DBTYPE type, u_int32_t flags, int mode);
<p>
int
DB-&gt;get_dbname(DB *db, const char **filenamep, const char **dbnamep);
<p>
int
DB-&gt;get_multiple(DB *db);
<p>
int
DB-&gt;get_open_flags(DB *db, u_int32_t *flagsp);
<p>
int
DB-&gt;get_transactional(DB *db);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;open</b>
<p>The DB-&gt;open method opens the database represented by the <b>file</b>
and <b>database</b> parameters for both reading and writing.</p>
<p>The currently supported Berkeley DB file formats (or <i>access
methods</i>) are Btree, Hash, Queue, and Recno. The Btree format is a
representation of a sorted, balanced tree structure. The Hash format
is an extensible, dynamic hashing scheme. The Queue format supports
fast access to fixed-length records accessed sequentially or by logical
record number. The Recno format supports fixed- or variable-length
records, accessed sequentially or by logical record number, and
optionally backed by a flat text file.</p>
<p>Storage and retrieval for the Berkeley DB access methods are based on key/data
pairs; see <a href="../api_c/dbt_class.html">DBT</a> for more information.</p>
<p>Calling DB-&gt;open is a relatively expensive operation, and
maintaining a set of open databases will normally be preferable to
repeatedly opening and closing the database for each new query.</p>
<p>The DB-&gt;open method
returns a non-zero error value on failure
and 0 on success.
If DB-&gt;open fails, the <a href="../api_c/db_close.html">DB-&gt;close</a> method must be called to
discard the <a href="../api_c/db_class.html">DB</a> handle.
</p>
<b>Parameters</b> <br>
<b>database</b><ul compact><li>The <b>database</b> parameter is optional, and allows applications to
have multiple databases in a single file. Although no <b>database</b>
parameter needs to be specified, it is an error to attempt to open a
second database in a <b>file</b> that was not initially created using
a <b>database</b> name. Further, the <b>database</b> parameter is not
supported by the Queue format. Finally, when opening multiple databases
in the same physical file, it is important to consider locking and
memory cache issues; see <a href="../ref/am/opensub.html">Opening
multiple databases in a single file</a> for more information.
<p>In-memory databases never intended to be preserved on disk may be
created by setting the <b>file</b> parameter to NULL. If the
<b>database</b> parameter is also NULL, the database is strictly
temporary and cannot be opened by any other thread of control, thus the
database can only be accessed by sharing the single database handle that
created it, in circumstances where doing so is safe. If the
<b>database</b> parameter is not set to NULL, the database can be opened
by other threads of control and will be replicated to client sites in
any replication group.</p></ul>
<b>file</b><ul compact><li>The <b>file</b> parameter is used as the name of an underlying file that
will be used to back the database; see <a href="../ref/env/naming.html">File naming</a> for more information.
<p>In-memory databases never intended to be preserved on disk may be
created by setting the <b>file</b> parameter to NULL.</p></ul>
<p>When using a Unicode build on Windows (the default), the <b>file</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<br>
<b><a name="DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></b><ul compact><li>Enclose the DB-&gt;open call within a transaction. If the call
succeeds, the open operation will be recoverable and all subsequent
database modification operations based on this handle will be
transactionally protected. If the call fails, no database will have
been created.</ul>
<b><a name="DB_CREATE">DB_CREATE</a></b><ul compact><li>Create the database. If the database does not already exist and the
DB_CREATE flag is not specified, the DB-&gt;open will fail.</ul>
<b><a name="DB_EXCL">DB_EXCL</a></b><ul compact><li>Return an error if the database already exists. The DB_EXCL
flag is only meaningful when specified with the DB_CREATE
flag.</ul>
<b><a name="DB_MULTIVERSION">DB_MULTIVERSION</a></b><ul compact><li>Open the database with support for <a href="../ref/transapp/read.html">multiversion concurrency control</a>. This will cause updates to the
database to follow a copy-on-write protocol, which is required to
support snapshot isolation. The DB_MULTIVERSION flag requires
that the database be transactionally protected during its open and is
not supported by the queue format.</ul>
<b><a name="DB_NOMMAP">DB_NOMMAP</a></b><ul compact><li>Do not map this database into process memory (see the
<a href="../api_c/env_set_mp_mmapsize.html">DB_ENV-&gt;set_mp_mmapsize</a> method for further information).</ul>
<b><a name="DB_RDONLY">DB_RDONLY</a></b><ul compact><li>Open the database for reading only. Any attempt to modify items in the
database will fail, regardless of the actual permissions of any
underlying files.</ul>
<b><a name="DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></b><ul compact><li>Support transactional read operations with degree 1 isolation. Read
operations on the database may request the return of modified but not
yet committed data. This flag must be specified on all <a href="../api_c/db_class.html">DB</a>
handles used to perform dirty reads or database updates, otherwise
requests for dirty reads may not be honored and the read may block.</ul>
<b><a name="DB_THREAD">DB_THREAD</a></b><ul compact><li>Cause the <a href="../api_c/db_class.html">DB</a> handle returned by DB-&gt;open to be
<i>free-threaded</i>; that is, concurrently usable by multiple
threads in the address space.</ul>
<b><a name="DB_TRUNCATE">DB_TRUNCATE</a></b><ul compact><li>Physically truncate the underlying file, discarding all previous
databases it might have held. Underlying filesystem primitives are used
to implement this flag. For this reason, it is applicable only to the
file and cannot be used to discard databases within a file.
<p>The DB_TRUNCATE flag cannot be lock or transaction-protected,
and it is an error to specify it in a locking or transaction-protected
environment.</p></ul>
<br></ul>
<b>mode</b><ul compact><li>On Windows systems, the mode parameter is ignored.
<p>On UNIX systems or in IEEE/ANSI Std 1003.1 (POSIX) environments, files created by the database open
are created with mode <b>mode</b> (as described in <b>chmod</b>(2))
and modified by the process' umask value at the time of creation (see
<b>umask</b>(2)). Created files are owned by the process owner; the
group ownership of created files is based on the system and directory
defaults, and is not further specified by Berkeley DB. System shared memory
segments created by the database open are created with mode <b>mode</b>, unmodified
by the process' umask value. If <b>mode</b> is 0, the database open will use a
default mode of readable and writable by both owner and group.</p></ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
DB_AUTO_COMMIT flag is specified,
the operation will be implicitly transaction protected.
Note that transactionally protected operations on a <a href="../api_c/db_class.html">DB</a> handle
requires the <a href="../api_c/db_class.html">DB</a> handle itself be transactionally protected
during its open. Also note that the transaction must be committed before
the handle is closed; see <a href="../ref/program/scope.html">Berkeley DB
handles</a> for more information.</ul>
<b>type</b><ul compact><li>The <b>type</b> parameter is of type DBTYPE, and must be set to one of
<a name="DB_BTREE">DB_BTREE</a>, <a name="DB_HASH">DB_HASH</a>, <a name="DB_QUEUE">DB_QUEUE</a>,
<a name="DB_RECNO">DB_RECNO</a>, or <a name="DB_UNKNOWN">DB_UNKNOWN</a>. If <b>type</b> is
DB_UNKNOWN, the database must already exist and DB-&gt;open will
automatically determine its type. The <a href="../api_c/db_get_type.html">DB-&gt;get_type</a> method may be used
to determine the underlying type of databases opened using DB_UNKNOWN.</ul>
<br>
<br><b>Environment Variables</b>
<p>If the database was opened within a database environment, the
environment variable <b>DB_HOME</b> may be used as the path of the
database environment home.</p>
<p>DB-&gt;open is affected by any database directory specified using
the <a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a> method, or by setting the "set_data_dir" string
in the environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.</p>
<br>
<b>TMPDIR</b><ul compact><li>If the <b>file</b> and <b>dbenv</b> parameters to DB-&gt;open are
NULL, the environment variable <b>TMPDIR</b> may be used as a
directory in which to create temporary backing files</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;open method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>ENOENT</b><ul compact><li>The file or directory does not exist.</ul>
<br>
<br>
<b>DB_OLD_VERSION</b><ul compact><li>The database cannot be opened without being first upgraded.</ul>
<br>
<br>
<b>EEXIST</b><ul compact><li>DB_CREATE and DB_EXCL were specified and the database exists.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If an unknown database type, page size, hash function, pad byte, byte
order, or a flag value or parameter that is incompatible with the
specified database was specified;
the <a href="../api_c/env_open.html#DB_THREAD">DB_THREAD</a> flag was specified and fast mutexes are not
available for this architecture;
the <a href="../api_c/env_open.html#DB_THREAD">DB_THREAD</a> flag was specified to DB-&gt;open, but was
not specified to the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> call for the environment in
which the <a href="../api_c/db_class.html">DB</a> handle was created;
a backing flat text file was specified with either the <a href="../api_c/env_open.html#DB_THREAD">DB_THREAD</a>
flag or the provided database environment supports transaction
processing; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>ENOENT</b><ul compact><li>A nonexistent <b>re_source</b> file was specified.</ul>
<br>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_dbname</b>
<p>The DB-&gt;get_dbname method returns the current filename and database
name.</p>
<b>Parameters</b> <br>
<b>filenamep</b><ul compact><li>The <b>filenamep</b> parameter references memory into which
a pointer to the current filename is copied.</ul>
<b>dbnamep</b><ul compact><li>The <b>dbnamep</b> parameter references memory into which
a pointer to the current database name is copied.</ul>
<br>
<p>The DB-&gt;get_dbname method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_dbname method
returns a non-zero error value on failure
and 0 on success.
</p>
<hr size=1 noshade>
<b>Description: <a href="../api_c/db_open.html">DB-&gt;get_multiple</a></b>
<p>The <a href="../api_c/db_open.html">DB-&gt;get_multiple</a> method returns non-zero if the <a href="../api_c/db_class.html">DB</a> handle
references a physical file supporting multiple databases.</p>
<p>In this case, the <a href="../api_c/db_class.html">DB</a> handle is a handle on a database whose key
values are the names of the databases stored in the physical file and
whose data values are opaque objects. No keys or data values may be
modified or stored using the database handle.</p>
<p>The <a href="../api_c/db_open.html">DB-&gt;get_multiple</a> method may not be called before the DB-&gt;open method is called.</p>
<hr size=1 noshade>
<b>Description: DB-&gt;get_open_flags</b>
<p>The DB-&gt;get_open_flags method returns the current open method flags.</p>
<p>The DB-&gt;get_open_flags method may not be called before the DB-&gt;open method is called.</p>
<p>The DB-&gt;get_open_flags method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flagsp</b><ul compact><li>The DB-&gt;get_open_flags method returns the
current open method flags in <b>flagsp</b>.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_transactional</b>
<p>The DB-&gt;get_transactional method returns non-zero if the <a href="../api_c/db_class.html">DB</a>
handle has been opened in a transactional mode.</p>
<p>The DB-&gt;get_transactional method may be called at any time during the life of the
application.</p>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

129
docs/api_c/db_put.html Normal file
View File

@@ -0,0 +1,129 @@
<!--$Id: db_put.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;put</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;put</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;put(DB *db,
DB_TXN *txnid, DBT *key, DBT *data, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;put</b>
<p>The DB-&gt;put method stores key/data pairs in the database. The default
behavior of the DB-&gt;put function is to enter the new key/data
pair, replacing any previously existing key if duplicates are disallowed,
or adding a duplicate data item if duplicates are allowed. If the database
supports duplicates, the DB-&gt;put method adds the new data value at the
end of the duplicate set. If the database supports sorted duplicates,
the new data value is inserted at the correct sorted location.</p>
<p>Unless otherwise specified, the DB-&gt;put method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
one of the following values:
<br>
<b><a name="DB_APPEND">DB_APPEND</a></b><ul compact><li>Append the key/data pair to the end of the database. For the
DB_APPEND flag to be specified, the underlying database must be
a Queue or Recno database. The record number allocated to the record is
returned in the specified <b>key</b>.
<p>There is a minor behavioral difference between the Recno and Queue access
methods for the DB_APPEND flag. If a transaction enclosing a
DB-&gt;put operation with the DB_APPEND flag aborts, the
record number may be decremented (and later reallocated by a subsequent
DB_APPEND operation) by the Recno access method, but will not be
decremented or reallocated by the Queue access method.</p></ul>
<b><a name="DB_NODUPDATA">DB_NODUPDATA</a></b><ul compact><li>In the case of the Btree and Hash access methods, enter the new key/data
pair only if it does not already appear in the database.
<p>The DB_NODUPDATA flag may only be specified if the underlying
database has been configured to support sorted duplicates. The
DB_NODUPDATA flag may not be specified to the Queue or Recno
access methods.</p>
<p>The DB-&gt;put method will return <a href="../api_c/dbc_put.html#DB_KEYEXIST">DB_KEYEXIST</a> if DB_NODUPDATA is set and the key/data pair already appears
in the database.
</p></ul>
<b><a name="DB_NOOVERWRITE">DB_NOOVERWRITE</a></b><ul compact><li>Enter the new key/data pair only if the key does not already appear in the
database. The DB-&gt;put method call with the DB_NOOVERWRITE flag
set will fail if the key already exists in the database, even if the database
supports duplicates.
<p>The DB-&gt;put method will return <a href="../api_c/dbc_put.html#DB_KEYEXIST">DB_KEYEXIST</a> if DB_NOOVERWRITE is set and the key already appears in the
database.
</p></ul>
<br></ul>
<b>data</b><ul compact><li>The data <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>key</b><ul compact><li>The key <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
operation occurs in a transactional
database,
the operation will be implicitly transaction protected.
</ul>
<br>
<a name="2"><!--meow--></a>
<a name="3"><!--meow--></a>
<br><b>Errors</b>
<p>The DB-&gt;put method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EACCES</b><ul compact><li>An attempt was made to modify a read-only database.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If a record number of 0 was specified;
an attempt was made to add a record to a fixed-length database that was too
large to fit;
an attempt was made to do a partial put;
an attempt was made to add a record to a secondary index; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>ENOSPC</b><ul compact><li>A btree exceeded the maximum btree depth (255).</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

91
docs/api_c/db_remove.html Normal file
View File

@@ -0,0 +1,91 @@
<!--$Id: db_remove.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_remove.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;remove</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;remove</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;remove(DB *db,
const char *file, const char *database, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;remove</b>
<p>The DB-&gt;remove method removes the database specified by the
<b>file</b> and <b>database</b> parameters. If no <b>database</b>
is specified, the underlying file represented by <b>file</b> is
removed, incidentally removing all of the databases it contained.</p>
<p>Applications should never remove databases with open <a href="../api_c/db_class.html">DB</a> handles,
or in the case of removing a file, when any database in the file has an
open handle. For example, some architectures do not permit the removal
of files with open system handles. On these architectures, attempts to
remove databases currently in use by any thread of control in the system
may fail.</p>
<p>The DB-&gt;remove method should not be called if the remove is intended
to be transactionally safe; the <a href="../api_c/env_dbremove.html">DB_ENV-&gt;dbremove</a> method should be used
instead.</p>
<p>The DB-&gt;remove method may not be called after calling the
<a href="../api_c/db_open.html">DB-&gt;open</a> method on any <a href="../api_c/db_class.html">DB</a> handle. If the <a href="../api_c/db_open.html">DB-&gt;open</a> method
has already been called on a <a href="../api_c/db_class.html">DB</a> handle, close the existing
handle and create a new one before calling DB-&gt;remove.</p>
<p>The <a href="../api_c/db_class.html">DB</a> handle may not be accessed again after DB-&gt;remove is
called, regardless of its return.</p>
<p>The DB-&gt;remove method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>database</b><ul compact><li>The <b>database</b> parameter is the database to be removed.</ul>
<b>file</b><ul compact><li>The <b>file</b> parameter is the physical file which contains the
database(s) to be removed.</ul>
<p>When using a Unicode build on Windows (the default), the <b>file</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<br>
<br><b>Environment Variables</b>
<p>If the database was opened within a database environment, the
environment variable <b>DB_HOME</b> may be used as the path of the
database environment home.</p>
<p>DB-&gt;remove is affected by any database directory specified using
the <a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a> method, or by setting the "set_data_dir" string
in the environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.</p>
<br><b>Errors</b>
<p>The DB-&gt;remove method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If DB-&gt;remove called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>ENOENT</b><ul compact><li>The file or directory does not exist.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

94
docs/api_c/db_rename.html Normal file
View File

@@ -0,0 +1,94 @@
<!--$Id: db_rename.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_rename.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;rename</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;rename</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;rename(DB *db, const char *file,
const char *database, const char *newname, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;rename</b>
<p>The DB-&gt;rename method renames the database specified by the
<b>file</b> and <b>database</b> parameters to <b>newname</b>. If no
<b>database</b> is specified, the underlying file represented by
<b>file</b> is renamed, incidentally renaming all of the databases it
contained.</p>
<p>Applications should not rename databases that are currently in use. If
an underlying file is being renamed and logging is currently enabled in
the database environment, no database in the file may be open when the
DB-&gt;rename method is called. In particular, some architectures do
not permit renaming files with open handles. On these architectures,
attempts to rename databases that are currently in use by any thread of
control in the system may fail.</p>
<p>The DB-&gt;rename method should not be called if the rename is intended
to be transactionally safe; the <a href="../api_c/env_dbrename.html">DB_ENV-&gt;dbrename</a> method should be used
instead.</p>
<p>The DB-&gt;rename method may not be called after calling the
<a href="../api_c/db_open.html">DB-&gt;open</a> method on any <a href="../api_c/db_class.html">DB</a> handle. If the <a href="../api_c/db_open.html">DB-&gt;open</a> method
has already been called on a <a href="../api_c/db_class.html">DB</a> handle, close the existing
handle and create a new one before calling DB-&gt;rename.</p>
<p>The <a href="../api_c/db_class.html">DB</a> handle may not be accessed again after DB-&gt;rename is
called, regardless of its return.</p>
<p>The DB-&gt;rename method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>database</b><ul compact><li>The <b>database</b> parameter is the database to be renamed.</ul>
<b>file</b><ul compact><li>The <b>file</b> parameter is the physical file which contains the
database(s) to be renamed.</ul>
<p>When using a Unicode build on Windows (the default), the <b>file</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<b>newname</b><ul compact><li>The <b>newname</b> parameter is the new name of the database or file.</ul>
<br>
<br><b>Environment Variables</b>
<p>If the database was opened within a database environment, the
environment variable <b>DB_HOME</b> may be used as the path of the
database environment home.</p>
<p>DB-&gt;rename is affected by any database directory specified using
the <a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a> method, or by setting the "set_data_dir" string
in the environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.</p>
<br><b>Errors</b>
<p>The DB-&gt;rename method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If DB-&gt;rename called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>ENOENT</b><ul compact><li>The file or directory does not exist.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,87 @@
<!--$Id: db_set_alloc.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_set_alloc.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_alloc</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_alloc</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_alloc(DB *db,
void *(*app_malloc)(size_t),
void *(*app_realloc)(void *, size_t),
void (*app_free)(void *));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_alloc</b>
<p>Set the allocation functions used by the <a href="../api_c/env_class.html">DB_ENV</a> and <a href="../api_c/db_class.html">DB</a>
methods to allocate or free memory owned by the application.</p>
<p>There are a number of interfaces in Berkeley DB where memory is allocated by
the library and then given to the application. For example, the
<a href="../api_c/dbt_class.html#DB_DBT_MALLOC">DB_DBT_MALLOC</a> flag, when specified in the <a href="../api_c/dbt_class.html">DBT</a> object,
will cause the <a href="../api_c/db_class.html">DB</a> methods to allocate and reallocate memory
which then becomes the responsibility of the calling application. (See
<a href="../api_c/dbt_class.html">DBT</a> for more information.) Other examples are the Berkeley DB
interfaces which return statistical information to the application:
<a href="../api_c/db_stat.html">DB-&gt;stat</a>, <a href="../api_c/lock_stat.html">DB_ENV-&gt;lock_stat</a>, <a href="../api_c/log_archive.html">DB_ENV-&gt;log_archive</a>,
<a href="../api_c/log_stat.html">DB_ENV-&gt;log_stat</a>, <a href="../api_c/memp_stat.html">DB_ENV-&gt;memp_stat</a>, and <a href="../api_c/txn_stat.html">DB_ENV-&gt;txn_stat</a>. There is one
method in Berkeley DB where memory is allocated by the application and then
given to the library: <a href="../api_c/db_associate.html">DB-&gt;associate</a>.</p>
<p>On systems in which there may be multiple library versions of the
standard allocation routines (notably Windows NT), transferring memory
between the library and the application will fail because the Berkeley DB
library allocates memory from a different heap than the application uses
to free it. To avoid this problem, the <a href="../api_c/env_set_alloc.html">DB_ENV-&gt;set_alloc</a> and
DB-&gt;set_alloc methods can be used to pass Berkeley DB references to the
application's allocation routines.</p>
<p>It is not an error to specify only one or two of the possible allocation
function parameters to these interfaces; however, in that case the
specified interfaces must be compatible with the standard library
interfaces, as they will be used together. The functions specified must
match the calling conventions of the ANSI C X3.159-1989 (ANSI C) library routines of
the same name.</p>
<p>Because databases opened within Berkeley DB environments use the allocation
interfaces specified to the environment, it is an error to attempt to
set those interfaces in a database created within an environment.</p>
<p>The DB-&gt;set_alloc method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
</p>
<p>The DB-&gt;set_alloc method
returns a non-zero error value on failure
and 0 on success.
</p>
<br><b>Errors</b>
<p>The DB-&gt;set_alloc method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If called in a database environment, or called after <a href="../api_c/db_open.html">DB-&gt;open</a> was
called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,83 @@
<!--$Id: db_set_append_recno.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_append_recno</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_append_recno</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_append_recno(DB *,
int (*db_append_recno_fcn)(DB *dbp, DBT *data, db_recno_t recno));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_append_recno</b>
<p>When using the <a href="../api_c/db_put.html#DB_APPEND">DB_APPEND</a> option of the <a href="../api_c/db_put.html">DB-&gt;put</a> method,
it may be useful to modify the stored data based on the generated key.
If a callback function is specified using the
DB-&gt;set_append_recno method, it will be called after the record number
has been selected, but before the data has been stored.</p>
<p>The DB-&gt;set_append_recno method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_append_recno method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
</p>
<p>The DB-&gt;set_append_recno method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>db_append_recno_fcn</b><ul compact><li>The <b>db_append_recno_fcn</b> parameter is a function to call after
the record number has been selected but before the data has been stored
into the database. The function takes three parameters:
<br>
<b><b>db</b></b><ul compact><li>The <b>db</b> parameter is the enclosing database handle.</ul>
<b><b>dbt</b></b><ul compact><li>The <b>dbt</b> parameter is the data <a href="../api_c/dbt_class.html">DBT</a> to be stored.</ul>
<b><b>recno</b></b><ul compact><li>The <b>recno</b> parameter is the generated record number.</ul>
<br>
<p>The called function may modify the data <a href="../api_c/dbt_class.html">DBT</a>. If the function
needs to allocate memory for the <b>data</b> field, the <b>flags</b>
field of the returned <a href="../api_c/dbt_class.html">DBT</a> should be set to
DB_DBT_APPMALLOC, which indicates that Berkeley DB should free the
memory when it is done with it.</p>
<p>The callback function must return 0 on success and <b>errno</b> or
a value outside of the Berkeley DB error name space on failure.</p>
<p>Berkeley DB is not re-entrant. Callback functions should not attempt to make
library calls (for example, to release locks or close open handles).
Re-entering Berkeley DB is not guaranteed to work correctly, and the results
are undefined.</p></ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_append_recno method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!--$Id: db_set_bt_compare.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_bt_compare</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_bt_compare</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_bt_compare(DB *db,
int (*bt_compare_fcn)(DB *db, const DBT *dbt1, const DBT *dbt2));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_bt_compare</b>
<p>Set the Btree key comparison function. The comparison function is
called whenever it is necessary to compare a key specified by the
application with a key currently stored in the tree.</p>
<p>If no comparison function is specified, the keys are compared lexically,
with shorter keys collating before longer keys.</p>
<p>The DB-&gt;set_bt_compare method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_bt_compare method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_bt_compare must
be the same as that historically used to create the database or
corruption can occur.</p>
<p>The DB-&gt;set_bt_compare method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>bt_compare_fcn</b><ul compact><li>The <b>bt_compare_fcn</b> function is the application-specified Btree
comparison function. The comparison function takes three parameters:
<br>
<b><b>db</b></b><ul compact><li>The <b>db</b> parameter is the enclosing database handle.</ul>
<b><b>dbt1</b></b><ul compact><li>The <b>dbt1</b> parameter is the <a href="../api_c/dbt_class.html">DBT</a> representing the
application supplied key.</ul>
<b><b>dbt2</b></b><ul compact><li>The <b>dbt2</b> parameter is the <a href="../api_c/dbt_class.html">DBT</a> representing the
current tree's key.</ul>
<br></ul>
<p>The <b>bt_compare_fcn</b> function must return an integer value less
than, equal to, or greater than zero if the first key parameter is
considered to be respectively less than, equal to, or greater than the
second key parameter. In addition, the comparison function must cause
the keys in the database to be <i>well-ordered</i>. The comparison
function must correctly handle any key values used by the application
(possibly including zero-length keys). In addition, when Btree key
prefix comparison is being performed (see <a href="../api_c/db_set_bt_prefix.html">DB-&gt;set_bt_prefix</a> for
more information), the comparison routine may be passed a prefix of any
database key. The <b>data</b> and <b>size</b> fields of the
<a href="../api_c/dbt_class.html">DBT</a> are the only fields that may be used for the purposes of
this comparison, and no particular alignment of the memory to which by
the <b>data</b> field refers may be assumed.</p>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_bt_compare method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,87 @@
<!--$Id: db_set_bt_minkey.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_bt_minkey</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_bt_minkey</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_bt_minkey(DB *db, u_int32_t bt_minkey);
<p>
int
DB-&gt;get_bt_minkey(DB *db, u_int32_t *bt_minkeyp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_bt_minkey</b>
<p>Set the minimum number of key/data pairs intended to be stored on any
single Btree leaf page.</p>
<p>This value is used to determine if key or data items will be stored on
overflow pages instead of Btree leaf pages. For more information on
the specific algorithm used, see <a href="../ref/am_conf/bt_minkey.html">Minimum keys per page</a>. The <b>bt_minkey</b> value specified must
be at least 2; if <b>bt_minkey</b> is not explicitly set, a value of
2 is used.</p>
<p>The DB-&gt;set_bt_minkey method configures a database, not only operations performed
using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB-&gt;set_bt_minkey method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_bt_minkey will
be ignored.
</p>
<p>The DB-&gt;set_bt_minkey method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>bt_minkey</b><ul compact><li>The <b>bt_minkey</b> parameter is the minimum number of key/data pairs
intended to be stored on any single Btree leaf page.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_bt_minkey method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_bt_minkey</b>
<p>The DB-&gt;get_bt_minkey method returns the minimum number of key/data pairs intended to be stored on any single Btree
leaf page.</p>
<p>The DB-&gt;get_bt_minkey method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_bt_minkey method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>bt_minkeyp</b><ul compact><li>The DB-&gt;get_bt_minkey method returns the
minimum number of key/data pairs intended to be stored on any single Btree
leaf page in <b>bt_minkeyp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,92 @@
<!--$Id: db_set_bt_prefix.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_bt_prefix</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_bt_prefix</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_bt_prefix(DB *db,
size_t (*bt_prefix_fcn)(DB *, const DBT *, const DBT *));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_bt_prefix</b>
<p>Set the Btree prefix function. The prefix function is used to determine
the amount by which keys stored on the Btree internal pages can be
safely truncated without losing their uniqueness. See the
<a href="../ref/am_conf/bt_prefix.html">Btree prefix comparison</a> section
of the Berkeley DB Reference Guide for more details about how this works. The
usefulness of this is data-dependent, but can produce significantly
reduced tree sizes and search times in some data sets.</p>
<p>If no prefix function or key comparison function is specified by the
application, a default lexical comparison function is used as the prefix
function. If no prefix function is specified and a key comparison
function is specified, no prefix function is used. It is an error to
specify a prefix function without also specifying a Btree key comparison
function.</p>
<p>The DB-&gt;set_bt_prefix method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_bt_prefix method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_bt_prefix must
be the same as that historically used to create the database or
corruption can occur.</p>
<p>The DB-&gt;set_bt_prefix method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>bt_prefix_fcn</b><ul compact><li>The <b>bt_prefix_fcn</b> function is the application-specific Btree
prefix function. The prefix function takes three parameters:
<br>
<b><b>db</b></b><ul compact><li>The <b>db</b> parameter is the enclosing database handle.</ul>
<b><b>dbt1</b></b><ul compact><li>The <b>dbt1</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a> representing a database key.</ul>
<b><b>dbt2</b></b><ul compact><li>The <b>dbt2</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a> representing a database key.</ul>
<br>
<p>The <b>bt_prefix_fcn</b> function must return the number of bytes of
the second key parameter that would be required by the Btree key
comparison function to determine the second key parameter's ordering
relationship with respect to the first key parameter. If the two keys
are equal, the key length should be returned. The prefix function must
correctly handle any key values used by the application (possibly
including zero-length keys). The <b>data</b> and <b>size</b> fields
of the <a href="../api_c/dbt_class.html">DBT</a> are the only fields that may be used for the purposes
of this determination, and no particular alignment of the memory to
which the <b>data</b> field refers may be assumed.</p></ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_bt_prefix method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,108 @@
<!--$Id: db_set_cachesize.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_set_cachesize.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_cachesize</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_cachesize</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_cachesize(DB *db,
u_int32_t gbytes, u_int32_t bytes, int ncache);
<p>
int
DB-&gt;get_cachesize(DB *db,
u_int32_t *gbytesp, u_int32_t *bytesp, int *ncachep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_cachesize</b>
<p>Set the size of the shared memory buffer pool -- that is, the cache.
The cache should be the size of the normal working data set of the
application, with some small amount of additional memory for unusual
situations. (Note: the working set is not the same as the number of
pages accessed simultaneously, and is usually much larger.)</p>
<p>The default cache size is 256KB, and may not be specified as less than
20KB. Any cache size less than 500MB is automatically increased by 25%
to account for buffer pool overhead; cache sizes larger than 500MB are
used as specified. The maximum size of a single cache is 4GB on 32-bit
systems and 10TB on 64-bit systems. (All sizes are in powers-of-two,
that is, 256KB is 2^18 not 256,000.) For information on tuning the Berkeley DB
cache size, see <a href="../ref/am_conf/cachesize.html">Selecting a
cache size</a>.</p>
<p>It is possible to specify caches to Berkeley DB large enough they cannot be
allocated contiguously on some architectures. For example, some
releases of Solaris limit the amount of memory that may be allocated
contiguously by a process. If <b>ncache</b> is 0 or 1, the cache will
be allocated contiguously in memory. If it is greater than 1, the cache
will be split across <b>ncache</b> separate regions, where the
<b>region size</b> is equal to the initial cache size divided by
<b>ncache</b>.</p>
<p>Because databases opened within Berkeley DB environments use the cache
specified to the environment, it is an error to attempt to set a cache
in a database created within an environment.</p>
<p>The DB-&gt;set_cachesize method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
</p>
<p>The DB-&gt;set_cachesize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>bytes</b><ul compact><li>The size of the cache is set to <b>gbytes</b> gigabytes plus <b>bytes</b>.</ul>
<b>gbytes</b><ul compact><li>The size of the cache is set to <b>gbytes</b> gigabytes plus <b>bytes</b>.</ul>
<b>ncache</b><ul compact><li>The <b>ncache</b> parameter is the number of caches to create.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_cachesize method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the specified cache size was impossibly small;
the method was called after
<a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_cachesize</b>
<p>The DB-&gt;get_cachesize method returns the current size and composition of the
cache.</p>
<p>The DB-&gt;get_cachesize method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_cachesize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>bytesp</b><ul compact><li>The <b>bytesp</b> parameter references memory into which
the additional bytes of memory in the cache is copied.</ul>
<b>gbytesp</b><ul compact><li>The <b>gbytesp</b> parameter references memory into which
the gigabytes of memory in the cache is copied.</ul>
<b>ncachep</b><ul compact><li>The <b>ncachep</b> parameter references memory into which
the number of caches is copied.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,87 @@
<!--$Id: db_set_dup_compare.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_dup_compare</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_dup_compare</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_dup_compare(DB *db,
int (*dup_compare_fcn)(DB *, const DBT *, const DBT *));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_dup_compare</b>
<p>Set the duplicate data item comparison function. The comparison
function is called whenever it is necessary to compare a data item
specified by the application with a data item currently stored in the
database. Calling DB-&gt;set_dup_compare implies calling
<a href="../api_c/db_set_flags.html">DB-&gt;set_flags</a> with the <a href="../api_c/db_set_flags.html#DB_DUPSORT">DB_DUPSORT</a> flag.</p>
<p>If no comparison function is specified, the data items are compared
lexically, with shorter data items collating before longer data items.</p>
<p>The DB-&gt;set_dup_compare method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_dup_compare must
be the same as that historically used to create the database or
corruption can occur.</p>
<p>The DB-&gt;set_dup_compare method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>dup_compare_fcn</b><ul compact><li>The <b>dup_compare_fcn</b> function is the application-specified
duplicate data item comparison function. The function takes three
arguments:
<br>
<b><b>db</b></b><ul compact><li>The <b>db</b> parameter is the enclosing database handle.</ul>
<b><b>dbt1</b></b><ul compact><li>The <b>dbt1</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a> representing the application
supplied data item.</ul>
<b><b>dbt2</b></b><ul compact><li>The <b>dbt2</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a> representing the current
tree's data item.</ul>
<br>
<p>The <b>dup_compare_fcn</b> function must return an integer value less
than, equal to, or greater than zero if the first data item parameter
is considered to be respectively less than, equal to, or greater than
the second data item parameter. In addition, the comparison function
must cause the data items in the set to be <i>well-ordered</i>. The
comparison function must correctly handle any data item values used by
the application (possibly including zero-length data items). The
<b>data</b> and <b>size</b> fields of the <a href="../api_c/dbt_class.html">DBT</a> are the only
fields that may be used for the purposes of this comparison, and no
particular alignment of the memory to which the <b>data</b> field
refers may be assumed.</p></ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_dup_compare method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,91 @@
<!--$Id: db_set_encrypt.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_set_encrypt.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_encrypt</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_encrypt</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_encrypt(DB *db, const char *passwd, u_int32_t flags);
<p>
int
DB-&gt;get_encrypt_flags(DB *db, u_int32_t *flagsp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_encrypt</b>
<p>Set the password used by the Berkeley DB library to perform encryption and
decryption.</p>
<p>Because databases opened within Berkeley DB environments use the password
specified to the environment, it is an error to attempt to set a
password in a database created within an environment.</p>
<p>The DB-&gt;set_encrypt method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
</p>
<p>The DB-&gt;set_encrypt method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_ENCRYPT_AES">DB_ENCRYPT_AES</a></b><ul compact><li>Use the Rijndael/AES (also known as the Advanced Encryption Standard
and Federal Information Processing Standard (FIPS) 197) algorithm for
encryption or decryption.</ul>
<br></ul>
<b>passwd</b><ul compact><li>The <b>passwd</b> parameter is the password used to perform encryption
and decryption.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_encrypt method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after
<a href="../api_c/db_open.html">DB-&gt;open</a>
was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>EOPNOTSUPP</b><ul compact><li>Cryptography is not available in this Berkeley DB release.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_encrypt_flags</b>
<p>The DB-&gt;get_encrypt_flags method returns the encryption flags.</p>
<p>The DB-&gt;get_encrypt_flags method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_encrypt_flags method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flagsp</b><ul compact><li>The DB-&gt;get_encrypt_flags method returns the
encryption flags in <b>flagsp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,81 @@
<!--$Id: db_set_errcall.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_set_errcall.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_errcall</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_errcall</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB-&gt;set_errcall(DB *, void (*db_errcall_fcn)
(const DB_ENV *dbenv, const char *errpfx, const char *msg));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_errcall</b>
<p>When an error occurs in the Berkeley DB library, a Berkeley DB error or an error
return value is returned by the interface. In some cases, however,
the <b>errno</b> value may be insufficient to completely describe
the cause of the error, especially during initial application debugging.</p>
<p>The <a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a> and DB-&gt;set_errcall methods are used to
enhance the mechanism for reporting error messages to the application.
In some cases, when an error occurs, Berkeley DB will call
<b>db_errcall_fcn</b> with additional error information. It is up to
the <b>db_errcall_fcn</b> function to display the error message in an
appropriate manner.</p>
<p>Setting <b>db_errcall_fcn</b> to NULL unconfigures the callback interface.</p>
<p>Alternatively, you can use the <a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a> or
<a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a> methods to display the additional information via
a C library FILE *.</p>
<p>This error-logging enhancement does not slow performance or significantly
increase application size, and may be run during normal operation as well
as during application debugging.</p>
<p>For <a href="../api_c/db_class.html">DB</a> handles opened inside of Berkeley DB environments, calling the
DB-&gt;set_errcall method affects the entire environment and is equivalent to calling
the <a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a> method.</p>
<p>The DB-&gt;set_errcall method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_errcall method may be called at any time during the life of the
application.</p>
<b>Parameters</b> <br>
<b>db_errcall_fcn</b><ul compact><li>The <b>db_errcall_fcn</b> parameter is the application-specified error
reporting function. The function takes three parameters:
<br>
<b><b>dbenv</b></b><ul compact><li>The <b>dbenv</b> parameter is the enclosing database environment.</ul>
<b><b>errpfx</b></b><ul compact><li>The <b>errpfx</b> parameter is the prefix string (as previously set by
<a href="../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a> or <a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a>).</ul>
<b><b>msg</b></b><ul compact><li>The <b>msg</b> parameter is the error message string.</ul>
<br>
<p>Berkeley DB is not re-entrant. Callback functions should not attempt to make
library calls (for example, to release locks or close open handles).
Re-entering Berkeley DB is not guaranteed to work correctly, and the results
are undefined.</p></ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,97 @@
<!--$Id: db_set_errfile.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_set_errfile.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_errfile</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_errfile</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB-&gt;set_errfile(DB *db, FILE *errfile);
<p>
void
DB-&gt;get_errfile(DB *db, FILE **errfilep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_errfile</b>
When an error occurs in the Berkeley DB library, a Berkeley DB error or an error
return value is returned by the interface. In some cases, however, the
return value may be insufficient to completely describe the cause of the
error especially during initial application debugging.
<p>The <a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a> and DB-&gt;set_errfile methods are used to
enhance the mechanism for reporting error messages to the application
by setting a C library FILE * to be used for displaying additional Berkeley DB
error messages. In some cases, when an error occurs, Berkeley DB will output
an additional error message to the specified file reference.</p>
<p>The error message will consist of the prefix string and a colon
("<b>:</b>") (if a prefix string was previously specified using
<a href="../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a> or <a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a>), an error string, and
a trailing &lt;newline&gt; character.</p>
<p>The default configuration when applications first create <a href="../api_c/db_class.html">DB</a> or
<a href="../api_c/env_class.html">DB_ENV</a> handles is as if the <a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a> or
DB-&gt;set_errfile methods were called with the standard error output
(stderr) specified as the FILE * argument. Applications wanting no
output at all can turn off this default configuration by calling the
<a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a> or DB-&gt;set_errfile methods with NULL as the
FILE * argument. Additionally, explicitly configuring the error output
channel using any of the <a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a>,
DB-&gt;set_errfile, <a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a>,
<a href="../api_c/db_set_errcall.html">DB-&gt;set_errcall</a>, <a href="../api_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> or
<a href="../api_cxx/db_set_error_stream.html">Db::set_error_stream</a> methods will also turn off this default output
for the application.</p>
<p>This error logging enhancement does not slow performance or significantly
increase application size, and may be run during normal operation as well
as during application debugging.</p>
<p>For <a href="../api_c/db_class.html">DB</a> handles opened inside of Berkeley DB environments, calling the
DB-&gt;set_errfile method affects the entire environment and is equivalent to calling
the <a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a> method.</p>
<p>The DB-&gt;set_errfile method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_errfile method may be called at any time during the life of the
application.</p>
<b>Parameters</b> <br>
<b>errfile</b><ul compact><li>The <b>errfile</b> parameter is a C library FILE * to be used for
displaying additional Berkeley DB error information.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_errfile</b>
<p>The DB-&gt;get_errfile method returns the FILE *.</p>
<p>The DB-&gt;get_errfile method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_errfile method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>errfilep</b><ul compact><li>The DB-&gt;get_errfile method returns the
FILE * in <b>errfilep</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,75 @@
<!--$Id: db_set_errpfx.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_set_errpfx.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_errpfx</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_errpfx</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB-&gt;set_errpfx(DB *db, const char *errpfx);
<p>
void DB-&gt;get_errpfx(DB *db, const char **errpfxp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_errpfx</b>
<p>Set the prefix string that appears before error messages issued by Berkeley DB.</p>
<p>The DB-&gt;set_errpfx and <a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a> methods do not copy
the memory to which the <b>errpfx</b> parameter refers; rather, they
maintain a reference to it. Although this allows applications to modify
the error message prefix at any time (without repeatedly calling the
interfaces), it means the memory must be maintained until the handle is
closed.</p>
<p>For <a href="../api_c/db_class.html">DB</a> handles opened inside of Berkeley DB environments, calling the
DB-&gt;set_errpfx method affects the entire environment and is equivalent to calling
the <a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a> method.</p>
<p>The DB-&gt;set_errpfx method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_errpfx method may be called at any time during the life of the
application.</p>
<b>Parameters</b> <br>
<b>errpfx</b><ul compact><li>The <b>errpfx</b> parameter is the application-specified error prefix
for additional error messages.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_errpfx</b>
<p>The DB-&gt;get_errpfx method returns the error prefix.</p>
<p>The DB-&gt;get_errpfx method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_errpfx method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>errpfxp</b><ul compact><li>The DB-&gt;get_errpfx method returns a reference to the
error prefix in <b>errpfxp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,75 @@
<!--$Id: db_set_feedback.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_set_feedback.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_feedback</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_feedback</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_feedback(DB *,
void (*db_feedback_fcn)(DB *dbp, int opcode, int percent));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_feedback</b>
<p>Some operations performed by the Berkeley DB library can take non-trivial
amounts of time. The DB-&gt;set_feedback method can be used by applications
to monitor progress within these operations. When an operation is
likely to take a long time, Berkeley DB will call the specified callback
function with progress information.</p>
<p>It is up to the callback function to display this information in an
appropriate manner.</p>
<p>The DB-&gt;set_feedback method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;set_feedback method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>db_feedback_fcn</b><ul compact><li>The <b>db_feedback_fcn</b> parameter is the application-specified
feedback function called to report Berkeley DB operation progress. The
callback function must take three parameters:
<br>
<b><b>db</b></b><ul compact><li>The <b>db</b> parameter is a reference to the enclosing database.</ul>
<b><b>opcode</b></b><ul compact><li>The <b>opcode</b> parameter is an operation code. The <b>opcode</b>
parameter may take on any of the following values:
<br>
<b><a name="DB_UPGRADE">DB_UPGRADE</a></b><ul compact><li>The underlying database is being upgraded.</ul>
<b><a name="DB_VERIFY">DB_VERIFY</a></b><ul compact><li>The underlying database is being verified.</ul>
<br></ul>
<b><b>percent</b></b><ul compact><li>The <b>percent</b> parameter is the percent of the operation that has
been completed, specified as an integer value between 0 and 100.</ul>
<br></ul>
<p>Berkeley DB is not re-entrant. Callback functions should not attempt to make
library calls (for example, to release locks or close open handles).
Re-entering Berkeley DB is not guaranteed to work correctly, and the results
are undefined.</p>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,295 @@
<!--$Id: db_set_flags.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_flags</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_flags</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_flags(DB *db, u_int32_t flags);
<p>
int
DB-&gt;get_flags(DB *db, u_int32_t *flagsp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_flags</b>
<p>Configure a database. Calling DB-&gt;set_flags is additive; there
is no way to clear flags.</p>
<p>The DB-&gt;set_flags method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
</p>
<p>The DB-&gt;set_flags method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<b>General</b>
<p>The following flags may be specified for any Berkeley DB access method:</p>
<br>
<a name="2"><!--meow--></a>
<b><a name="DB_CHKSUM">DB_CHKSUM</a></b><ul compact><li>Do checksum verification of pages read into the cache from the backing
filestore. Berkeley DB uses the SHA1 Secure Hash Algorithm
if encryption is configured and a general hash algorithm if it is not.
<p>Calling DB-&gt;set_flags with the DB_CHKSUM flag only affects the
specified <a href="../api_c/db_class.html">DB</a> handle (and any other Berkeley DB handles opened within
the scope of that handle).</p>
<p>If the database already exists when <a href="../api_c/db_open.html">DB-&gt;open</a> is called, the DB_CHKSUM
flag
will be ignored.</p>
If creating additional databases in a file, the checksum behavior specified
must be consistent with the existing databases in the file or an error will
be returned.</ul>
<a name="3"><!--meow--></a>
<b><a name="DB_ENCRYPT">DB_ENCRYPT</a></b><ul compact><li>Encrypt the database using the cryptographic password specified to the
<a href="../api_c/env_set_encrypt.html">DB_ENV-&gt;set_encrypt</a> or <a href="../api_c/db_set_encrypt.html">DB-&gt;set_encrypt</a> methods.
<p>Calling DB-&gt;set_flags with the DB_ENCRYPT flag only affects the
specified <a href="../api_c/db_class.html">DB</a> handle (and any other Berkeley DB handles opened within
the scope of that handle).</p>
<p>If the database already exists when <a href="../api_c/db_open.html">DB-&gt;open</a> is called, the DB_ENCRYPT
flag
must be the same as the existing database or an error
will be returned.
</p>
If creating additional databases in a file, the encryption behavior specified
must be consistent with the existing databases in the file or an error will
be returned.
<p>Encrypted databases are not portable between machines of different byte
orders, that is, encrypted databases created on big-endian machines
cannot be read on little-endian machines, and vice versa.</p></ul>
<a name="4"><!--meow--></a>
<b><a name="DB_TXN_NOT_DURABLE">DB_TXN_NOT_DURABLE</a></b><ul compact><li>If set, Berkeley DB will not write log records for this database. This means
that updates of this database exhibit the ACI (atomicity, consistency,
and isolation) properties, but not D (durability); that is, database
integrity will be maintained, but if the application or system fails,
integrity will not persist. The database file must be verified and/or
restored from backup after a failure. In order to ensure integrity
after application shut down, the database handles must be closed without
specifying <a href="../api_c/db_close.html#DB_NOSYNC">DB_NOSYNC</a>, or all database changes must be flushed
from the database environment cache using either the
<a href="../api_c/txn_checkpoint.html">DB_ENV-&gt;txn_checkpoint</a> or <a href="../api_c/memp_sync.html">DB_ENV-&gt;memp_sync</a> methods. All database handles for
a single physical file must set DB_TXN_NOT_DURABLE, including
database handles for different databases in a physical file.
<p>Calling DB-&gt;set_flags with the DB_TXN_NOT_DURABLE flag only affects the
specified <a href="../api_c/db_class.html">DB</a> handle (and any other Berkeley DB handles opened within
the scope of that handle).</p></ul>
<br>
<b>Btree</b>
<p>The following flags may be specified for the Btree access method:</p>
<br>
<a name="5"><!--meow--></a>
<b><a name="DB_DUP">DB_DUP</a></b><ul compact><li>Permit duplicate data items in the database; that is, insertion when the
key of the key/data pair being inserted already exists in the database
will be successful. The ordering of duplicates in the database is
determined by the order of insertion, unless the ordering is otherwise
specified by use of a cursor operation.
<p>The DB_DUPSORT flag is preferred to DB_DUP for
performance reasons. The DB_DUP flag should only be used by
applications wanting to order duplicate data items manually.</p>
<p>Calling DB-&gt;set_flags with the DB_DUP flag affects the
database, including all threads of control accessing the database.</p>
<p>If the database already exists when <a href="../api_c/db_open.html">DB-&gt;open</a> is called, the DB_DUP
flag
must be the same as the existing database or an error
will be returned.
</p>
<p>It is an error to specify both DB_DUP and DB_RECNUM.</p></ul>
<a name="6"><!--meow--></a>
<b><a name="DB_DUPSORT">DB_DUPSORT</a></b><ul compact><li>Permit duplicate data items in the database; that is, insertion when the
key of the key/data pair being inserted already exists in the database
will be successful. The ordering of duplicates in the database is
determined by the duplicate comparison function. If the application
does not specify a comparison function using the
<a href="../api_c/db_set_dup_compare.html">DB-&gt;set_dup_compare</a> method, a default lexical comparison will be used.
It is an error to specify both DB_DUPSORT and DB_RECNUM.
<p>Calling DB-&gt;set_flags with the DB_DUPSORT flag affects the
database, including all threads of control accessing the database.</p>
<p>If the database already exists when <a href="../api_c/db_open.html">DB-&gt;open</a> is called, the DB_DUPSORT
flag
must be the same as the existing database or an error
will be returned.
</p></ul>
<a name="7"><!--meow--></a>
<b><a name="DB_RECNUM">DB_RECNUM</a></b><ul compact><li>Support retrieval from the Btree using record numbers. For more
information, see the <a href="../api_c/db_get.html#DB_SET_RECNO">DB_SET_RECNO</a> flag to the <a href="../api_c/db_get.html">DB-&gt;get</a>
and <a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> methods.
<p>Logical record numbers in Btree databases are mutable in the face of
record insertion or deletion. See the DB_RENUMBER flag in the
Recno access method information for further discussion.</p>
<p>Maintaining record counts within a Btree introduces a serious point of
contention, namely the page locations where the record counts are
stored. In addition, the entire database must be locked during both
insertions and deletions, effectively single-threading the database for
those operations. Specifying DB_RECNUM can result in serious
performance degradation for some applications and data sets.</p>
<p>It is an error to specify both DB_DUP and DB_RECNUM.</p>
<p>Calling DB-&gt;set_flags with the DB_RECNUM flag affects the
database, including all threads of control accessing the database.</p>
<p>If the database already exists when <a href="../api_c/db_open.html">DB-&gt;open</a> is called, the DB_RECNUM
flag
must be the same as the existing database or an error
will be returned.
</p></ul>
<a name="8"><!--meow--></a><a name="9"><!--meow--></a>
<b><a name="DB_REVSPLITOFF">DB_REVSPLITOFF</a></b><ul compact><li>Turn off reverse splitting in the Btree. As pages are emptied in a
database, the Berkeley DB Btree implementation attempts to coalesce empty pages
into higher-level pages in order to keep the database as small as possible
and minimize search time. This can hurt performance in applications
with cyclical data demands; that is, applications where the database grows
and shrinks repeatedly. For example, because Berkeley DB does page-level
locking, the maximum level of concurrency in a database of two pages is far
smaller than that in a database of 100 pages, so a database that has
shrunk to a minimal size can cause severe deadlocking when a new cycle of
data insertion begins.
<p>Calling DB-&gt;set_flags with the DB_REVSPLITOFF flag only affects the
specified <a href="../api_c/db_class.html">DB</a> handle (and any other Berkeley DB handles opened within
the scope of that handle).</p></ul>
<br>
<b>Hash</b>
<p>The following flags may be specified for the Hash access method:</p>
<br>
<b><a name="DB_DUP">DB_DUP</a></b><ul compact><li>Permit duplicate data items in the database; that is, insertion when the
key of the key/data pair being inserted already exists in the database
will be successful. The ordering of duplicates in the database is
determined by the order of insertion, unless the ordering is otherwise
specified by use of a cursor operation.
<p>The DB_DUPSORT flag is preferred to DB_DUP for
performance reasons. The DB_DUP flag should only be used by
applications wanting to order duplicate data items manually.</p>
<p>Calling DB-&gt;set_flags with the DB_DUP flag affects the
database, including all threads of control accessing the database.</p>
<p>If the database already exists when <a href="../api_c/db_open.html">DB-&gt;open</a> is called, the DB_DUP
flag
must be the same as the existing database or an error
will be returned.
</p>
</ul>
<b><a name="DB_DUPSORT">DB_DUPSORT</a></b><ul compact><li>Permit duplicate data items in the database; that is, insertion when the
key of the key/data pair being inserted already exists in the database
will be successful. The ordering of duplicates in the database is
determined by the duplicate comparison function. If the application
does not specify a comparison function using the
<a href="../api_c/db_set_dup_compare.html">DB-&gt;set_dup_compare</a> method, a default lexical comparison will be used.
It is an error to specify both DB_DUPSORT and DB_RECNUM.
<p>Calling DB-&gt;set_flags with the DB_DUPSORT flag affects the
database, including all threads of control accessing the database.</p>
<p>If the database already exists when <a href="../api_c/db_open.html">DB-&gt;open</a> is called, the DB_DUPSORT
flag
must be the same as the existing database or an error
will be returned.
</p></ul>
<br>
<b>Queue</b>
<p>The following flags may be specified for the Queue access method:</p>
<br>
<a name="10"><!--meow--></a>
<b><a name="DB_INORDER">DB_INORDER</a></b><ul compact><li>The DB_INORDER flag modifies the operation of the
<a href="../api_c/db_get.html#DB_CONSUME">DB_CONSUME</a> or <a href="../api_c/db_get.html#DB_CONSUME_WAIT">DB_CONSUME_WAIT</a> flags to <a href="../api_c/db_get.html">DB-&gt;get</a>
to return key/data pairs in order. That is, they will always return
the key/data item from the head of the queue.
<p>The default behavior of queue databases is optimized for multiple
readers, and does not guarantee that record will be retrieved in the
order they are added to the queue. Specifically, if a writing thread
adds multiple records to an empty queue, reading threads may skip some
of the initial records when the next <a href="../api_c/db_get.html">DB-&gt;get</a> call returns.</p>
<p>This flag modifies the <a href="../api_c/db_get.html">DB-&gt;get</a> call to verify that the record
being returned is in fact the head of the queue. This will increase
contention and reduce concurrency when there are many reading threads.</p>
<p>Calling DB-&gt;set_flags with the DB_INORDER flag only affects the
specified <a href="../api_c/db_class.html">DB</a> handle (and any other Berkeley DB handles opened within
the scope of that handle).</p></ul>
<br>
<b>Recno</b>
<p>The following flags may be specified for the Recno access method:</p>
<br>
<a name="11"><!--meow--></a>
<b><a name="DB_RENUMBER">DB_RENUMBER</a></b><ul compact><li>Specifying the DB_RENUMBER flag causes the logical record
numbers to be mutable, and change as records are added to and deleted
from the database. For example, the deletion of record number 4 causes
records numbered 5 and greater to be renumbered downward by one. If a
cursor was positioned to record number 4 before the deletion, it will
refer to the new record number 4, if any such record exists, after the
deletion. If a cursor was positioned after record number 4 before the
deletion, it will be shifted downward one logical record, continuing to
refer to the same record as it did before.
<p>Using the <a href="../api_c/db_put.html">DB-&gt;put</a> or <a href="../api_c/dbc_put.html">DBcursor-&gt;put</a> interfaces to create new
records will cause the creation of multiple records if the record number
is more than one greater than the largest record currently in the
database. For example, creating record 28, when record 25 was previously
the last record in the database, will create records 26 and 27 as well as
28. Attempts to retrieve records that were created in this manner will
result in an error return of <a href="../ref/program/errorret.html#DB_KEYEMPTY">DB_KEYEMPTY</a>.</p>
<p>If a created record is not at the end of the database, all records
following the new record will be automatically renumbered upward by one.
For example, the creation of a new record numbered 8 causes records
numbered 8 and greater to be renumbered upward by one. If a cursor was
positioned to record number 8 or greater before the insertion, it will be
shifted upward one logical record, continuing to refer to the same record
as it did before.</p>
<p>For these reasons, concurrent access to a Recno database with the
DB_RENUMBER flag specified may be largely meaningless, although
it is supported.</p>
<p>Calling DB-&gt;set_flags with the DB_RENUMBER flag affects the
database, including all threads of control accessing the database.</p>
<p>If the database already exists when <a href="../api_c/db_open.html">DB-&gt;open</a> is called, the DB_RENUMBER
flag
must be the same as the existing database or an error
will be returned.
</p></ul>
<a name="12"><!--meow--></a>
<b><a name="DB_SNAPSHOT">DB_SNAPSHOT</a></b><ul compact><li>This flag specifies that any specified <b>re_source</b> file be read
in its entirety when <a href="../api_c/db_open.html">DB-&gt;open</a> is called. If this flag is not
specified, the <b>re_source</b> file may be read lazily.
<p>Calling DB-&gt;set_flags with the DB_SNAPSHOT flag only affects the
specified <a href="../api_c/db_class.html">DB</a> handle (and any other Berkeley DB handles opened within
the scope of that handle).</p></ul>
<br></ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_flags method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_flags</b>
<p>The DB-&gt;get_flags method returns the current flags.</p>
<p>The DB-&gt;get_flags method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_flags method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flagsp</b><ul compact><li>The DB-&gt;get_flags method returns the
current flags in <b>flagsp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,85 @@
<!--$Id: db_set_h_compare.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_h_compare</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_h_compare</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_h_compare(DB *db,
int (*compare_fcn)(DB *db, const DBT *dbt1, const DBT *dbt2));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_h_compare</b>
<p>Set the Hash key comparison function. The comparison function is called
whenever it is necessary to compare a key specified by the application
with a key currently stored in the database.</p>
<p>If no comparison function is specified, a byte-by-byte comparison is
performed.</p>
<p>The DB-&gt;set_h_compare method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_h_compare method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_h_compare must
be the same as that historically used to create the database or
corruption can occur.</p>
<p>The DB-&gt;set_h_compare method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>compare_fcn</b><ul compact><li>The <b>compare_fcn</b> function is the application-specified Hash
comparison function. The comparison function takes three parameters:
<br>
<b><b>db</b></b><ul compact><li>The <b>db</b> parameter is the enclosing database handle.</ul>
<b><b>dbt1</b></b><ul compact><li>The <b>dbt1</b> parameter is the <a href="../api_c/dbt_class.html">DBT</a> representing the
application supplied key.</ul>
<b><b>dbt2</b></b><ul compact><li>The <b>dbt2</b> parameter is the <a href="../api_c/dbt_class.html">DBT</a> representing the
current database's key.</ul>
<br></ul>
<p>The <b>compare_fcn</b> function must return an integer value less
than, equal to, or greater than zero if the first key parameter is
considered to be respectively less than, equal to, or greater than the
second key parameter. The comparison function must correctly handle any
key values used by the application (possibly including zero-length
keys). The <b>data</b> and <b>size</b> fields of the <a href="../api_c/dbt_class.html">DBT</a> are
the only fields that may be used for the purposes of this comparison,
and no particular alignment of the memory to which by the <b>data</b>
field refers may be assumed.</p>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_h_compare method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!--$Id: db_set_h_ffactor.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_h_ffactor</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_h_ffactor</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_h_ffactor(DB *db, u_int32_t h_ffactor);
int
<p>
DB-&gt;get_h_ffactor(DB *db, u_int32_t *h_ffactorp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_h_ffactor</b>
<p>Set the desired density within the hash table. If no value is
specified, the fill factor will be selected dynamically as pages are
filled.</p>
<p>The DB-&gt;set_h_ffactor method configures a database, not only operations performed
using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB-&gt;set_h_ffactor method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_h_ffactor will
be ignored.
</p>
<p>The DB-&gt;set_h_ffactor method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>h_ffactor</b><ul compact><li>The <b>h_ffactor</b> parameter is the desired density within the hash table.</ul>
<p>The density is an approximation of the number of keys allowed to
accumulate in any one bucket, determining when the hash table grows or
shrinks. If you know the average sizes of the keys and data in your
data set, setting the fill factor can enhance performance. A reasonable
rule computing fill factor is to set it to the following:</p>
<blockquote><pre>(pagesize - 32) / (average_key_size + average_data_size + 8)</pre></blockquote>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_h_ffactor method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_h_ffactor</b>
<p>The DB-&gt;get_h_ffactor method returns the hash table density.</p>
<p>The DB-&gt;get_h_ffactor method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_h_ffactor method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>h_ffactorp</b><ul compact><li>The DB-&gt;get_h_ffactor method returns the
hash table density in <b>h_ffactorp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,73 @@
<!--$Id: db_set_h_hash.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_h_hash</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_h_hash</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_h_hash(DB *db,
u_int32_t (*h_hash_fcn)(DB *, const void *bytes, u_int32_t length));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_h_hash</b>
<p>Set a user-defined hash function; if no hash function is specified, a
default hash function is used. Because no hash function performs
equally well on all possible data, the user may find that the built-in
hash function performs poorly with a particular data set.</p>
<p>The DB-&gt;set_h_hash method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_h_hash method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_h_hash must
be the same as that historically used to create the database or
corruption can occur.</p>
<p>The DB-&gt;set_h_hash method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>h_hash_fcn</b><ul compact><li>The <b>h_hash_fcn</b> parameter is the application-specified hash function.
<p>Application-specified hash functions take a pointer to a byte string and
a length as parameters, and return a value of type <b>u_int32_t</b>.
The hash function must handle any key values used by the application
(possibly including zero-length keys).</p></ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_h_hash method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; the
specified hash function differs from the hash function with which the
database was created; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,84 @@
<!--$Id: db_set_h_nelem.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_h_nelem</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_h_nelem</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_h_nelem(DB *db, u_int32_t h_nelem);
<p>
int
DB-&gt;get_h_nelem(DB *db, u_int32_t *h_nelemp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_h_nelem</b>
<p>Set an estimate of the final size of the hash table.</p>
<p>In order for the estimate to be used when creating the database, the
<a href="../api_c/db_set_h_ffactor.html">DB-&gt;set_h_ffactor</a> method must also be called. If the estimate
or fill factor are not set or are set too low, hash tables will still
expand gracefully as keys are entered, although a slight performance
degradation may be noticed.</p>
<p>The DB-&gt;set_h_nelem method configures a database, not only operations performed
using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB-&gt;set_h_nelem method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_h_nelem will
be ignored.
</p>
<p>The DB-&gt;set_h_nelem method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>h_nelem</b><ul compact><li>The <b>h_nelem</b> parameter is an estimate of the final size of the
hash table.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_h_nelem method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_h_nelem</b>
<p>The DB-&gt;get_h_nelem method returns the estimate of the final size of the hash table.</p>
<p>The DB-&gt;get_h_nelem method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_h_nelem method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>h_nelemp</b><ul compact><li>The DB-&gt;get_h_nelem method returns the
estimate of the final size of the hash table in <b>h_nelemp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!--$Id: db_set_lorder.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_lorder</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_lorder</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_lorder(DB *db, int lorder);
<p>
int
DB-&gt;get_lorder(DB *db, int *lorderp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_lorder</b>
<p>Set the byte order for integers in the stored database metadata. The
host byte order of the machine where the Berkeley DB library was compiled will
be used if no byte order is set.</p>
<p><b>The access methods provide no guarantees about the byte ordering of the
application data stored in the database, and applications are responsible
for maintaining any necessary ordering.</b></p>
<p>The DB-&gt;set_lorder method configures a database, not only operations performed
using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB-&gt;set_lorder method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_lorder will
be ignored.
</p>
If creating additional databases in a single physical file, information
specified to DB-&gt;set_lorder will be ignored and the byte order
of the existing databases will be used.
<p>The DB-&gt;set_lorder method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lorder</b><ul compact><li>The <b>lorder</b> parameter should represent the byte order as an
integer; for example, big endian order is the number 4,321, and little
endian order is the number 1,234.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_lorder method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_lorder</b>
<p>The DB-&gt;get_lorder method returns the database byte order; a byte order of 4,321 indicates a big endian
order, and a byte order of 1,234 indicates a little endian order.</p>
<p>The DB-&gt;get_lorder method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_lorder method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lorderp</b><ul compact><li>The DB-&gt;get_lorder method returns the
database byte order in <b>lorderp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,74 @@
<!--$Id: db_set_msgcall.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_set_msgcall.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_msgcall</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_msgcall</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB-&gt;set_msgcall(DB *,
void (*db_msgcall_fcn)(const DB_ENV *dbenv, char *msg));
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_msgcall</b>
<p>There are interfaces in the Berkeley DB library which either directly output
informational messages or statistical information, or configure the
library to output such messages when performing other operations, for
example, <a href="../api_c/env_set_verbose.html">DB_ENV-&gt;set_verbose</a> and <a href="../api_c/env_stat.html">DB_ENV-&gt;stat_print</a>.</p>
<p>The DB_ENV-&gt;set_msgcall and DB-&gt;set_msgcall methods are used to
pass these messages to the application, and Berkeley DB will call
<b>db_msgcall_fcn</b> with each message. It is up to the
<b>db_msgcall_fcn</b> function to display the message in an appropriate
manner.</p>
<p>Setting <b>db_msgcall_fcn</b> to NULL unconfigures the callback interface.</p>
<p>Alternatively, you can use the <a href="../api_c/db_set_msgfile.html">DB-&gt;set_msgfile</a> or
<a href="../api_c/env_set_msgfile.html">DB_ENV-&gt;set_msgfile</a> methods to display the messages via a C library FILE *.</p>
<p>For <a href="../api_c/db_class.html">DB</a> handles opened inside of Berkeley DB environments, calling the
DB-&gt;set_msgcall method affects the entire environment and is equivalent to calling
the DB_ENV-&gt;set_msgcall method.</p>
<p>The DB-&gt;set_msgcall method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_msgcall method may be called at any time during the life of the
application.</p>
<b>Parameters</b> <br>
<b>db_msgcall_fcn</b><ul compact><li>The <b>db_msgcall_fcn</b> parameter is the application-specified message
reporting function. The function takes two parameters:
<br>
<b><b>dbenv</b></b><ul compact><li>The <b>dbenv</b> parameter is the enclosing database environment.</ul>
<b><b>msg</b></b><ul compact><li>The <b>msg</b> parameter is the message string.</ul>
<br></ul>
<p>Berkeley DB is not re-entrant. Callback functions should not attempt to make
library calls (for example, to release locks or close open handles).
Re-entering Berkeley DB is not guaranteed to work correctly, and the results
are undefined.</p>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,81 @@
<!--$Id: db_set_msgfile.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: db_set_msgfile.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_msgfile</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_msgfile</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB-&gt;set_msgfile(DB *db, FILE *msgfile);
<p>
void
DB-&gt;get_msgfile(DB *db, FILE **msgfilep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_msgfile</b>
<p>There are interfaces in the Berkeley DB library which either directly output
informational messages or statistical information, or configure the
library to output such messages when performing other operations, for
example, <a href="../api_c/env_set_verbose.html">DB_ENV-&gt;set_verbose</a> and <a href="../api_c/env_stat.html">DB_ENV-&gt;stat_print</a>.</p>
<p>The <a href="../api_c/env_set_msgfile.html">DB_ENV-&gt;set_msgfile</a> and DB-&gt;set_msgfile methods are used to
display these messages for the application.
In this case the message will include a trailing &lt;newline&gt;
character.</p>
<p>Setting <b>msgfile</b> to NULL unconfigures the interface.</p>
<p>Alternatively, you can use the <a href="../api_c/env_set_msgcall.html">DB_ENV-&gt;set_msgcall</a> or
<a href="../api_c/db_set_msgcall.html">DB-&gt;set_msgcall</a> methods to capture the additional error information
in a way that does not use C library FILE *'s.</p>
<p>For <a href="../api_c/db_class.html">DB</a> handles opened inside of Berkeley DB environments, calling the
DB-&gt;set_msgfile method affects the entire environment and is equivalent to calling
the <a href="../api_c/env_set_msgfile.html">DB_ENV-&gt;set_msgfile</a> method.</p>
<p>The DB-&gt;set_msgfile method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_msgfile method may be called at any time during the life of the
application.</p>
<b>Parameters</b> <br>
<b>msgfile</b><ul compact><li>The <b>msgfile</b> parameter is a C library FILE * to be used for
displaying messages.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_msgfile</b>
<p>The DB-&gt;get_msgfile method returns the FILE *.</p>
<p>The DB-&gt;get_msgfile method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_msgfile method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>msgfilep</b><ul compact><li>The DB-&gt;get_msgfile method returns the
FILE * in <b>msgfilep</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,88 @@
<!--$Id: db_set_pagesize.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_pagesize</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_pagesize</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_pagesize(DB *db, u_int32_t pagesize);
<p>
int
DB-&gt;get_pagesize(DB *db, u_int32_t *pagesizep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_pagesize</b>
<p>Set the size of the pages used to hold items in the database, in bytes.
The minimum page size is 512 bytes, the maximum page size is 64K bytes,
and the page size must be a power-of-two. If the page size is not
explicitly set, one is selected based on the underlying filesystem I/O
block size. The automatically selected size has a lower limit of 512
bytes and an upper limit of 16K bytes.</p>
<p>For information on tuning the Berkeley DB page size, see
<a href="../ref/am_conf/pagesize.html">Selecting a page size</a>.</p>
<p>The DB-&gt;set_pagesize method configures a database, not only operations performed
using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB-&gt;set_pagesize method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_pagesize will
be ignored.
</p>
If creating additional databases in a single physical file, information
specified to DB-&gt;set_pagesize will be ignored and the page size
of the existing databases will be used.
<p>The DB-&gt;set_pagesize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>pagesize</b><ul compact><li>The <b>pagesize</b> parameter sets the database page size.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_pagesize method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_pagesize</b>
<p>The DB-&gt;get_pagesize method returns the page size.</p>
<p>The DB-&gt;get_pagesize method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_pagesize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>pagesizep</b><ul compact><li>The DB-&gt;get_pagesize method returns the
page size in <b>pagesizep</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!--$Id: db_set_priority.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_priority</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_priority</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_priority(DB *db, DB_CACHE_PRIORITY priority);
<p>
int
DB-&gt;get_priority(DB *db, DB_CACHE_PRIORITY *priorityp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_priority</b>
<!--$Id: db_set_priority.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<p>Set the cache priority for pages referenced by the
<a href="../api_c/db_class.html">DB</a>
handle.</p>
<p>The priority of a page biases the replacement algorithm to be more or
less likely to discard a page when space is needed in the buffer pool.
The bias is temporary, and pages will eventually be discarded if they
are not referenced again. The DB-&gt;set_priority method is only advisory, and does
not guarantee pages will be treated in a specific way.</p>
<p>The DB-&gt;set_priority method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;set_priority method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>priority</b><ul compact><li>The <b>priority</b> parameter must be set to one of the following
values:
<br>
<b><a name="DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></b><ul compact><li>The lowest priority: pages are the most likely to be discarded.</ul>
<b><a name="DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></b><ul compact><li>The next lowest priority.</ul>
<b><a name="DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></b><ul compact><li>The default priority.</ul>
<b><a name="DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></b><ul compact><li>The next highest priority.</ul>
<b><a name="DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></b><ul compact><li>The highest priority: pages are the least likely to be discarded.</ul>
<br></ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_priority</b>
<p>The DB-&gt;get_priority method returns the cache priority for pages referenced by the
<a href="../api_c/db_class.html">DB</a>
handle.</p>
<p>The DB-&gt;get_priority method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_priority method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>priorityp</b><ul compact><li>The DB-&gt;get_priority method returns a reference to the
cache priority for pages referenced by the
<a href="../api_c/db_class.html">DB</a>
handle in <b>priorityp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,84 @@
<!--$Id: db_set_q_extentsize.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_q_extentsize</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_q_extentsize</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_q_extentsize(DB *db, u_int32_t extentsize);
<p>
int
DB-&gt;get_q_extentsize(DB *db, u_int32_t *extentsizep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_q_extentsize</b>
<p>Set the size of the extents used to hold pages in a Queue database,
specified as a number of pages. Each extent is created as a separate
physical file. If no extent size is set, the default behavior is to
create only a single underlying database file.</p>
<p>For information on tuning the extent size, see
<a href="../ref/am_conf/extentsize.html">Selecting a extent size</a>.</p>
<p>The DB-&gt;set_q_extentsize method configures a database, not only operations performed
using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB-&gt;set_q_extentsize method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_q_extentsize will
be ignored.
</p>
<p>The DB-&gt;set_q_extentsize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>extentsize</b><ul compact><li>The <b>extentsize</b> parameter is the number of pages in a Queue database
extent.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_q_extentsize method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_q_extentsize</b>
<p>The DB-&gt;get_q_extentsize method returns the number of pages in an extent.</p>
<p>The DB-&gt;get_q_extentsize method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_q_extentsize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>extentsizep</b><ul compact><li>The DB-&gt;get_q_extentsize method returns the
number of pages in an extent in <b>extentsizep</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,84 @@
<!--$Id: db_set_re_delim.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_re_delim</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_re_delim</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_re_delim(DB *db, int delim);
<p>
int
DB-&gt;get_re_delim(DB *db, int *delimp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_re_delim</b>
<p>Set the delimiting byte used to mark the end of a record in the backing
source file for the Recno access method.</p>
<p>This byte is used for variable length records if the <b>re_source</b>
file is specified. If the <b>re_source</b> file is specified and no
delimiting byte was specified, &lt;newline&gt; characters (that
is, ASCII 0x0a) are interpreted as end-of-record markers.</p>
<p>The DB-&gt;set_re_delim method configures a database, not only operations performed
using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB-&gt;set_re_delim method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_re_delim will
be ignored.
</p>
<p>The DB-&gt;set_re_delim method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>re_delim</b><ul compact><li>The <b>re_delim</b> parameter is the delimiting byte used to mark the
end of a record.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_re_delim method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_re_delim</b>
<p>The DB-&gt;get_re_delim method returns the delimiting byte.</p>
<p>The DB-&gt;get_re_delim method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_re_delim method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>delimp</b><ul compact><li>The DB-&gt;get_re_delim method returns the
delimiting byte in <b>delimp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,91 @@
<!--$Id: db_set_re_len.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_re_len</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_re_len</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_re_len(DB *db, u_int32_t re_len);
<p>
int
DB-&gt;get_re_len(DB *db, u_int32_t *re_lenp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_re_len</b>
<p>For the Queue access method, specify that the records are of length
<b>re_len</b>. For the Queue access method, the record length must be
enough smaller than the database's page size that at least one record
plus the database page's metadata information can fit on each database
page.</p>
<p>For the Recno access method, specify that the records are fixed-length,
not byte-delimited, and are of length <b>re_len</b>.</p>
<p>Any records added to the database that are less than <b>re_len</b> bytes
long are automatically padded (see <a href="../api_c/db_set_re_pad.html">DB-&gt;set_re_pad</a> for more
information).</p>
<p>Any attempt to insert records into the database that are greater than
<b>re_len</b> bytes long will cause the call to fail immediately and
return an error.</p>
<p>The DB-&gt;set_re_len method configures a database, not only operations performed
using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB-&gt;set_re_len method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_re_len will
be ignored.
</p>
<p>The DB-&gt;set_re_len method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>re_len</b><ul compact><li>The <b>re_len</b> parameter is the length of a Queue or Recno database
record, in bytes.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_re_len method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_re_len</b>
<p>The DB-&gt;get_re_len method returns the record length.</p>
<p>The DB-&gt;get_re_len method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_re_len method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>re_lenp</b><ul compact><li>The DB-&gt;get_re_len method returns the
record length in <b>re_lenp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,82 @@
<!--$Id: db_set_re_pad.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_re_pad</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_re_pad</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_re_pad(DB *db, int re_pad);
<p>
int
DB-&gt;get_re_pad(DB *db, int *re_padp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_re_pad</b>
<p>Set the padding character for short, fixed-length records for the Queue
and Recno access methods.</p>
<p>If no pad character is specified, &lt;space&gt; characters (that
is, ASCII 0x20) are used for padding.</p>
<p>The DB-&gt;set_re_pad method configures a database, not only operations performed
using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB-&gt;set_re_pad method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_re_pad will
be ignored.
</p>
<p>The DB-&gt;set_re_pad method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>re_pad</b><ul compact><li>The <b>re_pad</b> parameter is the pad character for fixed-length
records for the Queue and Recno access methods.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_re_pad method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_re_pad</b>
<p>The DB-&gt;get_re_pad method returns the pad character.</p>
<p>The DB-&gt;get_re_pad method may be called at any time during the life of the
application.</p>
<p>The DB-&gt;get_re_pad method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>re_padp</b><ul compact><li>The DB-&gt;get_re_pad method returns the
pad character in <b>re_padp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,116 @@
<!--$Id: db_set_re_source.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;set_re_source</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;set_re_source</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;set_re_source(DB *db, char *source);
<p>
int
DB-&gt;get_re_source(DB *db, const char **sourcep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;set_re_source</b>
<p>Set the underlying source file for the Recno access method. The purpose
of the <b>source</b> value is to provide fast access and modification
to databases that are normally stored as flat text files.</p>
<p>The <b>source</b> parameter specifies an underlying flat text database
file that is read to initialize a transient record number index. In
the case of variable length records, the records are separated, as
specified by <a href="../api_c/db_set_re_delim.html">DB-&gt;set_re_delim</a>. For example, standard UNIX byte
stream files can be interpreted as a sequence of variable length records
separated by &lt;newline&gt; characters.</p>
<p>In addition, when cached data would normally be written back to the
underlying database file (for example, the <a href="../api_c/db_close.html">DB-&gt;close</a> or
<a href="../api_c/db_sync.html">DB-&gt;sync</a> methods are called), the in-memory copy of the database
will be written back to the <b>source</b> file.</p>
<p>By default, the backing source file is read lazily; that is, records
are not read from the file until they are requested by the application.
<b>If multiple processes (not threads) are accessing a Recno database
concurrently, and are either inserting or deleting records, the backing
source file must be read in its entirety before more than a single
process accesses the database, and only that process should specify the
backing source file as part of the <a href="../api_c/db_open.html">DB-&gt;open</a> call. See the
<a href="../api_c/db_set_flags.html#DB_SNAPSHOT">DB_SNAPSHOT</a> flag for more information.</b></p>
<p><b>Reading and writing the backing source file specified by <b>source</b>
cannot be transaction-protected because it involves filesystem
operations that are not part of the Db transaction methodology.</b> For
this reason, if a temporary database is used to hold the records, it is
possible to lose the contents of the <b>source</b> file, for
example, if the system crashes at the right instant. If a file is used
to hold the database, normal database recovery on that file can be used
to prevent information loss, although it is still possible that the
contents of <b>source</b> will be lost if the system crashes.</p>
<p>The <b>source</b> file must already exist (but may be zero-length) when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called.</p>
<p>It is not an error to specify a read-only <b>source</b> file when
creating a database, nor is it an error to modify the resulting database.
However, any attempt to write the changes to the backing source file using
either the <a href="../api_c/db_sync.html">DB-&gt;sync</a> or <a href="../api_c/db_close.html">DB-&gt;close</a> methods will fail, of course.
Specify the <a href="../api_c/db_close.html#DB_NOSYNC">DB_NOSYNC</a> flag to the <a href="../api_c/db_close.html">DB-&gt;close</a> method to stop it
from attempting to write the changes to the backing file; instead, they
will be silently discarded.</p>
<p>For all of the previous reasons, the <b>source</b> field is generally
used to specify databases that are read-only for Berkeley DB applications;
and that are either generated on the fly by software tools or modified
using a different mechanism -- for example, a text editor.</p>
<p>The DB-&gt;set_re_source method configures operations performed using the specified
<a href="../api_c/db_class.html">DB</a> handle, not all operations performed on the underlying
database.</p>
<p>The DB-&gt;set_re_source method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
If the database already exists when
<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_re_source must
be the same as that historically used to create the database or
corruption can occur.</p>
<p>The DB-&gt;set_re_source method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>source</b><ul compact><li>The backing flat text database file for a Recno database.</ul>
<p>When using a Unicode build on Windows (the default), the <b>source</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<br>
<br><b>Errors</b>
<p>The DB-&gt;set_re_source method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;get_re_source</b>
<p>The DB-&gt;get_re_source method returns the source file.</p>
<p>The DB-&gt;get_re_source method may be called at any time during the life of the
application.</p>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

252
docs/api_c/db_stat.html Normal file
View File

@@ -0,0 +1,252 @@
<!--$Id: db_stat.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;stat</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;stat</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;stat(DB *db, DB_TXN *txnid, void *sp, u_int32_t flags);
<p>
int
DB-&gt;stat_print(DB *db, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;stat</b>
<p>The DB-&gt;stat method creates a statistical structure and copies a
pointer to it into user-specified memory locations. Specifically, if
<b>sp</b> is non-NULL, a pointer to the statistics for the database are
copied into the memory location to which it refers.</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
one of the following values:
<br>
<b><a name="DB_FAST_STAT">DB_FAST_STAT</a></b><ul compact><li>Return only the values which do not require traversal of the database.
Among other things, this flag makes it possible for applications to
request key and record counts without incurring the performance penalty
of traversing the entire database.</ul>
<b><a name="DB_READ_COMMITTED">DB_READ_COMMITTED</a></b><ul compact><li>Database items read during a transactional call will have degree 2
isolation. This ensures the stability of the data items read during the
stat operation but permits that data to be modified or deleted by other
transactions prior to the commit of the specified transaction.</ul>
<b><a name="DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></b><ul compact><li>Database items read during a transactional call will have degree 1
isolation, including modified but not yet committed data. Silently
ignored if the <a href="../api_c/db_open.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a> flag was not specified when
the underlying database was opened.</ul> <br></ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
operation occurs in a transactional
database,
the operation will be implicitly transaction protected.
</ul>
<br>
<p>Statistical structures are stored in allocated memory. If application-specific allocation
routines have been declared (see <a href="../api_c/env_set_alloc.html">DB_ENV-&gt;set_alloc</a> for more
information), they are used to allocate the memory; otherwise, the
standard C library <b>malloc</b>(3) is used. The caller is
responsible for deallocating the memory. To deallocate the memory, free
the memory reference; references inside the returned memory need not be
individually freed.</p>
<p>If the DB_FAST_STAT flag has not been specified, the
DB-&gt;stat method will access some of or all the pages in the database,
incurring a severe performance penalty as well as possibly flushing the
underlying buffer pool.</p>
<p>In the presence of multiple threads or processes accessing an active
database, the information returned by DB-&gt;stat may be out-of-date.</p>
<p>If the database was not opened read-only and the DB_FAST_STAT
flag was not specified, the cached key and record numbers will be
updated after the statistical information has been gathered.</p>
<p>The DB-&gt;stat method may not be called before the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.</p>
<p>The DB-&gt;stat method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Hash Statistics</b>
<p>In the case of a Hash database, the statistics are stored in a structure
of type DB_HASH_STAT. The following fields will be filled in:</p>
<br>
<b>u_int32_t hash_magic;</b><ul compact><li>Magic number that identifies the file as a Hash file. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t hash_version;</b><ul compact><li>The version of the Hash database. Returned if DB_FAST_STAT is
set.</ul>
<b>u_int32_t hash_nkeys;</b><ul compact><li>The number of unique keys in the database. If DB_FAST_STAT was
specified the count will be the last saved value unless it has never
been calculated, in which case it will be 0. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t hash_ndata;</b><ul compact><li>The number of key/data pairs in the database. If DB_FAST_STAT
was specified the count will be the last saved value unless it has never
been calculated, in which case it will be 0. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t hash_pagecnt;</b><ul compact><li>The number of pages in the database. Returned if DB_FAST_STAT
is set.</ul>
<b>u_int32_t hash_pagesize;</b><ul compact><li>The underlying database page (and bucket) size, in bytes. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t hash_ffactor;</b><ul compact><li>The desired fill factor (number of items per bucket) specified at
database-creation time. Returned if DB_FAST_STAT is set.</ul>
<b>u_int32_t hash_buckets;</b><ul compact><li>The number of hash buckets. Returned if DB_FAST_STAT is set.</ul>
<b>u_int32_t hash_free;</b><ul compact><li>The number of pages on the free list.</ul>
<b>u_int32_t hash_bfree;</b><ul compact><li>The number of bytes free on bucket pages.</ul>
<b>u_int32_t hash_bigpages;</b><ul compact><li>The number of big key/data pages.</ul>
<b>u_int32_t hash_big_bfree;</b><ul compact><li>The number of bytes free on big item pages.</ul>
<b>u_int32_t hash_overflows;</b><ul compact><li>The number of overflow pages (overflow pages are pages that contain items
that did not fit in the main bucket page).</ul>
<b>u_int32_t hash_ovfl_free;</b><ul compact><li>The number of bytes free on overflow pages.</ul>
<b>u_int32_t hash_dup;</b><ul compact><li>The number of duplicate pages.</ul>
<b>u_int32_t hash_dup_free;</b><ul compact><li>The number of bytes free on duplicate pages.</ul>
<br>
<b>Btree and Recno Statistics</b>
<p>In the case of a Btree or Recno database, the statistics are stored in
a structure of type DB_BTREE_STAT. The following fields will be filled
in:</p>
<br>
<b>u_int32_t bt_magic;</b><ul compact><li>Magic number that identifies the file as a Btree database. Returned
if DB_FAST_STAT is set.</ul>
<b>u_int32_t bt_version;</b><ul compact><li>The version of the Btree database. Returned if DB_FAST_STAT
is set.</ul>
<b>u_int32_t bt_nkeys;</b><ul compact><li>For the Btree Access Method, the number of keys in the database. If
the DB_FAST_STAT flag is not specified or the database was
configured to support record numbers (see <a href="../api_c/db_set_flags.html#DB_RECNUM">DB_RECNUM</a>), the count
will be exact. Otherwise, the count will be the last saved value unless
it has never been calculated, in which case it will be 0.
<p>For the Recno Access Method, the number of records in the database. If
the database was configured with mutable record numbers (see
<a href="../api_c/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a>), the count will be exact. Otherwise, if the
DB_FAST_STAT flag is specified the count will be exact but will
include deleted and implicitly created records; if the
DB_FAST_STAT flag is not specified, the count will be exact and
will not include deleted or implicitly created records.</p>
<p>Returned if DB_FAST_STAT is set.</p></ul>
<b>u_int32_t bt_ndata;</b><ul compact><li>For the Btree Access Method, the number of key/data pairs in the
database. If the DB_FAST_STAT flag is not specified, the count
will be exact. Otherwise, the count will be the last saved value unless
it has never been calculated, in which case it will be 0.
<p>For the Recno Access Method, the number of records in the database. If
the database was configured with mutable record numbers (see
<a href="../api_c/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a>), the count will be exact. Otherwise, if the
DB_FAST_STAT flag is specified the count will be exact but will
include deleted and implicitly created records; if the
DB_FAST_STAT flag is not specified, the count will be exact and
will not include deleted or implicitly created records.</p>
<p>Returned if DB_FAST_STAT is set.</p></ul>
<b>u_int32_t bt_pagecnt;</b><ul compact><li>The number of pages in the database. Returned if DB_FAST_STAT
is set.</ul>
<b>u_int32_t bt_pagesize;</b><ul compact><li>The underlying database page size, in bytes. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t bt_minkey;</b><ul compact><li>The minimum keys per page. Returned if DB_FAST_STAT is set.</ul>
<b>u_int32_t bt_re_len;</b><ul compact><li>The length of fixed-length records. Returned if DB_FAST_STAT
is set.</ul>
<b>u_int32_t bt_re_pad;</b><ul compact><li>The padding byte value for fixed-length records. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t bt_levels;</b><ul compact><li>Number of levels in the database.</ul>
<b>u_int32_t bt_int_pg;</b><ul compact><li>Number of database internal pages.</ul>
<b>u_int32_t bt_leaf_pg;</b><ul compact><li>Number of database leaf pages.</ul>
<b>u_int32_t bt_dup_pg;</b><ul compact><li>Number of database duplicate pages.</ul>
<b>u_int32_t bt_over_pg;</b><ul compact><li>Number of database overflow pages.</ul>
<b>u_int32_t bt_empty_pg;</b><ul compact><li>Number of empty database pages.</ul>
<b>u_int32_t bt_free;</b><ul compact><li>Number of pages on the free list.</ul>
<b>u_int32_t bt_int_pgfree;</b><ul compact><li>Number of bytes free in database internal pages.</ul>
<b>u_int32_t bt_leaf_pgfree;</b><ul compact><li>Number of bytes free in database leaf pages.</ul>
<b>u_int32_t bt_dup_pgfree;</b><ul compact><li>Number of bytes free in database duplicate pages.</ul>
<b>u_int32_t bt_over_pgfree;</b><ul compact><li>Number of bytes free in database overflow pages.</ul>
<br>
<b>Queue Statistics</b>
<p>In the case of a Queue database, the statistics are stored in a
structure of type DB_QUEUE_STAT. The following fields will be filled
in:</p>
<br>
<b>u_int32_t qs_magic;</b><ul compact><li>Magic number that identifies the file as a Queue file. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t qs_version;</b><ul compact><li>The version of the Queue file type. Returned if DB_FAST_STAT
is set.</ul>
<b>u_int32_t qs_nkeys;</b><ul compact><li>The number of records in the database. If DB_FAST_STAT was
specified the count will be the last saved value unless it has never
been calculated, in which case it will be 0. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t qs_ndata;</b><ul compact><li>The number of records in the database. If DB_FAST_STAT was
specified the count will be the last saved value unless it has never
been calculated, in which case it will be 0. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t qs_pagesize;</b><ul compact><li>Underlying database page size, in bytes. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t qs_extentsize;</b><ul compact><li>Underlying database extent size, in pages. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t qs_pages;</b><ul compact><li>Number of pages in the database.</ul>
<b>u_int32_t qs_re_len;</b><ul compact><li>The length of the records. Returned if DB_FAST_STAT is set.</ul>
<b>u_int32_t qs_re_pad;</b><ul compact><li>The padding byte value for the records. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t qs_pgfree;</b><ul compact><li>Number of bytes free in database pages.</ul>
<b>u_int32_t qs_first_recno;</b><ul compact><li>First undeleted record in the database. Returned if
DB_FAST_STAT is set.</ul>
<b>u_int32_t qs_cur_recno;</b><ul compact><li>Next available record number. Returned if DB_FAST_STAT is set.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;stat method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB-&gt;stat_print</b>
<p>The DB-&gt;stat_print method displays the
database statistical information, as described for the DB-&gt;stat method.
The information is printed to a specified output channel (see the
<a href="../api_c/env_set_msgfile.html">DB_ENV-&gt;set_msgfile</a> method for more information), or passed to an
application callback function (see the <a href="../api_c/env_set_msgcall.html">DB_ENV-&gt;set_msgcall</a> method for
more information).</p>
<p>The DB-&gt;stat_print method may not be called before the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.</p>
<p>The DB-&gt;stat_print method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<br>
<b><a name="DB_FAST_STAT">DB_FAST_STAT</a></b><ul compact><li>Return only the values which do not require traversal of the database.
Among other things, this flag makes it possible for applications to
request key and record counts without incurring the performance penalty
of traversing the entire database.</ul>
<b><a name="DB_STAT_ALL">DB_STAT_ALL</a></b><ul compact><li>Display all available information.</ul>
<br></ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

74
docs/api_c/db_sync.html Normal file
View File

@@ -0,0 +1,74 @@
<!--$Id: db_sync.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;sync</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;sync</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;sync(DB *db, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;sync</b>
<p>The DB-&gt;sync method flushes any cached information to disk.</p>
<p>If the database is in memory only, the DB-&gt;sync method has no effect and
will always succeed.</p>
<p><b>It is important to understand that flushing cached information to disk
only minimizes the window of opportunity for corrupted data.</b> Although
unlikely, it is possible for database corruption to happen if a system
or application crash occurs while writing data to the database. To
ensure that database corruption never occurs, applications must either:
use transactions and logging with automatic recovery; use logging and
application-specific recovery; or edit a copy of the database, and once
all applications using the database have successfully called
<a href="../api_c/db_close.html">DB-&gt;close</a>, atomically replace the original database with the
updated copy.</p>
<p>The DB-&gt;sync method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;sync method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,83 @@
<!--$Id: db_truncate.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;truncate</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;truncate</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;truncate(DB *db,
DB_TXN *txnid, u_int32_t *countp, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;truncate</b>
<p>The DB-&gt;truncate method empties the database, discarding all records
it contains. The number of records discarded from the database is
returned in <b>countp</b>.</p>
<p>When called on a database configured with secondary indices using the
<a href="../api_c/db_associate.html">DB-&gt;associate</a> method, the DB-&gt;truncate method truncates the primary
database and all secondary indices. A count of the records discarded
from the primary database is returned.</p>
<p>It is an error to call the DB-&gt;truncate method on a database with open
cursors.</p>
<p>The DB-&gt;truncate method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>countp</b><ul compact><li>The <b>countp</b> parameter references memory into which
the number of records discarded from the database is copied.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
operation occurs in a transactional
database,
the operation will be implicitly transaction protected.
</ul>
<br>
<br><b>Errors</b>
<p>The DB-&gt;truncate method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If there are open cursors in the database; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

103
docs/api_c/db_upgrade.html Normal file
View File

@@ -0,0 +1,103 @@
<!--$Id: db_upgrade.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;upgrade</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;upgrade</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;upgrade(DB *db, const char *file, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;upgrade</b>
<p>The DB-&gt;upgrade method upgrades all of the databases included in the
file <b>file</b>, if necessary. If no upgrade is necessary,
DB-&gt;upgrade always returns success.</p>
<p><b>Database upgrades are done in place and are destructive. For example,
if pages need to be allocated and no disk space is available, the
database may be left corrupted. Backups should be made before databases
are upgraded. See <a href="../ref/am/upgrade.html">Upgrading databases</a>
for more information.</b></p>
<p>Unlike all other database operations, DB-&gt;upgrade may only be done
on a system with the same byte-order as the database.</p>
<p>The DB-&gt;upgrade method
returns a non-zero error value on failure
and 0 on success.
</p>
<p>The DB-&gt;upgrade method is the underlying method used by the <a href="../utility/db_upgrade.html">db_upgrade</a> utility.
See the <a href="../utility/db_upgrade.html">db_upgrade</a> utility source code for an example of using DB-&gt;upgrade
in a IEEE/ANSI Std 1003.1 (POSIX) environment.</p>
<b>Parameters</b> <br>
<b>file</b><ul compact><li>The <b>file</b> parameter is the physical file containing the databases
to be upgraded.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_DUPSORT">DB_DUPSORT</a></b><ul compact><li><b>This flag is only meaningful when upgrading databases from
releases before the Berkeley DB 3.1 release.</b>
<p>As part of the upgrade from the Berkeley DB 3.0 release to the 3.1 release,
the on-disk format of duplicate data items changed. To correctly
upgrade the format requires applications to specify whether duplicate
data items in the database are sorted or not. Specifying the
DB_DUPSORT flag informs DB-&gt;upgrade that the duplicates
are sorted; otherwise they are assumed to be unsorted. Incorrectly
specifying the value of this flag may lead to database corruption.</p>
<p>Further, because the DB-&gt;upgrade method upgrades a physical file
(including all the databases it contains), it is not possible to use
DB-&gt;upgrade to upgrade files in which some of the databases it
includes have sorted duplicate data items, and some of the databases it
includes have unsorted duplicate data items. If the file does not have
more than a single database, if the databases do not support duplicate
data items, or if all of the databases that support duplicate data items
support the same style of duplicates (either sorted or unsorted),
DB-&gt;upgrade will work correctly as long as the
DB_DUPSORT flag is correctly specified. Otherwise, the file
cannot be upgraded using DB-&gt;upgrade; it must be upgraded
manually by dumping and reloading the databases.</p></ul>
<br></ul>
<br>
<br><b>Environment Variables</b>
<p>If the database was opened within a database environment, the
environment variable <b>DB_HOME</b> may be used as the path of the
database environment home.</p>
<p>DB-&gt;upgrade is affected by any database directory specified using
the <a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a> method, or by setting the "set_data_dir" string
in the environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.</p>
<br><b>Errors</b>
<p>The DB-&gt;upgrade method
may fail and return one of the following non-zero errors:</p>
<br>
<b><a name="DB_OLD_VERSION">DB_OLD_VERSION</a></b><ul compact><li>The database cannot be upgraded by this version of the Berkeley DB software.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If the database is not in the same byte-order as the system; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

146
docs/api_c/db_verify.html Normal file
View File

@@ -0,0 +1,146 @@
<!--$Id: db_verify.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB-&gt;verify</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB-&gt;verify</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB-&gt;verify(DB *db, const char *file,
const char *database, FILE *outfile, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB-&gt;verify</b>
<p>The DB-&gt;verify method verifies the integrity of all databases in the
file specified by the <b>file</b> parameter, and optionally outputs the
databases' key/data pairs to the file stream specified by the
<b>outfile</b> parameter.</p>
<p><b>The DB-&gt;verify method does not perform any locking, even in Berkeley DB
environments that are configured with a locking subsystem. As such, it
should only be used on files that are not being modified by another
thread of control.</b></p>
<p>The DB-&gt;verify method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
</p>
<p>The <a href="../api_c/db_class.html">DB</a> handle may not be accessed again after DB-&gt;verify is
called, regardless of its return.</p>
<p>The DB-&gt;verify method is the underlying method used by the <a href="../utility/db_verify.html">db_verify</a> utility.
See the <a href="../utility/db_verify.html">db_verify</a> utility source code for an example of using DB-&gt;verify
in a IEEE/ANSI Std 1003.1 (POSIX) environment.</p>
<a name="2"><!--meow--></a>
<p>The DB-&gt;verify method will return DB_VERIFY_BAD if a database is
corrupted. When the DB_SALVAGE flag is specified, the
DB_VERIFY_BAD return means that all key/data pairs in the file
may not have been successfully output.
Unless otherwise specified, the DB-&gt;verify method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>database</b><ul compact><li>The <b>database</b> parameter is the database in <b>file</b> on which
the database checks for btree and duplicate sort order and for hashing
are to be performed. See the DB_ORDERCHKONLY flag for more
information.
<p>The database parameter must be set to NULL except when the
DB_ORDERCHKONLY flag is set.</p></ul>
<b>file</b><ul compact><li>The <b>file</b> parameter is the physical file in which the databases
to be verified are found.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_SALVAGE">DB_SALVAGE</a></b><ul compact><li>Write the key/data pairs from all databases in the file to the file
stream named in the <b>outfile</b> parameter. Key values are written
for Btree, Hash and Queue databases, but not for Recno databases.
<p>The output format is the same as that specified for the <a href="../utility/db_dump.html">db_dump</a>
utility, and can be used as input for the <a href="../utility/db_load.html">db_load</a> utility.</p>
<p>Because the key/data pairs are output in page order as opposed to the sort
order used by <a href="../utility/db_dump.html">db_dump</a>, using DB-&gt;verify to dump key/data
pairs normally produces less than optimal loads for Btree databases.</p></ul>
<br>
<p>In addition, the following flags may be set by bitwise inclusively <b>OR</b>'ing them into the
<b>flags</b> parameter:</p>
<br>
<b><a name="DB_AGGRESSIVE">DB_AGGRESSIVE</a></b><ul compact><li>Output <b>all</b> the key/data pairs in the file that can be found.
By default, DB-&gt;verify does not assume corruption. For example,
if a key/data pair on a page is marked as deleted, it is not then written
to the output file. When DB_AGGRESSIVE is specified, corruption
is assumed, and any key/data pair that can be found is written. In this
case, key/data pairs that are corrupted or have been deleted may appear
in the output (even if the file being salvaged is in no way corrupt), and
the output will almost certainly require editing before being loaded into
a database.</ul>
<b><a name="DB_PRINTABLE">DB_PRINTABLE</a></b><ul compact><li>When using the DB_SALVAGE flag, if characters in either the key
or data items are printing characters (as defined by <b>isprint</b>(3)), use printing characters to represent them. This flag permits users
to use standard text editors and tools to modify the contents of
databases or selectively remove data from salvager output.
<p>Note: different systems may have different notions about what characters
are considered <i>printing characters</i>, and databases dumped in
this manner may be less portable to external systems.</p></ul>
<b><a name="DB_NOORDERCHK">DB_NOORDERCHK</a></b><ul compact><li>Skip the database checks for btree and duplicate sort order and for
hashing.
<p>The DB-&gt;verify method normally verifies that btree keys and duplicate
items are correctly sorted, and hash keys are correctly hashed. If the
file being verified contains multiple databases using differing sorting
or hashing algorithms, some of them must necessarily fail database
verification because only one sort order or hash function can be
specified before DB-&gt;verify is called. To verify files with
multiple databases having differing sorting orders or hashing functions,
first perform verification of the file as a whole by using the
DB_NOORDERCHK flag, and then individually verify the sort order
and hashing function for each database in the file using the
DB_ORDERCHKONLY flag.</p></ul>
<b><a name="DB_ORDERCHKONLY">DB_ORDERCHKONLY</a></b><ul compact><li>Perform the database checks for btree and duplicate sort order and for
hashing, skipped by DB_NOORDERCHK.
<p>When this flag is specified, a <b>database</b> parameter should also be
specified, indicating the database in the physical file which is to be
checked. This flag is only safe to use on databases that have already
successfully been verified using DB-&gt;verify with the
DB_NOORDERCHK flag set.</p></ul>
<br></ul>
<b>outfile</b><ul compact><li>The <b>outfile</b> parameter is an optional file stream to which the
databases' key/data pairs are written.</ul>
<br>
<br><b>Environment Variables</b>
<p>If the database was opened within a database environment, the
environment variable <b>DB_HOME</b> may be used as the path of the
database environment home.</p>
<p>DB-&gt;verify is affected by any database directory specified using
the <a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a> method, or by setting the "set_data_dir" string
in the environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.</p>
<br><b>Errors</b>
<br>
<b>ENOENT</b><ul compact><li>The file or directory does not exist.</ul>
<br>
<p>The DB-&gt;verify method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If DB-&gt;verify was called after <a href="../api_c/db_open.html">DB-&gt;open</a>; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/db_class.html">DB</a>
<br><b>See Also</b>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

42
docs/api_c/dbc_class.html Normal file
View File

@@ -0,0 +1,42 @@
<!--$Id: dbc_class.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBC</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBC</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
typedef struct __dbc DBC;
</pre></b>
<hr size=1 noshade>
<b>Description: DBC</b>
<p>The DBC object is the handle for a cursor into a Berkeley DB database.
The handle is not free-threaded. Cursor handles may be used by multiple
threads, but only serially, that is, the application must serialize
access to the DBC handle.</p>
<p>If the cursor is to be used to perform operations on behalf of a
transaction, the cursor must be opened and closed within the context of
that single transaction. Once <a href="../api_c/dbc_close.html">DBcursor-&gt;close</a> has been called, the
handle may not be accessed again, regardless of the method's return.</p>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

65
docs/api_c/dbc_close.html Normal file
View File

@@ -0,0 +1,65 @@
<!--$Id: dbc_close.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBcursor-&gt;close</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBcursor-&gt;close</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DBcursor-&gt;close(DBC *DBcursor);
</pre></b>
<hr size=1 noshade>
<b>Description: DBcursor-&gt;close</b>
<p>The DBcursor-&gt;close method discards the cursor.</p>
<p>It is possible for the DBcursor-&gt;close method to return
<a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a>, signaling that any enclosing transaction should
be aborted. If the application is already intending to abort the
transaction, this error should be ignored, and the application should
proceed.</p>
<p>After DBcursor-&gt;close has been called, regardless of its return, the
cursor handle may not be used again.</p>
<p>The DBcursor-&gt;close method
returns a non-zero error value on failure
and 0 on success.
</p>
<br><b>Errors</b>
<p>The DBcursor-&gt;close method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If the cursor is already closed; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/dbc_class.html">DBC</a>
<br><b>See Also</b>
<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

65
docs/api_c/dbc_count.html Normal file
View File

@@ -0,0 +1,65 @@
<!--$Id: dbc_count.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBcursor-&gt;count</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBcursor-&gt;count</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DBcursor-&gt;count(DBC *DBcursor, db_recno_t *countp, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DBcursor-&gt;count</b>
<p>The DBcursor-&gt;count method returns a count of the number of data items for
the key to which the cursor refers.</p>
<p>The DBcursor-&gt;count method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>countp</b><ul compact><li>The <b>countp</b> parameter references memory into which
the count of the number of duplicate data items is copied.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<br>
<br><b>Errors</b>
<p>The DBcursor-&gt;count method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If the cursor has not been initialized; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/dbc_class.html">DBC</a>
<br><b>See Also</b>
<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

87
docs/api_c/dbc_del.html Normal file
View File

@@ -0,0 +1,87 @@
<!--$Id: dbc_del.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBcursor-&gt;del</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBcursor-&gt;del</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DBcursor-&gt;del(DBC *DBcursor, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DBcursor-&gt;del</b>
<p>The DBcursor-&gt;del method deletes the key/data pair to which the cursor
refers.</p>
<p>When called on a cursor opened on a database that has been made into a
secondary index using the <a href="../api_c/db_associate.html">DB-&gt;associate</a> method, the <a href="../api_c/db_del.html">DB-&gt;del</a> method
deletes the key/data pair from the primary database and all secondary
indices.</p>
<p>The cursor position is unchanged after a delete, and subsequent calls to
cursor functions expecting the cursor to refer to an existing key will
fail.</p>
<p>The DBcursor-&gt;del method will return <a href="../ref/program/errorret.html#DB_KEYEMPTY">DB_KEYEMPTY</a> if the element has already been deleted.
Unless otherwise specified, the DBcursor-&gt;del method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<br>
<br><b>Errors</b>
<p>The DBcursor-&gt;del method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>DB_SECONDARY_BAD</b><ul compact><li>A secondary index references a nonexistent primary key.</ul>
<br>
<br>
<b>EACCES</b><ul compact><li>An attempt was made to modify a read-only database.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If the cursor has not been initialized; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>EPERM </b><ul compact><li>Write attempted on read-only cursor when the <a href="../api_c/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a> flag was
specified to <a href="../api_c/env_open.html">DB_ENV-&gt;open</a>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/dbc_class.html">DBC</a>
<br><b>See Also</b>
<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

74
docs/api_c/dbc_dup.html Normal file
View File

@@ -0,0 +1,74 @@
<!--$Id: dbc_dup.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBcursor-&gt;dup</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBcursor-&gt;dup</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DBcursor-&gt;dup(DBC *DBcursor, DBC **cursorp, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DBcursor-&gt;dup</b>
<p>The DBcursor-&gt;dup method creates a 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.</p>
<p>The DBcursor-&gt;dup method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<br>
<b><a name="DB_POSITION">DB_POSITION</a></b><ul compact><li>The newly created cursor is initialized to refer to the same position
in the database as the original cursor (if any) and hold the same locks
(if any). If the DB_POSITION flag is not specified, or the
original cursor does not hold a database position and locks, the created
cursor is uninitialized and will behave like a cursor newly created
using <a href="../api_c/db_cursor.html">DB-&gt;cursor</a>.</ul>
<br></ul>
<br>
<br><b>Errors</b>
<p>The DBcursor-&gt;dup method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/dbc_class.html">DBC</a>
<br><b>See Also</b>
<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

329
docs/api_c/dbc_get.html Normal file
View File

@@ -0,0 +1,329 @@
<!--$Id: dbc_get.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBcursor-&gt;get</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBcursor-&gt;get</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DBcursor-&gt;get(DBC *DBcursor,
DBT *key, DBT *data, u_int32_t flags);
<p>
int
DBcursor-&gt;pget(DBC *DBcursor,
DBT *key, DBT *pkey, DBT *data, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DBcursor-&gt;get</b>
<p>The DBcursor-&gt;get method retrieves key/data pairs from the database. The
address and length of the key are returned in the object to which
<b>key</b> refers (except for the case of the DB_SET flag, in
which the <b>key</b> object is unchanged), and the address and length
of the data are returned in the object to which <b>data</b> refers.</p>
<p>When called on a cursor opened on a database that has been made into a
secondary index using the <a href="../api_c/db_associate.html">DB-&gt;associate</a> method, the DBcursor-&gt;get
and DBcursor-&gt;pget methods return the key from the secondary index and the
data item from the primary database. In addition, the DBcursor-&gt;pget method
returns the key from the primary database. In databases that are not
secondary indices, the DBcursor-&gt;pget method will always fail.</p>
<p>Modifications to the database during a sequential scan will be reflected
in the scan; that is, records inserted behind a cursor will not be
returned while records inserted in front of a cursor will be returned.</p>
<p>In Queue and Recno databases, missing entries (that is, entries that
were never explicitly created or that were created and then deleted)
will be skipped during a sequential scan.</p>
<p>Unless otherwise specified, the DBcursor-&gt;get method
returns a non-zero error value on failure
and 0 on success.
</p>
<p>If DBcursor-&gt;get fails for any reason, the state of the cursor will be
unchanged.</p>
<b>Parameters</b> <br>
<b>data</b><ul compact><li>The data <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to one of the following values:
<br>
<b><a name="DB_CURRENT">DB_CURRENT</a></b><ul compact><li>Return the key/data pair to which the cursor refers.
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_KEYEMPTY">DB_KEYEMPTY</a> if DB_CURRENT is set and the cursor key/data pair was deleted.
</p></ul>
<b><a name="DB_FIRST">DB_FIRST</a></b><ul compact><li>The cursor is set to refer to the first key/data pair of the database,
and that pair is returned. If the first key has duplicate values, the
first data item in the set of duplicates is returned.
<p>If the database is a Queue or Recno database, DBcursor-&gt;get using the
DB_FIRST flag will ignore any keys that exist but were never
explicitly created by the application, or were created and later
deleted.</p>
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if DB_FIRST is set and the database is empty.
</p></ul>
<b><a name="DB_GET_BOTH">DB_GET_BOTH</a></b><ul compact><li>The DB_GET_BOTH flag is identical to the DB_SET flag,
except that both the key and the data parameters must be matched by the
key and data item in the database.
<p>When used with the DBcursor-&gt;pget method version of this method on a
secondary index handle, both the secondary and primary keys must be
matched by the secondary and primary key item in the database. It is
an error to use the DB_GET_BOTH flag with the DBcursor-&gt;get
version of this method and a cursor that has been opened on a secondary
index handle.</p></ul>
<b><a name="DB_GET_BOTH_RANGE">DB_GET_BOTH_RANGE</a></b><ul compact><li>The DB_GET_BOTH_RANGE flag is identical to the DB_GET_BOTH
flag, except that, in the case of any database supporting sorted
duplicate sets, the returned key/data pair is the smallest data item
greater than or equal to the specified data item (as determined by the
comparison function), permitting partial matches and range searches in
duplicate data sets.</ul>
<b><a name="DB_GET_RECNO">DB_GET_RECNO</a></b><ul compact><li>Return the record number associated with the cursor. The record number
will be returned in <b>data</b>, as described in <a href="../api_c/dbt_class.html">DBT</a>. The
<b>key</b> parameter is ignored.
<p>For DB_GET_RECNO to be specified, the underlying database must be
of type Btree, and it must have been created with the <a href="../api_c/db_set_flags.html#DB_RECNUM">DB_RECNUM</a>
flag.</p>
<p>When called on a cursor opened on a database that has been made into a
secondary index, the DBcursor-&gt;get and DBcursor-&gt;pget methods return the
record number of the primary database in <b>data</b>. In addition, the
DBcursor-&gt;pget method returns the record number of the secondary index in
<b>pkey</b>. If either underlying database is not of type Btree or is
not created with the <a href="../api_c/db_set_flags.html#DB_RECNUM">DB_RECNUM</a> flag, the out-of-band record
number of 0 is returned.</p></ul>
<b><a name="DB_JOIN_ITEM">DB_JOIN_ITEM</a></b><ul compact><li>Do not use the data value found in all of the cursors as a lookup key for
the primary database, but simply return it in the key parameter instead.
The data parameter is left unchanged.
<p>For DB_JOIN_ITEM to be specified, the underlying cursor must have
been returned from the <a href="../api_c/db_join.html">DB-&gt;join</a> method.</p></ul>
<b><a name="DB_LAST">DB_LAST</a></b><ul compact><li>The cursor is set to refer to the last key/data pair of the database,
and that pair is returned. If the last key has duplicate values, the
last data item in the set of duplicates is returned.
<p>If the database is a Queue or Recno database, DBcursor-&gt;get using the
DB_LAST flag will ignore any keys that exist but were never
explicitly created by the application, or were created and later
deleted.</p>
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if DB_LAST is set and the database is empty.
</p></ul>
<b><a name="DB_NEXT">DB_NEXT</a></b><ul compact><li>If the cursor is not yet initialized, DB_NEXT is identical to
DB_FIRST. Otherwise, the cursor is moved to the next key/data
pair of the database, and that pair is returned. In the presence of
duplicate key values, the value of the key may not change.
<p>If the database is a Queue or Recno database, DBcursor-&gt;get using the
DB_NEXT flag will skip any keys that exist but were never
explicitly created by the application, or those that were created and
later deleted.</p>
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if DB_NEXT is set and the cursor is already on the last record
in the database.
</p></ul>
<b><a name="DB_NEXT_DUP">DB_NEXT_DUP</a></b><ul compact><li>If the next key/data pair of the database is a duplicate data record for
the current key/data pair, the cursor is moved to the next key/data pair
of the database, and that pair is returned.
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if DB_NEXT_DUP is set and the next key/data pair of the
database is not a duplicate data record for the current key/data pair.
</p></ul>
<b><a name="DB_NEXT_NODUP">DB_NEXT_NODUP</a></b><ul compact><li>If the cursor is not yet initialized, DB_NEXT_NODUP is identical
to DB_FIRST. Otherwise, the cursor is moved to the next
non-duplicate key of the database, and that key/data pair is returned.
<p>If the database is a Queue or Recno database, DBcursor-&gt;get using the
DB_NEXT_NODUP flag will ignore any keys that exist but were
never explicitly created by the application, or those that were created
and later deleted.</p>
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if DB_NEXT_NODUP is set and no non-duplicate key/data pairs
occur after the cursor position in the database.
</p></ul>
<b><a name="DB_PREV">DB_PREV</a></b><ul compact><li>If the cursor is not yet initialized, DB_PREV is identical to
DB_LAST. Otherwise, the cursor is moved to the previous
key/data pair of the database, and that pair is returned. In the
presence of duplicate key values, the value of the key may not change.
<p>If the database is a Queue or Recno database, DBcursor-&gt;get using the
DB_PREV flag will skip any keys that exist but were never
explicitly created by the application, or those that were created and
later deleted.</p>
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if DB_PREV is set and the cursor is already on the first record
in the database.
</p></ul>
<b><a name="DB_PREV_DUP">DB_PREV_DUP</a></b><ul compact><li>If the previous key/data pair of the database is a duplicate data record
for the current key/data pair, the cursor is moved to the previous key/data
pair of the database, and that pair is returned.
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if DB_PREV_DUP is set and the previous key/data pair of the
database is not a duplicate data record for the current key/data pair.
</p></ul>
<b><a name="DB_PREV_NODUP">DB_PREV_NODUP</a></b><ul compact><li>If the cursor is not yet initialized, DB_PREV_NODUP is identical
to DB_LAST. Otherwise, the cursor is moved to the previous
non-duplicate key of the database, and that key/data pair is returned.
<p>If the database is a Queue or Recno database, DBcursor-&gt;get using the
DB_PREV_NODUP flag will ignore any keys that exist but were
never explicitly created by the application, or those that were created
and later deleted.</p>
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if DB_PREV_NODUP is set and no non-duplicate key/data pairs
occur before the cursor position in the database.
</p></ul>
<b><a name="DB_SET">DB_SET</a></b><ul compact><li>Move the cursor to the specified key/data pair of the database, and
return the datum associated with the given key.
<p>The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if DB_SET is set and
no matching keys are found.
The DBcursor-&gt;get method will return <a href="../ref/program/errorret.html#DB_KEYEMPTY">DB_KEYEMPTY</a> if DB_SET is set and the database is a
Queue or Recno database, and the specified key exists, but was never
explicitly created by the application or was later deleted.
In the presence of duplicate key values, DBcursor-&gt;get will return the
first data item for the given key.
</p></ul>
<b><a name="DB_SET_RANGE">DB_SET_RANGE</a></b><ul compact><li>The DB_SET_RANGE flag is identical to the DB_SET flag,
except that in the case of the Btree access method, the key is returned
as well as the data item and the returned key/data pair is the smallest
key greater than or equal to the specified key (as determined by the
Btree comparison function), permitting partial key matches and range
searches.</ul>
<b><a name="DB_SET_RECNO">DB_SET_RECNO</a></b><ul compact><li>Move the cursor to the specific numbered record of the database, and
return the associated key/data pair. The <b>data</b> field of the
specified <b>key</b> must be a pointer to a memory location from which
a <a href="../api_c/dbt_class.html#db_recno_t">db_recno_t</a> may be read, as described in <a href="../api_c/dbt_class.html">DBT</a>. This
memory location will be read to determine the record to be retrieved.
<p>For DB_SET_RECNO to be specified, the underlying database must be
of type Btree, and it must have been created with the <a href="../api_c/db_set_flags.html#DB_RECNUM">DB_RECNUM</a>
flag.</p></ul>
<br>
In addition, the following flags may be set by
bitwise inclusively <b>OR</b>'ing them into the <b>flags</b> parameter:
<br>
<b><a name="DB_IGNORE_LEASE">DB_IGNORE_LEASE</a></b><ul compact><li>Return the data item irrespective of the state of master leases. The
item will be returned under all conditions: if master leases are not
configured, if the request is made to a client, if the request is made
to a master with a valid lease, or if the request is made to a master
without a valid lease.</ul>
<b><a name="DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></b><ul compact><li>Database items read during a transactional call will have degree 1
isolation, including modified but not yet committed data. Silently
ignored if the <a href="../api_c/db_open.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a> flag was not specified when
the underlying database was opened.</ul>
<b><a name="DB_MULTIPLE">DB_MULTIPLE</a></b><ul compact><li>Return multiple data items in the <b>data</b> parameter.
<p>In the case of Btree or Hash databases, duplicate data items for the
current key, starting at the current cursor position, are entered into
the buffer. Subsequent calls with both the DB_NEXT_DUP and
DB_MULTIPLE flags specified will return additional duplicate
data items associated with the current key or <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if
there are no additional duplicate data items to return. Subsequent
calls with both the DB_NEXT and DB_MULTIPLE flags
specified will return additional duplicate data items associated with
the current key or if there are no additional duplicate data items will
return the next key and its data items or <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if there
are no additional keys in the database.</p>
<p>In the case of Queue or Recno databases, data items starting at the
current cursor position are entered into the buffer. The record number
of the first record will be returned in the <b>key</b> parameter. The
record number of each subsequent returned record must be calculated from
this value. Subsequent calls with the DB_MULTIPLE flag
specified will return additional data items or <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if
there are no additional data items to return.</p>
<p>The buffer to which the <b>data</b> parameter refers must be provided
from user memory (see <a href="../api_c/dbt_class.html#DB_DBT_USERMEM">DB_DBT_USERMEM</a>). The buffer must be at
least as large as the page size of the underlying database, aligned for
unsigned integer access, and be a multiple of 1024 bytes in size. If
the buffer size is insufficient, then upon return from the call the size
field of the <b>data</b> parameter will have been set to an estimated
buffer size, and the error DB_BUFFER_SMALL is returned. (The size is an estimate as the
exact size needed may not be known until all entries are read. It is
best to initially provide a relatively large buffer, but applications
should be prepared to resize the buffer as necessary and repeatedly call
the method.)</p>
<p>The multiple data items can be iterated over using the
<a href="../api_c/dbt_bulk.html#DB_MULTIPLE_NEXT">DB_MULTIPLE_NEXT</a> macro.</p>
<p>The DB_MULTIPLE flag may only be used with the
DB_CURRENT, DB_FIRST, DB_GET_BOTH,
DB_GET_BOTH_RANGE, DB_NEXT, DB_NEXT_DUP,
DB_NEXT_NODUP, DB_SET, DB_SET_RANGE, and
DB_SET_RECNO options. The DB_MULTIPLE flag may not be
used when accessing databases made into secondary indices using the
<a href="../api_c/db_associate.html">DB-&gt;associate</a> method.</p></ul>
<b><a name="DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a></b><ul compact><li>Return multiple key and data pairs in the <b>data</b> parameter.
<p>Key and data pairs, starting at the current cursor position, are entered
into the buffer. Subsequent calls with both the DB_NEXT and
DB_MULTIPLE_KEY flags specified will return additional key and data
pairs or <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if there are no additional key and data
items to return.</p>
<p>In the case of Btree or Hash databases,
the multiple key and data pairs can be iterated over using the
<a href="../api_c/dbt_bulk.html#DB_MULTIPLE_KEY_NEXT">DB_MULTIPLE_KEY_NEXT</a> macro.</p>
<p>In the case of Queue or Recno databases,
the multiple record number and data pairs can be iterated over using the
<a href="../api_c/dbt_bulk.html#DB_MULTIPLE_RECNO_NEXT">DB_MULTIPLE_RECNO_NEXT</a> macro.</p>
<p>The buffer to which the <b>data</b> parameter refers must be provided
from user memory (see <a href="../api_c/dbt_class.html#DB_DBT_USERMEM">DB_DBT_USERMEM</a>). The buffer must be at
least as large as the page size of the underlying database, aligned for
unsigned integer access, and be a multiple of 1024 bytes in size. If
the buffer size is insufficient, then upon return from the call the size
field of the <b>data</b> parameter will have been set to an estimated
buffer size, and the error DB_BUFFER_SMALL is returned. (The size is an estimate as the
exact size needed may not be known until all entries are read. It is
best to initially provide a relatively large buffer, but applications
should be prepared to resize the buffer as necessary and repeatedly call
the method.)</p>
<p>The DB_MULTIPLE_KEY flag may only be used with the
DB_CURRENT, DB_FIRST, DB_GET_BOTH,
DB_GET_BOTH_RANGE, DB_NEXT, DB_NEXT_DUP,
DB_NEXT_NODUP, DB_SET, DB_SET_RANGE, and
DB_SET_RECNO options. The DB_MULTIPLE_KEY flag may not
be used when accessing databases made into secondary indices using the
<a href="../api_c/db_associate.html">DB-&gt;associate</a> method.</p></ul>
<b><a name="DB_RMW">DB_RMW</a></b><ul compact><li>Acquire write locks instead of read locks when doing the read, if
locking is configured. Setting this flag can eliminate deadlock during
a read-modify-write cycle by acquiring the write lock during the read
part of the cycle so that another thread of control acquiring a read
lock for the same item, in its own read-modify-write cycle, will not
result in deadlock.
</ul>
<br></ul>
<b>key</b><ul compact><li>The key <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>pkey</b><ul compact><li>The secondary index key <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<br>
<br><b>Errors</b>
<p>The DBcursor-&gt;get method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_BUFFER_SMALL</b><ul compact><li>The requested item could not be returned due to undersized buffer.</ul>
<br>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LEASE_EXPIRED</b><ul compact><li>The operation failed because the site's replication master lease has expired.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>DB_SECONDARY_BAD</b><ul compact><li>A secondary index references a nonexistent primary key.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If the DB_CURRENT, DB_NEXT_DUP or DB_PREV_DUP flags
were specified and the cursor has not been initialized;
the DBcursor-&gt;pget method was called with a cursor that does not refer to a
secondary index; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/dbc_class.html">DBC</a>
<br><b>See Also</b>
<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

26
docs/api_c/dbc_list.html Normal file
View File

@@ -0,0 +1,26 @@
<!--$Id: dbc_list.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: Berkeley DB: Database Cursors and Related Methods</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<p align=center><b>Berkeley DB: Database Cursors and Related Methods</b></p>
<!--$Id: dbc_list.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<table border=1 align=center>
<tr><th>Database Cursors and Related Methods</th><th>Description</th></tr>
<!--Db::cursor--><tr><td><a href="../api_c/db_cursor.html">DB-&gt;cursor</a></td><td>Create a cursor</td></tr>
<!--DbCursor::close--><tr><td><a href="../api_c/dbc_close.html">DBcursor-&gt;close</a></td><td>Close a cursor</td></tr>
<!--DbCursor::count--><tr><td><a href="../api_c/dbc_count.html">DBcursor-&gt;count</a></td><td>Return count of duplicates</td></tr>
<!--DbCursor::del--><tr><td><a href="../api_c/dbc_del.html">DBcursor-&gt;del</a></td><td>Delete by cursor</td></tr>
<!--DbCursor::dup--><tr><td><a href="../api_c/dbc_dup.html">DBcursor-&gt;dup</a></td><td>Duplicate a cursor</td></tr>
<!--DbCursor::get--><tr><td><a href="../api_c/dbc_get.html">DBcursor-&gt;get</a>, <a href="../api_c/dbc_get.html">DBcursor-&gt;pget</a></td><td>Retrieve by cursor</td></tr>
<!--DbCursor::put--><tr><td><a href="../api_c/dbc_put.html">DBcursor-&gt;put</a></td><td>Store by cursor</td></tr>
<!--DbCursor::set_priority--><tr><td><a href="../api_c/dbc_set_priority.html">DBcursor-&gt;set_priority</a></td><td>Set the cursor's cache priority</td></tr>
</table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

156
docs/api_c/dbc_put.html Normal file
View File

@@ -0,0 +1,156 @@
<!--$Id: dbc_put.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBcursor-&gt;put</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBcursor-&gt;put</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DBcursor-&gt;put(DBC *DBcursor, DBT *key, DBT *data, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DBcursor-&gt;put</b>
<p>The DBcursor-&gt;put method stores key/data pairs into the database.</p>
<p>Unless otherwise specified, the DBcursor-&gt;put method
returns a non-zero error value on failure
and 0 on success.
</p>
<p>If DBcursor-&gt;put fails for any reason, the state of the cursor will be
unchanged. If DBcursor-&gt;put succeeds and an item is inserted into the
database, the cursor is always positioned to refer to the newly inserted
item.</p>
<b>Parameters</b> <br>
<b>data</b><ul compact><li>The data <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to one of the following values:
<br>
<b><a name="DB_AFTER">DB_AFTER</a></b><ul compact><li>In the case of the Btree and Hash access methods, insert the data
element as a duplicate element of the key to which the cursor refers.
The new element appears immediately after the current cursor position.
It is an error to specify DB_AFTER if the underlying Btree or
Hash database is not configured for unsorted duplicate data items. The
<b>key</b> parameter is ignored.
<p>In the case of the Recno access method, it is an error to specify
DB_AFTER if the underlying Recno database was not created with
the <a href="../api_c/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a> flag. If the <a href="../api_c/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a> flag was
specified, a new key is created, all records after the inserted item
are automatically renumbered, and the key of the new record is returned
in the structure to which the <b>key</b> parameter refers. The initial
value of the <b>key</b> parameter is ignored. See <a href="../api_c/db_open.html">DB-&gt;open</a>
for more information.</p>
<p>The DB_AFTER flag may not be specified to the Queue access method.</p>
<p>The DBcursor-&gt;put method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if the current cursor record has already been deleted and the
underlying access method is Hash.
</p></ul>
<b><a name="DB_BEFORE">DB_BEFORE</a></b><ul compact><li>In the case of the Btree and Hash access methods, insert the data
element as a duplicate element of the key to which the cursor refers.
The new element appears immediately before the current cursor position.
It is an error to specify DB_AFTER if the underlying Btree or
Hash database is not configured for unsorted duplicate data items. The
<b>key</b> parameter is ignored.
<p>In the case of the Recno access method, it is an error to specify
DB_BEFORE if the underlying Recno database was not created with
the <a href="../api_c/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a> flag. If the <a href="../api_c/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a> flag was
specified, a new key is created, the current record and all records
after it are automatically renumbered, and the key of the new record is
returned in the structure to which the <b>key</b> parameter refers.
The initial value of the <b>key</b> parameter is ignored. See
<a href="../api_c/db_open.html">DB-&gt;open</a> for more information.</p>
<p>The DB_BEFORE flag may not be specified to the Queue access method.</p>
<p>The DBcursor-&gt;put method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if the current cursor record has already been deleted and the underlying
access method is Hash.
</p></ul>
<b><a name="DB_CURRENT">DB_CURRENT</a></b><ul compact><li>Overwrite the data of the key/data pair to which the cursor refers with
the specified data item. The <b>key</b> parameter is ignored.
<p>The DBcursor-&gt;put method will return <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a> if the current cursor record has already been deleted.
</p></ul>
<b><a name="DB_KEYFIRST">DB_KEYFIRST</a></b><ul compact><li>Insert the specified key/data pair into the database.
<p>If the underlying database supports duplicate data items, and if the
key already exists in the database and a duplicate sort function has
been specified, the inserted data item is added in its sorted location.
If the key already exists in the database and no duplicate sort function
has been specified, the inserted data item is added as the first of the
data items for that key.</p></ul>
<b><a name="DB_KEYLAST">DB_KEYLAST</a></b><ul compact><li>Insert the specified key/data pair into the database.
<p>If the underlying database supports duplicate data items, and if the
key already exists in the database and a duplicate sort function has
been specified, the inserted data item is added in its sorted location.
If the key already exists in the database, and no duplicate sort
function has been specified, the inserted data item is added as the last
of the data items for that key.</p></ul>
<b><a name="DB_NODUPDATA">DB_NODUPDATA</a></b><ul compact><li>In the case of the Btree and Hash access methods, insert the specified
key/data pair into the database, unless a key/data pair comparing
equally to it already exists in the database. If a matching key/data
pair already exists in the database, <a href="../api_c/dbc_put.html#DB_KEYEXIST">DB_KEYEXIST</a> is returned.
The DB_NODUPDATA flag may only be specified if the underlying
database has been configured to support sorted duplicate data items.
<p>The DB_NODUPDATA flag may not be specified to the Queue or Recno
access methods.</p></ul>
<br></ul>
<b>key</b><ul compact><li>The key <a href="../api_c/dbt_class.html">DBT</a> operated on.</ul>
<br>
<br><b>Errors</b>
<p>The DBcursor-&gt;put method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>DB_REP_HANDLE_DEAD</b><ul compact><li>The database handle has been invalidated because a replication election
unrolled a committed transaction.</ul>
<br>
<br>
<b>DB_REP_LOCKOUT</b><ul compact><li>The operation was blocked by client/master synchronization.</ul>
<br>
<br>
<b>EACCES</b><ul compact><li>An attempt was made to modify a read-only database.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If the DB_AFTER, DB_BEFORE or DB_CURRENT flags
were specified and the cursor has not been initialized;
the DB_AFTER or DB_BEFORE flags were specified and a
duplicate sort function has been specified;
the DB_CURRENT flag was specified, a duplicate sort function has
been specified, and the data item of the referenced key/data pair does
not compare equally to the <b>data</b> parameter;
the DB_AFTER or DB_BEFORE flags were specified, and the
underlying access method is Queue;
an attempt was made to add a record to a fixed-length database that was too
large to fit;
an attempt was made to add a record to a secondary index; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>EPERM </b><ul compact><li>Write attempted on read-only cursor when the <a href="../api_c/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a> flag was
specified to <a href="../api_c/env_open.html">DB_ENV-&gt;open</a>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/dbc_class.html">DBC</a>
<br><b>See Also</b>
<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,85 @@
<!--$Id: dbc_set_priority.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBcursor-&gt;set_priority</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBcursor-&gt;set_priority</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DbCursor-&gt;set_priority(DBC *DbCursor, DB_CACHE_PRIORITY priority);
<p>
int
DbCursor-&gt;get_priority(DBC *DbCursor, DB_CACHE_PRIORITY *priorityp);
</pre></b>
<hr size=1 noshade>
<b>Description: DBcursor-&gt;set_priority</b>
<p>Set the cache priority for pages referenced by the
<a href="../api_c/dbc_class.html">DBC</a>
handle.</p>
<p>The priority of a page biases the replacement algorithm to be more or
less likely to discard a page when space is needed in the buffer pool.
The bias is temporary, and pages will eventually be discarded if they
are not referenced again. The DBcursor-&gt;set_priority method is only advisory, and does
not guarantee pages will be treated in a specific way.</p>
<p>The DBcursor-&gt;set_priority method may be called at any time during the life of the
application.</p>
<p>The DBcursor-&gt;set_priority method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>priority</b><ul compact><li>The <b>priority</b> parameter must be set to one of the following
values:
<br>
<b><a name="DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></b><ul compact><li>The lowest priority: pages are the most likely to be discarded.</ul>
<b><a name="DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></b><ul compact><li>The next lowest priority.</ul>
<b><a name="DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></b><ul compact><li>The default priority.</ul>
<b><a name="DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></b><ul compact><li>The next highest priority.</ul>
<b><a name="DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></b><ul compact><li>The highest priority: pages are the least likely to be discarded.</ul>
<br></ul>
<br>
<hr size=1 noshade>
<b>Description: DBcursor-&gt;get_priority</b>
<p>The DBcursor-&gt;get_priority method returns the cache priority for pages referenced by the
<a href="../api_c/dbc_class.html">DBC</a>
handle.</p>
<p>The DBcursor-&gt;get_priority method may be called at any time during the life of the
application.</p>
<p>The DBcursor-&gt;get_priority method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>priorityp</b><ul compact><li>The DBcursor-&gt;get_priority method returns a reference to the
cache priority for pages referenced by the
<a href="../api_c/dbc_class.html">DBC</a>
handle in <b>priorityp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/dbc_class.html">DBC</a>
<br><b>See Also</b>
<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

221
docs/api_c/dbm.html Normal file
View File

@@ -0,0 +1,221 @@
<!--$Id: dbm.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: dbm/ndbm</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>dbm/ndbm</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#define DB_DBM_HSEARCH 1
#include &lt;db.h&gt;
<p>
typedef struct {
char *dptr;
int dsize;
} datum;
<hr size=1 noshade>
<b>Dbm Functions</b>
int
dbminit(char *file);
<p>
int
dbmclose();
<p>
datum
fetch(datum key);
<p>
int
store(datum key, datum content);
<p>
int
delete(datum key);
<p>
datum
firstkey(void);
<p>
datum
nextkey(datum key);
<hr size=1 noshade>
<b>Ndbm Functions</b>
DBM *
dbm_open(char *file, int flags, int mode);
<p>
void
dbm_close(DBM *db);
<p>
datum
dbm_fetch(DBM *db, datum key);
<p>
int
dbm_store(DBM *db, datum key, datum content, int flags);
<p>
int
dbm_delete(DBM *db, datum key);
<p>
datum
dbm_firstkey(DBM *db);
<p>
datum
dbm_nextkey(DBM *db);
<p>
int
dbm_error(DBM *db);
<p>
int
dbm_clearerr(DBM *db);
</pre></b>
<hr size=1 noshade>
<b>Description: dbm/ndbm</b>
<p>The dbm functions are intended to provide high-performance
implementations and source code compatibility for applications written
to historic interfaces. They are not recommended for any other purpose.
The historic dbm database format <b>is not supported</b>,
and databases previously built using the real dbm libraries
cannot be read by the Berkeley DB functions.</p>
<p>To compile dbm applications, replace the application's
<b>#include</b> of the dbm or ndbm include file (for example,
<b>#include &lt;dbm.h&gt;</b> or <b>#include &lt;ndbm.h&gt;</b>)
with the following two lines:</p>
<blockquote><pre>#define DB_DBM_HSEARCH 1
#include &lt;db.h&gt;</pre></blockquote>
<p>and recompile. If the application attempts to load against a dbm library
(for example, <b>-ldbm</b>), remove the library from the load line.</p>
<p><b>Key</b> and <b>content</b> parameters are objects described by the
<b>datum</b> typedef. A <b>datum</b> specifies a string of
<b>dsize</b> bytes pointed to by <b>dptr</b>. Arbitrary binary data,
as well as normal text strings, are allowed.</p>
<b>Dbm Functions</b>
<p>Before a database can be accessed, it must be opened by dbminit.
This will open and/or create the database <b>file</b>.db. If created,
the database file is created read/write by owner only (as described in
<b>chmod</b>(2)) and modified by the process' umask value at the time
of creation (see <b>umask</b>(2)). The group ownership of created
files is based on the system and directory defaults, and is not further
specified by Berkeley DB.</p>
<p>A database may be closed, and any held resources released, by calling
dbmclose.</p>
<p>Once open, the data stored under a key is accessed by fetch, and
data is placed under a key by store. A key (and its associated
contents) are deleted by delete. A linear pass through all keys
in a database may be made, in an (apparently) random order, by using
firstkey and nextkey. The firstkey method will return
the first key in the database. The nextkey method will return the next
key in the database.</p>
<p>The following code will traverse the database:</p>
<blockquote><pre>for (key = firstkey();
key.dptr != NULL; key = nextkey(key)) {
...
}</pre></blockquote>
<b>Ndbm Functions</b>
<p>Before a database can be accessed, it must be opened by dbm_open.
This will open and/or create the database file <b>file.db</b>, depending
on the flags parameter (see <b>open</b>(2)). If created, the database
file is created with mode <b>mode</b> (as described in <b>chmod</b>(2)) and modified by the process' umask value at the time of creation (see
<b>umask</b>(2)). The group ownership of created files is based on
the system and directory defaults, and is not further specified by
Berkeley DB.</p>
<p>Once open, the data stored under a key is accessed by dbm_fetch,
and data is placed under a key by dbm_store. The <b>flags</b>
field can be either <b>DBM_INSERT</b> or <b>DBM_REPLACE</b>.
<b>DBM_INSERT</b> will only insert new entries into the database, and will
not change an existing entry with the same key. <b>DBM_REPLACE</b> will
replace an existing entry if it has the same key. A key (and its
associated contents) are deleted by dbm_delete. A linear pass
through all keys in a database may be made, in an (apparently) random
order, by using dbm_firstkey and dbm_nextkey. The
dbm_firstkey method will return the first key in the database. The
dbm_nextkey method will return the next key in the database.</p>
<p>The following code will traverse the database:</p>
<blockquote><pre>for (key = dbm_firstkey(db);
key.dptr != NULL; key = dbm_nextkey(db)) {
...
}</pre></blockquote>
<b>Compatibility Notes</b>
<p>The historic dbm library created two underlying database files,
traditionally named <b>file.dir</b> and <b>file.pag</b>. The Berkeley DB
library creates a single database file named <b>file.db</b>.
Applications that are aware of the underlying database filenames may
require additional source code modifications.</p>
<p>The historic dbminit function required that the underlying
<b>.dir</b> and <b>.pag</b> files already exist (empty databases were
created by first manually creating zero-length <b>.dir</b> and
<b>.pag</b> files). Applications that expect to create databases using
this method may require additional source code modifications.</p>
<p>The historic dbm_dirfno and dbm_pagfno macros are
supported, but will return identical file descriptors because there is
only a single underlying file used by the Berkeley DB hashing access method.
Applications using both file descriptors for locking may require
additional source code modifications.</p>
<p>If applications using the dbm function exits without first
closing the database, it may lose updates because the Berkeley DB library
buffers writes to underlying databases. Such applications will require
additional source code modifications to work correctly with the Berkeley DB
library.</p>
<b>Dbm Diagnostics</b>
<p>The dbminit function returns -1 on failure, setting <b>errno</b>,
and 0 on success.</p>
<p>The fetch function sets the <b>dptr</b> field of the returned
<b>datum</b> to NULL on failure, setting <b>errno</b>,
and returns a non-NULL <b>dptr</b> on success.</p>
<p>The store function returns -1 on failure, setting <b>errno</b>,
and 0 on success.</p>
<p>The delete function returns -1 on failure, setting <b>errno</b>,
and 0 on success.</p>
<p>The firstkey function sets the <b>dptr</b> field of the returned
<b>datum</b> to NULL on failure, setting <b>errno</b>,
and returns a non-NULL <b>dptr</b> on success.</p>
<p>The nextkey function sets the <b>dptr</b> field of the returned
<b>datum</b> to NULL on failure, setting <b>errno</b>,
and returns a non-NULL <b>dptr</b> on success.</p>
<br><b>Errors</b>
<p>The dbminit, fetch, store, delete, firstkey, and nextkey functions may
fail and return an error for errors specified for other Berkeley DB and C
library or system functions.</p>
<b>Ndbm Diagnostics</b>
<p>The dbm_close method returns non-zero when an error has occurred reading or
writing the database.</p>
<p>The dbm_close method resets the error condition on the named database.</p>
<p>The dbm_open function returns NULL on failure, setting <b>errno</b>,
and a DBM reference on success.</p>
<p>The dbm_fetch function sets the <b>dptr</b> field of the returned
<b>datum</b> to NULL on failure, setting <b>errno</b>,
and returns a non-NULL <b>dptr</b> on success.</p>
<p>The dbm_store function returns -1 on failure, setting <b>errno</b>,
0 on success, and 1 if DBM_INSERT was set and the specified key already
existed in the database.</p>
<p>The dbm_delete function returns -1 on failure, setting <b>errno</b>,
and 0 on success.</p>
<p>The dbm_firstkey function sets the <b>dptr</b> field of the returned
<b>datum</b> to NULL on failure, setting <b>errno</b>,
and returns a non-NULL <b>dptr</b> on success.</p>
<p>The dbm_nextkey function sets the <b>dptr</b> field of the returned
<b>datum</b> to NULL on failure, setting <b>errno</b>,
and returns a non-NULL <b>dptr</b> on success.</p>
<p>The dbm_close function returns -1 on failure, setting <b>errno</b>,
and 0 on success.</p>
<p>The dbm_close function returns -1 on failure, setting <b>errno</b>,
and 0 on success.</p>
<br><b>Errors</b>
<p>The dbm_open, dbm_close, dbm_fetch, dbm_store, dbm_delete, dbm_firstkey,
and dbm_nextkey functions may fail and return an error for errors
specified for other Berkeley DB and C library or system functions.</p>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

82
docs/api_c/dbt_bulk.html Normal file
View File

@@ -0,0 +1,82 @@
<!--$Id: dbt_bulk.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBT</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBT: Bulk Retrieval</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<a name="2"><!--meow--></a>
<p>If either of the <a href="../api_c/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> or <a href="../api_c/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flags
were specified to the <a href="../api_c/db_get.html">DB-&gt;get</a> or <a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> methods, the data
<a href="../api_c/dbt_class.html">DBT</a> returned by those interfaces will refer to a buffer that is
filled with data. Access to that data is through the following
macros:</p>
<br>
<b><a name="DB_MULTIPLE_INIT">DB_MULTIPLE_INIT</a></b><ul compact><li><pre>DB_MULTIPLE_INIT(void *pointer, <a href="../api_c/dbt_class.html">DBT</a> *data);</pre>
<p>Initialize the retrieval. The <b>pointer</b> parameter is a variable
to be initialized. The <b>data</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a>
structure returned from a successful call to <a href="../api_c/db_get.html">DB-&gt;get</a> or
<a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> for which one of the <a href="../api_c/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> or
<a href="../api_c/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flags was specified.</p></ul>
<b><a name="DB_MULTIPLE_NEXT">DB_MULTIPLE_NEXT</a></b><ul compact><li><pre>DB_MULTIPLE_NEXT(void *pointer, <a href="../api_c/dbt_class.html">DBT</a> *data, void *retdata, size_t retdlen);</pre>
<p>The <b>data</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a> structure returned from a
successful call to <a href="../api_c/db_get.html">DB-&gt;get</a> or <a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> for which the
<a href="../api_c/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> flag was specified. The <b>pointer</b> and
<b>data</b> parameters must have been previously initialized by a call
to DB_MULTIPLE_INIT. The <b>retdata</b> parameter is set to
refer to the next data element in the returned set, and the
<b>retdlen</b> parameter is set to the length, in bytes, of that data
element. When used with the Queue and Recno access methods,
<b>retdata</b> will be set to NULL for deleted records. The
<b>pointer</b> parameter is set to NULL if there are no more data
elements in the returned set.</p></ul>
<b><a name="DB_MULTIPLE_KEY_NEXT">DB_MULTIPLE_KEY_NEXT</a></b><ul compact><li><pre>DB_MULTIPLE_KEY_NEXT(void *pointer, <a href="../api_c/dbt_class.html">DBT</a> *data,
void *retkey, size_t retklen, void *retdata, size_t retdlen);</pre>
<p>The <b>data</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a> structure returned from a
successful call to <a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> with the Btree or Hash access methods
for which the <a href="../api_c/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag was specified. The
<b>pointer</b> and <b>data</b> parameters must have been previously
initialized by a call to DB_MULTIPLE_INIT. The <b>retkey</b>
parameter is set to refer to the next key element in the returned set,
and the <b>retklen</b> parameter is set to the length, in bytes, of
that key element. The <b>retdata</b> parameter is set to refer to the
next data element in the returned set, and the <b>retdlen</b> parameter
is set to the length, in bytes, of that data element. The
<b>pointer</b> parameter is set to NULL if there are no more key/data
pairs in the returned set.</p></ul>
<b><a name="DB_MULTIPLE_RECNO_NEXT">DB_MULTIPLE_RECNO_NEXT</a></b><ul compact><li><pre>DB_MULTIPLE_RECNO_NEXT(void *pointer, <a href="../api_c/dbt_class.html">DBT</a> *data,
db_recno_t recno, void * retdata, size_t retdlen);</pre>
<p>The <b>data</b> parameter is a <a href="../api_c/dbt_class.html">DBT</a> structure returned from a
successful call to <a href="../api_c/dbc_get.html">DBcursor-&gt;get</a> with the Queue or Recno access
methods for which the <a href="../api_c/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag was specified. The
<b>pointer</b> and <b>data</b> parameters must have been previously
initialized by a call to DB_MULTIPLE_INIT. The <b>recno</b>
parameter is set to the record number of the next record in the returned
set. The <b>retdata</b> parameter is set to refer to the next data
element in the returned set, and the <b>retdlen</b> parameter is set to
the length, in bytes, of that data element. Deleted records are not
included in the results. The <b>pointer</b> parameter is set to NULL
if there are no more key/data pairs in the returned set.</p></ul>
<br>
<p>These macros may be called multiple times, but DB_MULTIPLE_INIT
must be called before each new access of the data.</p>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

152
docs/api_c/dbt_class.html Normal file
View File

@@ -0,0 +1,152 @@
<!--$Id: dbt_class.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--$Id: dbt_class.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBT</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DBT: Key/Data Pairs</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<a name="2"><!--meow--></a>
<p>Storage and retrieval for the Berkeley DB access methods are based on key/data
pairs. Both key and data items are represented by the DBT data
structure. (The name <i>DBT</i> is a mnemonic for <i>data
base thang</i>, and was used because no one could think of a reasonable
name that wasn't already in use somewhere else.) Key and data byte
strings may refer to strings of zero length up to strings of
essentially unlimited length. See <a href="../ref/am_misc/dbsizes.html">Database limits</a> for more information.</p>
<blockquote><pre>typedef struct {
void *data;
u_int32_t size;
u_int32_t ulen;
u_int32_t dlen;
u_int32_t doff;
u_int32_t flags;
} DBT;</pre></blockquote>
<p>In order to ensure compatibility with future releases of Berkeley DB, all
fields of the DBT structure that are not explicitly set should be
initialized to nul bytes before the first time the structure is used.
Do this by declaring the structure external or static, or by calling
the C library routine <b>bzero</b>(3) or <b>memset</b>(3).</p>
<p>By default, the <b>flags</b> structure element is expected to be set
to 0. In this default case, when the application is providing Berkeley DB a
key or data item to store into the database, Berkeley DB expects the
<b>data</b> structure element to point to a byte string of <b>size</b>
bytes. When returning a key/data item to the application, Berkeley DB will
store into the <b>data</b> structure element a pointer to a byte string
of <b>size</b> bytes, and the memory to which the pointer refers will be
allocated and managed by Berkeley DB.</p>
<p>The elements of the DBT structure are defined as follows:</p>
<br>
<b>void *<a name="data">data</a>;</b><ul compact><li>A pointer to a byte string.</ul>
<b>u_int32_t <a name="size">size</a>;</b><ul compact><li>The length of <b>data</b>, in bytes.</ul>
<b>u_int32_t <a name="ulen">ulen</a>;</b><ul compact><li>The size of the user's buffer (to which <b>data</b> refers), in bytes.
This location is not written by the Berkeley DB functions.
<p>Note that applications can determine the length of a record by setting
the <b>ulen</b> field to 0 and checking the return value in the
<b>size</b> field. See the DB_DBT_USERMEM flag for more information.</p></ul>
<b>u_int32_t <a name="dlen">dlen</a>;</b><ul compact><li>The length of the partial record being read or written by the application,
in bytes. See the DB_DBT_PARTIAL flag for more information.</ul>
<b>u_int32_t <a name="doff">doff</a>;</b><ul compact><li>The offset of the partial record being read or written by the application,
in bytes. See the DB_DBT_PARTIAL flag for more information.</ul>
<b>u_int32_t flags;</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<br>
<b><a name="DB_DBT_MALLOC">DB_DBT_MALLOC</a></b><ul compact><li>When this flag is set, Berkeley DB will allocate memory for the returned key
or data item (using <b>malloc</b>(3), or the user-specified malloc
function), and return a pointer to it in the <b>data</b> field of the
key or data DBT structure. Because any allocated memory becomes the
responsibility of the calling application, the caller must determine
whether memory was allocated using the returned value of the
<b>data</b> field.
<p>It is an error to specify more than one of DB_DBT_MALLOC,
DB_DBT_REALLOC, and DB_DBT_USERMEM.</p></ul>
<b><a name="DB_DBT_REALLOC">DB_DBT_REALLOC</a></b><ul compact><li>When this flag is set Berkeley DB will allocate memory for the returned key
or data item (using <b>realloc</b>(3), or the user-specified realloc
function), and return a pointer to it in the <b>data</b> field of the
key or data DBT structure. Because any allocated memory becomes the
responsibility of the calling application, the caller must determine
whether memory was allocated using the returned value of the
<b>data</b> field.
<p>The difference between DB_DBT_MALLOC and DB_DBT_REALLOC
is that the latter will call <b>realloc</b>(3) instead of
<b>malloc</b>(3), so the allocated memory will be grown as necessary
instead of the application doing repeated free/malloc calls.</p>
<p>It is an error to specify more than one of DB_DBT_MALLOC,
DB_DBT_REALLOC, and DB_DBT_USERMEM.</p></ul>
<a name="3"><!--meow--></a>
<b><a name="DB_DBT_USERMEM">DB_DBT_USERMEM</a></b><ul compact><li>The <b>data</b> field of the key or data structure must refer to
memory that is at least <b>ulen</b> bytes in length. If the length of
the requested item is less than or equal to that number of bytes, the
item is copied into the memory to which the <b>data</b> field refers.
Otherwise, the <b>size</b> field is set to the length needed for the
requested item, and the error DB_BUFFER_SMALL is returned.
<p>It is an error to specify more than one of DB_DBT_MALLOC,
DB_DBT_REALLOC, and DB_DBT_USERMEM.</p></ul>
<b><a name="DB_DBT_PARTIAL">DB_DBT_PARTIAL</a></b><ul compact><li>Do partial retrieval or storage of an item. If the calling application
is doing a get, the <b>dlen</b> bytes starting <b>doff</b> bytes from
the beginning of the retrieved data record are returned as if they
comprised the entire record. If any or all of the specified bytes do
not exist in the record, the get is successful, and any existing bytes
are returned.
<p>For example, if the data portion of a retrieved record was 100 bytes,
and a partial retrieval was done using a DBT having a <b>dlen</b>
field of 20 and a <b>doff</b> field of 85, the get call would succeed,
the <b>data</b> field would refer to the last 15 bytes of the record,
and the <b>size</b> field would be set to 15.</p>
<p>If the calling application is doing a put, the <b>dlen</b> bytes
starting <b>doff</b> bytes from the beginning of the specified key's
data record are replaced by the data specified by the <b>data</b> and
<b>size</b> structure elements. If <b>dlen</b> is smaller than
<b>size</b>, the record will grow; if <b>dlen</b> is larger than
<b>size</b>, the record will shrink. If the specified bytes do not
exist, the record will be extended using nul bytes as necessary, and
the put call will succeed.</p>
<p>It is an error to attempt a partial put using the <a href="../api_c/db_put.html">DB-&gt;put</a> function
in a database that supports duplicate records.
Partial puts in databases supporting duplicate records must be done
using a <a href="../api_c/dbc_put.html">DBcursor-&gt;put</a> function.</p>
<p>It is an error to attempt a partial put with differing <b>dlen</b> and
<b>size</b> values in Queue or Recno databases with fixed-length records.</p>
<p>For example, if the data portion of a retrieved record was 100 bytes,
and a partial put was done using a DBT having a <b>dlen</b> field of 20,
a <b>doff</b> field of 85, and a <b>size</b> field of 30, the resulting
record would be 115 bytes in length, where the last 30 bytes would be
those specified by the put call.</p></ul>
<b><a name="DB_DBT_APPMALLOC">DB_DBT_APPMALLOC</a></b><ul compact><li>After an application-supplied callback routine passed to either
<a href="../api_c/db_associate.html">DB-&gt;associate</a> or <a href="../api_c/db_set_append_recno.html">DB-&gt;set_append_recno</a> is executed, the
<b>data</b> field of a DBT may refer to memory allocated with
<b>malloc</b>(3) or <b>realloc</b>(3). In that case, the
callback sets the <a href="../api_c/dbt_class.html#DB_DBT_APPMALLOC">DB_DBT_APPMALLOC</a> flag in the DBT so
that Berkeley DB will call <b>free</b>(3) to deallocate the memory when it
is no longer required.</ul>
<b><a name="DB_DBT_MULTIPLE">DB_DBT_MULTIPLE</a></b><ul compact><li>Set in a secondary key creation callback routine passed to
<a href="../api_c/db_associate.html">DB-&gt;associate</a> to indicate that multiple secondary keys should be
associated with the given primary key/data pair. If set, the
<b>size</b> field indicates the number of secondary keys and the
<b>data</b> field refers to an array of that number of DBT
structures.
<p>The <a href="../api_c/dbt_class.html#DB_DBT_APPMALLOC">DB_DBT_APPMALLOC</a> flag may be set on any of the DBT
structures to indicate that their <b>data</b> field needs to be
freed.</p></ul>
<br></ul>
<br>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!--$Id: dbt_package.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DBT and Bulk Get Operations</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<p align=center><b>DBT and Bulk Get Operations</b></p>
<table border=1 align=center>
<tr><th>DBT and Bulk Get Operations</th><th>Description</th></tr>
<tr><td><a href="../api_c/dbt_class.html">DBT</a></td><td>Key/data pairs</td></tr>
<tr><td><a href="../api_c/dbt_bulk.html#DB_MULTIPLE_INIT">DB_MULTIPLE_INIT</a></td><td>Initialize bulk get retrieval</td></tr>
<tr><td><a href="../api_c/dbt_bulk.html#DB_MULTIPLE_NEXT">DB_MULTIPLE_NEXT</a></td><td>Next bulk get retrieval</td></tr>
<tr><td><a href="../api_c/dbt_bulk.html#DB_MULTIPLE_KEY_NEXT">DB_MULTIPLE_KEY_NEXT</a></td><td>Next bulk get retrieval</td></tr>
<tr><td><a href="../api_c/dbt_bulk.html#DB_MULTIPLE_RECNO_NEXT">DB_MULTIPLE_RECNO_NEXT</a></td><td>Next bulk get retrieval</td></tr>
</table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<!--$Id: env_cdsgroup_begin.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;cdsgroup_begin</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;cdsgroup_begin</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;cdsgroup_begin(DB_ENV *dbenv, DB_TXN **tid);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;cdsgroup_begin</b>
<a name="2"><!--meow--></a>
<p>The DB_ENV-&gt;cdsgroup_begin method allocates a locker ID in an
environment configured for Berkeley DB Concurrent Data Store applications. It copies a pointer to
a <a href="../api_c/txn_class.html">DB_TXN</a> that uniquely identifies the locker ID into the memory
to which <b>tid</b> refers. Calling the <a href="../api_c/txn_commit.html">DB_TXN-&gt;commit</a> method will
discard the allocated locker ID.</p>
<p>See <a href="../ref/cam/intro.html">Berkeley DB Concurrent Data Store applications</a> for more
information about when this is required.</p>
<p>The DB_ENV-&gt;cdsgroup_begin method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;cdsgroup_begin method
returns a non-zero error value on failure
and 0 on success.
</p>
<br><b>Errors</b>
<p>The DB_ENV-&gt;cdsgroup_begin method
may fail and return one of the following non-zero errors:</p>
<br>
<b>ENOMEM</b><ul compact><li>The maximum number of lockers has been reached.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/txn_class.html">DB_TXN</a>
<br><b>See Also</b>
<a href="../api_c/txn_list.html">Transaction Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

78
docs/api_c/env_class.html Normal file
View File

@@ -0,0 +1,78 @@
<!--$Id: env_class.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: db_env_create</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>db_env_create</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
db_env_create(DB_ENV **dbenvp, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: db_env_create</b>
<p>The DB_ENV object is the handle for a Berkeley DB environment -- a
collection including support for some or all of caching, locking,
logging and transaction subsystems, as well as databases and log files.
Methods of the DB_ENV handle are used to configure the
environment as well as to operate on subsystems and databases in the
environment.</p>
<p>DB_ENV handles are free-threaded if the <a href="../api_c/env_open.html#DB_THREAD">DB_THREAD</a> flag
is specified to the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method when the environment is opened.
The DB_ENV handle should not be closed while any other handle
remains open that is using it as a reference (for example, <a href="../api_c/db_class.html">DB</a>
or <a href="../api_c/txn_class.html">DB_TXN</a>). Once either the <a href="../api_c/env_close.html">DB_ENV-&gt;close</a> or
<a href="../api_c/env_remove.html">DB_ENV-&gt;remove</a> methods are called, the handle may not be accessed again,
regardless of the method's return.</p>
<p>The db_env_create function creates a DB_ENV structure that
is the handle for a Berkeley DB environment. This function allocates memory
for the structure, returning a pointer to the structure in the memory
to which <b>dbenvp</b> refers. To release the allocated memory and
discard the handle, call the <a href="../api_c/env_close.html">DB_ENV-&gt;close</a> or <a href="../api_c/env_remove.html">DB_ENV-&gt;remove</a> methods.</p>
<p>The DB_ENV handle contains a special field, "app_private", which
is declared as type "void *". This field is provided for the use of
the application program. It is initialized to NULL and is not further
used by Berkeley DB in any way.</p>
<p>The db_env_create method
returns a non-zero error value on failure
and 0 on success.
</p>
The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_RPCCLIENT">DB_RPCCLIENT</a></b><ul compact><li>Create a client environment to connect to a server.</ul>
<p>The DB_RPCCLIENT flag indicates to the system that this environment
is remote on a server. The use of this flag causes the environment
methods to use functions that call a server instead of local functions.
Prior to making any environment or database method calls, the application
must call the <a href="../api_c/env_set_rpc_server.html">DB_ENV-&gt;set_rpc_server</a> function to establish the
connection to the server.</p>
<br>
<br><b>Errors</b>
<hr size=1 noshade>
<br><b>Class</b>
DB_ENV
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

81
docs/api_c/env_close.html Normal file
View File

@@ -0,0 +1,81 @@
<!--$Id: env_close.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;close</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;close</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;close(DB_ENV *dbenv, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;close</b>
<p>The DB_ENV-&gt;close method closes the Berkeley DB environment, freeing any
allocated resources and closing any underlying subsystems.</p>
<p>The <a href="../api_c/env_class.html">DB_ENV</a> handle should not be closed while any other handle
that refers to it is not yet closed; for example, database environment
handles must not be closed while database handles remain open, or
transactions in the environment have not yet been committed or aborted.
Specifically, this includes <a href="../api_c/db_class.html">DB</a>, <a href="../api_c/dbc_class.html">DBC</a>, <a href="../api_c/txn_class.html">DB_TXN</a>,
<a href="../api_c/logc_class.html">DB_LOGC</a> and <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a> handles.</p>
<p>Where the environment was initialized with the <a href="../api_c/env_open.html#DB_INIT_LOCK">DB_INIT_LOCK</a>
flag, calling DB_ENV-&gt;close does not release any locks still held
by the closing process, providing functionality for long-lived locks.
Processes that want to have all their locks released can do so by
issuing the appropriate <a href="../api_c/lock_vec.html">DB_ENV-&gt;lock_vec</a> call.</p>
<p>Where the environment was initialized with the <a href="../api_c/env_open.html#DB_INIT_MPOOL">DB_INIT_MPOOL</a>
flag, calling DB_ENV-&gt;close implies calls to <a href="../api_c/memp_fclose.html">DB_MPOOLFILE-&gt;close</a> for
any remaining open files in the memory pool that were returned to this
process by calls to <a href="../api_c/memp_fopen.html">DB_MPOOLFILE-&gt;open</a>. It does not imply a call to
<a href="../api_c/memp_fsync.html">DB_MPOOLFILE-&gt;sync</a> for those files.</p>
<p>Where the environment was initialized with the <a href="../api_c/env_open.html#DB_INIT_TXN">DB_INIT_TXN</a> flag,
calling DB_ENV-&gt;close aborts any unresolved transactions.
Applications should not depend on this behavior for transactions
involving Berkeley DB databases; all such transactions should be explicitly
resolved. The problem with depending on this semantic is that aborting
an unresolved transaction involving database operations requires a
database handle. Because the database handles should have been closed before
calling DB_ENV-&gt;close, it will not be possible to abort the
transaction, and recovery will have to be run on the Berkeley DB environment
before further operations are done.</p>
<p>Where log cursors were created using the <a href="../api_c/log_cursor.html">DB_ENV-&gt;log_cursor</a> method, calling
DB_ENV-&gt;close does not imply closing those cursors.</p>
<p>In multithreaded applications, only a single thread may call
DB_ENV-&gt;close.</p>
<p>After DB_ENV-&gt;close has been called, regardless of its return, the
Berkeley DB environment handle may not be accessed again.</p>
<p>The DB_ENV-&gt;close method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,103 @@
<!--$Id: env_dbremove.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;dbremove</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;dbremove</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;dbremove(DB_ENV *dbenv, DB_TXN *txnid,
const char *file, const char *database, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;dbremove</b>
<p>The DB_ENV-&gt;dbremove method removes the database specified by the
<b>file</b> and <b>database</b> parameters. If no <b>database</b>
is specified, the underlying file represented by <b>file</b> is
removed, incidentally removing all of the databases it contained.</p>
<p>Applications should never remove databases with open <a href="../api_c/db_class.html">DB</a> handles,
or in the case of removing a file, when any database in the file has an
open handle. For example, some architectures do not permit the removal
of files with open system handles. On these architectures, attempts to
remove databases currently in use by any thread of control in the system
may fail.</p>
<p>The DB_ENV-&gt;dbremove method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>database</b><ul compact><li>The <b>database</b> parameter is the database to be removed.</ul>
<b>file</b><ul compact><li>The <b>file</b> parameter is the physical file which contains the
database(s) to be removed.</ul>
<p>When using a Unicode build on Windows (the default), the <b>file</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></b><ul compact><li>Enclose the DB_ENV-&gt;dbremove call within a transaction. If the call succeeds,
changes made by the operation will be recoverable. If the call fails,
the operation will have made no changes.</ul>
<br></ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
DB_AUTO_COMMIT flag is specified,
the operation will be implicitly transaction protected.
</ul>
<br>
<br><b>Environment Variables</b>
<p>The
environment variable <b>DB_HOME</b> may be used as the path of the
database environment home.</p>
<p>DB_ENV-&gt;dbremove is affected by any database directory specified using
the <a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a> method, or by setting the "set_data_dir" string
in the environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.</p>
<br><b>Errors</b>
<p>The DB_ENV-&gt;dbremove method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If DB_ENV-&gt;dbremove called before <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>ENOENT</b><ul compact><li>The file or directory does not exist.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,106 @@
<!--$Id: env_dbrename.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;dbrename</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;dbrename</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;dbrename(DB_ENV *dbenv, DB_TXN *txnid, const char *file,
const char *database, const char *newname, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;dbrename</b>
<p>The DB_ENV-&gt;dbrename method renames the database specified by the
<b>file</b> and <b>database</b> parameters to <b>newname</b>. If no
<b>database</b> is specified, the underlying file represented by
<b>file</b> is renamed, incidentally renaming all of the databases it
contained.</p>
<p>Applications should not rename databases that are currently in use. If
an underlying file is being renamed and logging is currently enabled in
the database environment, no database in the file may be open when the
DB_ENV-&gt;dbrename method is called. In particular, some architectures do
not permit renaming files with open handles. On these architectures,
attempts to rename databases that are currently in use by any thread of
control in the system may fail.</p>
<p>The DB_ENV-&gt;dbrename method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>database</b><ul compact><li>The <b>database</b> parameter is the database to be renamed.</ul>
<b>file</b><ul compact><li>The <b>file</b> parameter is the physical file which contains the
database(s) to be renamed.</ul>
<p>When using a Unicode build on Windows (the default), the <b>file</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></b><ul compact><li>Enclose the DB_ENV-&gt;dbrename call within a transaction. If the call succeeds,
changes made by the operation will be recoverable. If the call fails,
the operation will have made no changes.</ul>
<br></ul>
<b>newname</b><ul compact><li>The <b>newname</b> parameter is the new name of the database or file.</ul>
<b>txnid</b><ul compact><li>If the operation is part of an application-specified transaction, the
<b>txnid</b> parameter is a transaction handle returned from
<a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>; if the operation is part of a Berkeley DB Concurrent Data Store group, the
<b>txnid</b> parameter is a handle returned from
<a href="../api_c/env_cdsgroup_begin.html">DB_ENV-&gt;cdsgroup_begin</a>; otherwise NULL.
If no transaction handle is
specified, but the
DB_AUTO_COMMIT flag is specified,
the operation will be implicitly transaction protected.
</ul>
<br>
<br><b>Environment Variables</b>
<p>The
environment variable <b>DB_HOME</b> may be used as the path of the
database environment home.</p>
<p>DB_ENV-&gt;dbrename is affected by any database directory specified using
the <a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a> method, or by setting the "set_data_dir" string
in the environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.</p>
<br><b>Errors</b>
<p>The DB_ENV-&gt;dbrename method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve
a deadlock.</ul>
<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
to grant a lock in the allowed time.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If DB_ENV-&gt;dbrename called before <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>ENOENT</b><ul compact><li>The file or directory does not exist.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

81
docs/api_c/env_err.html Normal file
View File

@@ -0,0 +1,81 @@
<!--$Id: env_err.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;err</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;err</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB_ENV-&gt;err(DB_ENV *dbenv, int error, const char *fmt, ...);
<p>
void
DB_ENV-&gt;errx(DB_ENV *dbenv, const char *fmt, ...);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;err</b>
<p>The DB_ENV-&gt;err, DB_ENV-&gt;errx, <a href="../api_c/db_err.html">DB-&gt;err</a> and
<a href="../api_c/db_err.html">DB-&gt;errx</a> methods provide error-messaging functionality for
applications written using the Berkeley DB library.</p>
<p>The <a href="../api_c/db_err.html">DB-&gt;err</a> and DB_ENV-&gt;err methods constructs an error message
consisting of the following elements:</p>
<blockquote><br>
<b>An optional prefix string</b><ul compact><li>If no error callback function has been set using the
<a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a> method, any prefix string specified using the
<a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a> method, followed by two separating characters: a colon
and a &lt;space&gt; character.</ul>
<b>An optional printf-style message</b><ul compact><li>The supplied message <b>fmt</b>, if non-NULL, in which the
ANSI C X3.159-1989 (ANSI C) printf function specifies how subsequent parameters
are converted for output.</ul>
<b>A separator</b><ul compact><li>Two separating characters: a colon and a &lt;space&gt; character.</ul>
<b>A standard error string</b><ul compact><li>The standard system or Berkeley DB library error string associated with the
<b>error</b> value, as returned by the <a href="../api_c/env_strerror.html">db_strerror</a> method.</ul>
<br>
</blockquote>
<p>The <a href="../api_c/db_err.html">DB-&gt;errx</a> and DB_ENV-&gt;errx methods are the same as the
<a href="../api_c/db_err.html">DB-&gt;err</a> and DB_ENV-&gt;err methods, except they do not append the
final separator characters and standard error string to the error
message.</p>
<p>This constructed error message is then handled as follows:</p>
<blockquote><p>If an error callback function has been set (see <a href="../api_c/db_set_errcall.html">DB-&gt;set_errcall</a>
and <a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a>), that function is called with two
parameters: any prefix string specified (see <a href="../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a> and
<a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a>) and the error message.</p>
<p>If a C library FILE * has been set (see <a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a> and
<a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a>), the error message is written to that output
stream.</p>
<p>If none of these output options has been configured, the error message
is written to stderr, the standard error output stream.</p></blockquote>
<b>Parameters</b> <br>
<b>error</b><ul compact><li>The <b>error</b> parameter is the error value for which the
DB_ENV-&gt;err and <a href="../api_c/db_err.html">DB-&gt;err</a> methods will display a explanatory
string.</ul>
<b>fmt</b><ul compact><li>The <b>fmt</b> parameter is an optional printf-style message to display.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,104 @@
<!--$Id: env_event_notify.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_event_notify</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_event_notify</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_event_notify(DB_ENV *dbenv,
void (*db_event_fcn)(DB_ENV *dbenv, u_int32_t event, void *event_info));
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_event_notify</b>
<p>The DB_ENV-&gt;set_event_notify method configures a callback function which
is called to notify the process of specific Berkeley DB events.</p>
<p>The DB_ENV-&gt;set_event_notify method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_event_notify method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;set_event_notify method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>db_event_fcn</b><ul compact><li>The <b>db_event_fcn</b> parameter is the application's event
notification function. The function takes three parameters:
<br>
<b>dbenv</b><ul compact><li>The <b>dbenv</b> parameter is the enclosing database environment handle.</ul>
<b>event</b><ul compact><li>The <b>event</b> parameter is one of the following values:</ul>
<br>
<b><a name="DB_EVENT_PANIC">DB_EVENT_PANIC</a></b><ul compact><li>Errors can occur in the Berkeley DB library where the only solution is to shut
down the application and run recovery (for example, if Berkeley DB is unable
to allocate heap memory). In such cases, the Berkeley DB methods will
return <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>.
It is often easier to simply exit the application when such errors occur
rather than gracefully return up the stack.
<p>When <b>event</b> is set to DB_EVENT_PANIC, the database
environment has failed. All threads of control in the database
environment should exit the environment, and recovery should be run.</p></ul>
<b><a name="DB_EVENT_REP_CLIENT">DB_EVENT_REP_CLIENT</a></b><ul compact><li>The local site is now a replication client.</ul>
<b><a name="DB_EVENT_REP_ELECTED">DB_EVENT_REP_ELECTED</a></b><ul compact><li>The local replication site has just won an election. An application using
the Base replication API should arrange for a call to the <a href="../api_c/rep_start.html">DB_ENV-&gt;rep_start</a> method
after receiving this event, to reconfigure the local environment as a
replication master.</ul>
<p>Replication Manager applications may safely ignore this event. The
Replication Manager calls <a href="../api_c/rep_start.html">DB_ENV-&gt;rep_start</a> automatically on behalf of
the application when appropriate (resulting in firing of the
DB_EVENT_REP_MASTER event).</p>
<b><a name="DB_EVENT_REP_MASTER">DB_EVENT_REP_MASTER</a></b><ul compact><li>The local site is now the master site of its replication group. It is
the application's responsibility to begin acting as the master environment.</ul>
<b><a name="DB_EVENT_REP_NEWMASTER">DB_EVENT_REP_NEWMASTER</a></b><ul compact><li>The replication group of which this site is a member has just established a
new master; the local site is not the new master. The
<b>event_info</b> parameter points to an integer containing the
environment ID of the new master.</ul>
<b><a name="DB_EVENT_REP_PERM_FAILED">DB_EVENT_REP_PERM_FAILED</a></b><ul compact><li>The replication manager did not receive enough acknowledgements (based on
the acknowledgement policy configured with <a href="../api_c/repmgr_ack_policy.html">DB_ENV-&gt;repmgr_set_ack_policy</a>)
to ensure a transaction's durability within the replication group. The
transaction will be flushed to the master's local disk storage for
durability.</ul>
<p>The DB_EVENT_REP_PERM_FAILED event is provided only to applications
configured for the replication manager.</p>
<b><a name="DB_EVENT_REP_STARTUPDONE">DB_EVENT_REP_STARTUPDONE</a></b><ul compact><li>The client has completed startup synchronization and is now processing
live log records received from the master.</ul>
<b><a name="DB_EVENT_WRITE_FAILED">DB_EVENT_WRITE_FAILED</a></b><ul compact><li>A Berkeley DB write to stable storage failed.</ul>
<br>
<b>event_info</b><ul compact><li>The <b>event_info</b> parameter may reference memory which contains
additional information describing an event. By default,
<b>event_info</b> is NULL; specific events may pass non-NULL values,
in which case the event will also describe the memory's structure.</ul>
<br></ul>
<br>
<p>Berkeley DB is not re-entrant. Callback functions should not attempt to make
library calls (for example, to release locks or close open handles).
Re-entering Berkeley DB is not guaranteed to work correctly, and the results
are undefined.</p>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!--$Id: env_failchk.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;failchk</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;failchk</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;failchk(DB_ENV *dbenv, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;failchk</b>
<p>The DB_ENV-&gt;failchk method checks for threads of control (either a true
thread or a process) that have exited while manipulating Berkeley DB library
data structures, while holding a logical database lock, or with an
unresolved transaction (that is, a transaction that was never aborted
or committed). For more information, see <a href="../ref/cam/app.html">Architecting Data Store and Concurrent Data Store applications</a>, and
<a href="../ref/transapp/app.html">Architecting Transactional Data Store
applications</a>.</p>
<p>The DB_ENV-&gt;failchk method is based on the "thread_id" and "is_alive"
functions specified to the <a href="../api_c/env_set_thread_id.html">DB_ENV-&gt;set_thread_id</a> method. Applications
calling the DB_ENV-&gt;failchk method must have already called the
<a href="../api_c/env_set_isalive.html">DB_ENV-&gt;set_isalive</a> method, on the same <a href="../api_c/env_class.html">DB_ENV</a>, and must have
configured their database environment using the
<a href="../api_c/env_set_thread_count.html">DB_ENV-&gt;set_thread_count</a> method.</p>
<p>If DB_ENV-&gt;failchk determines a thread of control exited while
holding database read locks, it will release those locks. If
DB_ENV-&gt;failchk determines a thread of control exited with an
unresolved transaction, the transaction will be aborted. In either of
these cases, DB_ENV-&gt;failchk will return 0 and the application may
continue to use the database environment.</p>
<p>In either of these cases, the DB_ENV-&gt;failchk method will also report
the process and thread IDs associated with any released locks or
aborted transactions. The information is printed to a specified output
channel (see the <a href="../api_c/env_set_msgfile.html">DB_ENV-&gt;set_msgfile</a> method for more information), or
passed to an application callback function (see the
<a href="../api_c/env_set_msgcall.html">DB_ENV-&gt;set_msgcall</a> method for more information).</p>
<p>If DB_ENV-&gt;failchk determines a thread of control has exited such
that database environment recovery is required, it will return
<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>. In this case, the application should not
continue to use the database environment. For a further description as
to the actions the application should take when this failure occurs, see
<a href="../ref/cam/fail.html">Handling failure in Data Store and
Concurrent Data Store applications</a>, and
<a href="../ref/transapp/fail.html">Handling failure in Transactional
Data Store applications</a>.</p>
<p>The DB_ENV-&gt;failchk method may not be called before the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is called.</p>
<p>The DB_ENV-&gt;failchk method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;failchk method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,70 @@
<!--$Id: env_fileid_reset.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;fileid_reset</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;fileid_reset</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;fileid_reset(DB_ENV *dbenv, const char *file, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;fileid_reset</b>
<p>The DB_ENV-&gt;fileid_reset method allows database files to be copied, and
then the copy used in the same database environment as the original.</p>
<p>All databases contain an ID string used to identify the database in the
database environment cache. If a physical database file is copied, and
used in the same environment as another file with the same ID strings,
corruption can occur. The DB_ENV-&gt;fileid_reset method creates new ID
strings for all of the databases in the physical file.</p>
<p>The DB_ENV-&gt;fileid_reset method modifies the physical file, in-place.
Applications should not reset IDs in files that are currently in use.</p>
<p>The DB_ENV-&gt;fileid_reset method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;fileid_reset method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>file</b><ul compact><li>The name of the physical file in which new file IDs are to be created.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b>DB_ENCRYPT</b><ul compact><li>The file contains encrypted databases.</ul>
<br></ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;fileid_reset method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

57
docs/api_c/env_list.html Normal file
View File

@@ -0,0 +1,57 @@
<!--$Id: env_list.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: Berkeley DB: Database Environments and Related Methods</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<p align=center><b>Berkeley DB: Database Environments and Related Methods</b></p>
<!--$Id: env_list.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<table border=1 align=center>
<tr><th>Database Environment Operations</th><th>Description</th></tr>
<!--DbEnv::--><tr><td><a href="../api_c/env_class.html">db_env_create</a></td><td>Create an environment handle</td></tr>
<!--Db::get_env--><tr><td><a href="../api_c/db_getenv.html">DB-&gt;get_env</a></td><td>Return <a href="../api_c/db_class.html">DB</a>'s underlying <a href="../api_c/env_class.html">DB_ENV</a> handle</td></tr>
<!--DbEnv::close--><tr><td><a href="../api_c/env_close.html">DB_ENV-&gt;close</a></td><td>Close an environment</td></tr>
<!--DbEnv::dbremove--><tr><td><a href="../api_c/env_dbremove.html">DB_ENV-&gt;dbremove</a></td><td>Remove a database</td></tr>
<!--DbEnv::dbrename--><tr><td><a href="../api_c/env_dbrename.html">DB_ENV-&gt;dbrename</a></td><td>Rename a database</td></tr>
<!--DbEnv::err--><tr><td><a href="../api_c/env_err.html">DB_ENV-&gt;err</a>, <a href="../api_c/env_err.html">DB_ENV-&gt;errx</a></td><td>Error message</td></tr>
<!--DbEnv::failchk--><tr><td><a href="../api_c/env_failchk.html">DB_ENV-&gt;failchk</a></td><td>Check for thread failure</td></tr>
<!--DbEnv::fileid_reset--><tr><td><a href="../api_c/env_fileid_reset.html">DB_ENV-&gt;fileid_reset</a></td><td>Reset database file IDs</td></tr>
<!--DbEnv::get_home--><tr><td><a href="../api_c/env_open.html">DB_ENV-&gt;get_home</a></td><td>Return environment's home directory</td></tr>
<!--DbEnv::get_open_flags--><tr><td><a href="../api_c/env_open.html">DB_ENV-&gt;get_open_flags</a></td><td>Return flags with which the environment was opened</td></tr>
<!--DbEnv::lsn_reset--><tr><td><a href="../api_c/env_lsn_reset.html">DB_ENV-&gt;lsn_reset</a></td><td>Reset database file LSNs</td></tr>
<!--DbEnv::open--><tr><td><a href="../api_c/env_open.html">DB_ENV-&gt;open</a></td><td>Open an environment</td></tr>
<!--DbEnv::remove--><tr><td><a href="../api_c/env_remove.html">DB_ENV-&gt;remove</a></td><td>Remove an environment</td></tr>
<!--DbEnv::stat_print--><tr><td><a href="../api_c/env_stat.html">DB_ENV-&gt;stat_print</a></td><td>Environment statistics</td></tr>
<!--db_strerror--><tr><td><a href="../api_c/env_strerror.html">db_strerror</a></td><td>Error strings</td></tr>
<!--db_version--><tr><td><a href="../api_c/env_version.html">db_version</a></td><td>Return version information</td></tr>
<tr><th>Environment Configuration</th><th><br></th></tr>
<!--DbEnv::set_alloc--><tr><td><a href="../api_c/env_set_alloc.html">DB_ENV-&gt;set_alloc</a></td><td>Set local space allocation functions</td></tr>
<!--DbEnv::set_app_dispatch--><tr><td><a href="../api_c/env_set_app_dispatch.html">DB_ENV-&gt;set_app_dispatch</a></td><td>Configure application recovery</td></tr>
<!--DbEnv::set_cachesize--><tr><td><a href="../api_c/env_set_cachesize.html">DB_ENV-&gt;set_cachesize</a></td><td>Set the environment cache size</td></tr>
<!--DbEnv::set_data_dir--><tr><td><a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a></td><td>Set the environment data directory</td></tr>
<!--DbEnv::set_encrypt--><tr><td><a href="../api_c/env_set_encrypt.html">DB_ENV-&gt;set_encrypt</a></td><td>Set the environment cryptographic key</td></tr>
<!--DbEnv::set_errcall--><tr><td><a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a>, <a href="../api_c/env_set_msgcall.html">DB_ENV-&gt;set_msgcall</a></td><td>Set error and informational message callbacks</td></tr>
<!--DbEnv::set_errfile--><tr><td><a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a>, <a href="../api_c/env_set_msgfile.html">DB_ENV-&gt;set_msgfile</a></td><td>Set error and informational message FILE</td></tr>
<!--DbEnv::set_error_stream-->
<!--DbEnv::set_errpfx--><tr><td><a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a></td><td>Set error message prefix</td></tr>
<!--DbEnv::set_event_notify--><tr><td><a href="../api_c/env_event_notify.html">DB_ENV-&gt;set_event_notify</a></td><td>Set event notification callback</td></tr>
<!--DbEnv::set_feedback--><tr><td><a href="../api_c/env_set_feedback.html">DB_ENV-&gt;set_feedback</a></td><td>Set feedback callback</td></tr>
<!--DbEnv::set_flags--><tr><td><a href="../api_c/env_set_flags.html">DB_ENV-&gt;set_flags</a></td><td>Environment configuration</td></tr>
<!--DbEnv::set_isalive--><tr><td><a href="../api_c/env_set_isalive.html">DB_ENV-&gt;set_isalive</a></td><td>Set thread is-alive callback</td></tr>
<!--DbEnv::set_intermediate_dir_mode--><tr><td><a href="../api_c/env_set_intermediate_dir_mode.html">DB_ENV-&gt;set_intermediate_dir_mode</a></td><td>Set intermediate directory creation mode</td></tr>
<!--DbEnv::set_rpc_server--><tr><td><a href="../api_c/env_set_rpc_server.html">DB_ENV-&gt;set_rpc_server</a></td><td>Establish an RPC server connection</td></tr>
<!--DbEnv::set_shm_key--><tr><td><a href="../api_c/env_set_shm_key.html">DB_ENV-&gt;set_shm_key</a></td><td>Set system memory shared segment ID</td></tr>
<!--DbEnv::set_thread_id--><tr><td><a href="../api_c/env_set_thread_id.html">DB_ENV-&gt;set_thread_id</a></td><td>Set thread of control ID function</td></tr>
<!--DbEnv::set_thread_count--><tr><td><a href="../api_c/env_set_thread_count.html">DB_ENV-&gt;set_thread_count</a></td><td>Set approximate thread count</td></tr>
<!--DbEnv::set_thread_id_string--><tr><td><a href="../api_c/env_set_thread_id_string.html">DB_ENV-&gt;set_thread_id_string</a></td><td>Set thread of control ID format function</td></tr>
<!--DbEnv::set_timeout--><tr><td><a href="../api_c/env_set_timeout.html">DB_ENV-&gt;set_timeout</a></td><td>Set lock and transaction timeout</td></tr>
<!--DbEnv::set_tmp_dir--><tr><td><a href="../api_c/env_set_tmp_dir.html">DB_ENV-&gt;set_tmp_dir</a></td><td>Set the environment temporary file directory</td></tr>
<!--DbEnv::set_verbose--><tr><td><a href="../api_c/env_set_verbose.html">DB_ENV-&gt;set_verbose</a></td><td>Set verbose messages</td></tr>
</table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,159 @@
<!--$Id-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;log_set_config</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;log_set_config</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;log_set_config(DB_ENV *dbenv, u_int32_t flags, int onoff);
<p>
int
DB_ENV-&gt;log_get_config(DB_ENV *dbenv, u_int32_t which, int *onoffp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;log_set_config</b>
<p>The DB_ENV-&gt;log_set_config method configures the Berkeley DB logging
subsystem.</p>
<p>The DB_ENV-&gt;log_set_config method configures a database environment, not only operations
performed using the specified <a href="../api_c/env_class.html">DB_ENV</a> handle.</p>
<p>The DB_ENV-&gt;log_set_config method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;log_set_config method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set by bitwise inclusively <b>OR</b>'ing together one or more
of the following values:
<br>
<a name="2"><!--meow--></a>
<b><a name="DB_LOG_DIRECT">DB_LOG_DIRECT</a></b><ul compact><li>Turn off system buffering of Berkeley DB log files to avoid double caching.
<p>Calling DB_ENV-&gt;log_set_config with the DB_LOG_DIRECT flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_LOG_DIRECT flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_LOG_DIRECT flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="3"><!--meow--></a>
<b><a name="DB_LOG_DSYNC">DB_LOG_DSYNC</a></b><ul compact><li>Configure Berkeley DB to flush log writes to the backing disk before returning
from the write system call, rather than flushing log writes explicitly
in a separate system call, as necessary. This is only available on some
systems (for example, systems supporting the IEEE/ANSI Std 1003.1 (POSIX) standard
O_DSYNC flag, or systems supporting the Windows FILE_FLAG_WRITE_THROUGH
flag). This flag may result in inaccurate file modification times and
other file-level information for Berkeley DB log files. This flag may offer
a performance increase on some systems and a performance decrease on
others.
<p>Calling DB_ENV-&gt;log_set_config with the DB_LOG_DSYNC flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_LOG_DSYNC flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_LOG_DSYNC flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="4"><!--meow--></a>
<b><a name="DB_LOG_AUTO_REMOVE">DB_LOG_AUTO_REMOVE</a></b><ul compact><li>If set, Berkeley DB will automatically remove log files that are no longer
needed.
<p>Automatic log file removal is likely to make catastrophic recovery
impossible.</p>
<p>Replication applications will rarely want to configure automatic log
file removal as it increases the likelihood a master will be unable to
satisfy a client's request for a recent log record.</p>
<p>Calling DB_ENV-&gt;log_set_config with the DB_LOG_AUTO_REMOVE flag affects the
database environment, including all threads of control accessing the
database environment.</p>
<p>The DB_LOG_AUTO_REMOVE flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="5"><!--meow--></a>
<b><a name="DB_LOG_IN_MEMORY">DB_LOG_IN_MEMORY</a></b><ul compact><li>If set, maintain transaction logs in memory rather than on disk. This
means that transactions exhibit the ACI (atomicity, consistency, and
isolation) properties, but not D (durability); that is, database
integrity will be maintained, but if the application or system fails,
integrity will not persist. All database files must be verified and/or
restored from a replication group master or archival backup after
application or system failure.
<p>When in-memory logs are configured and no more log buffer space is
available, Berkeley DB methods may return an additional error value,
<a name="DB_LOG_BUFFER_FULL">DB_LOG_BUFFER_FULL</a>. When choosing log buffer and file sizes
for in-memory logs, applications should ensure the in-memory log buffer
size is large enough that no transaction will ever span the entire
buffer, and avoid a state where the in-memory buffer is full and no
space can be freed because a transaction that started in the first log
"file" is still active.</p>
<p>Calling DB_ENV-&gt;log_set_config with the DB_LOG_IN_MEMORY flag affects the
database environment, including all threads of control accessing the
database environment.</p>
<p>The DB_LOG_IN_MEMORY flag may be used to configure Berkeley DB only before the
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is called.</p></ul>
<a name="6"><!--meow--></a>
<b><a name="DB_LOG_ZERO">DB_LOG_ZERO</a></b><ul compact><li>If set, zero all pages of a log file when that log file is created. This
has shown to provide greater transaction throughput in some environments.
The log file will be zeroed by the thread which needs to re-create the new log
file. Other threads may not write to the log file while this is happening.
<p>Calling DB_ENV-&gt;log_set_config with the DB_LOG_ZERO flag affects the
database environment, including all threads of control accessing the
database environment.</p>
<p>The DB_LOG_ZERO flag may be used to configure Berkeley DB only before the
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is called.</p></ul>
<br></ul>
<b>onoff</b><ul compact><li>If the <b>onoff</b> parameter is zero, the specified flags are cleared;
otherwise they are set.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;log_set_config method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;log_get_config</b>
<p>The DB_ENV-&gt;log_get_config method returns whether the specified <b>which</b>
parameter is currently set or not.</p>
<p>The DB_ENV-&gt;log_get_config method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;log_get_config method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>which</b><ul compact><li>The <b>which</b> parameter is the message value for which configuration
is being checked.</ul>
<b>onoffp</b><ul compact><li>The <b>onoffp</b> parameter references memory into which
the configuration of the specified <b>which</b> parameter is copied.</ul> If the returned <b>onoff</b> value is zero, the parameter is off;
otherwise on.
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,76 @@
<!--$Id: env_lsn_reset.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;lsn_reset</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;lsn_reset</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;lsn_reset(DB_ENV *dbenv, const char *file, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;lsn_reset</b>
<p>The DB_ENV-&gt;lsn_reset method allows database files to be moved from one
transactional database environment to another.</p>
<p>Database pages in transactional database environments contain references
to the environment's log files (that is, log sequence numbers, or LSNs).
Copying or moving a database file from one database environment to
another, and then modifying it, can result in data corruption if the
LSNs are not first cleared.</p>
<p>Note that LSNs should be reset before moving or copying the database
file into a new database environment, rather than moving or copying the
database file and then resetting the LSNs. Berkeley DB has consistency checks
that may be triggered if an application calls DB_ENV-&gt;lsn_reset
on a database in a new environment when the database LSNs still reflect
the old environment.</p>
<p>The DB_ENV-&gt;lsn_reset method modifies the physical file, in-place.
Applications should not reset LSNs in files that are currently in use.</p>
<p>The DB_ENV-&gt;lsn_reset method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;lsn_reset method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>file</b><ul compact><li>The name of the physical file in which the LSNs are to be cleared.</ul>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b>DB_ENCRYPT</b><ul compact><li>The file contains encrypted databases.</ul>
<br></ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;lsn_reset method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

272
docs/api_c/env_open.html Normal file
View File

@@ -0,0 +1,272 @@
<!--$Id: env_open.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;open</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;open</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;open(DB_ENV *dbenv, char *db_home, u_int32_t flags, int mode);
<p>
int
DB_ENV-&gt;get_home(DB_ENV *dbenv, const char **homep);
<p>
int
DB_ENV-&gt;get_open_flags(DB_ENV *dbenv, u_int32_t *flagsp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;open</b>
<p>The DB_ENV-&gt;open method opens a Berkeley DB environment. It provides a
structure for creating a consistent environment for processes using one
or more of the features of Berkeley DB.</p>
<p>The DB_ENV-&gt;open method
returns a non-zero error value on failure
and 0 on success.
If DB_ENV-&gt;open fails, the <a href="../api_c/env_close.html">DB_ENV-&gt;close</a> method must be called
to discard the <a href="../api_c/env_class.html">DB_ENV</a> handle.
</p>
<b>Parameters</b> <br>
<b>db_home</b><ul compact><li>The <b>db_home</b> parameter is the database environment's home
directory. For more information on <b>db_home</b>, and filename
resolution in general, see <a href="../ref/env/naming.html">Berkeley DB File
Naming</a>. The environment variable <b>DB_HOME</b> may be used as
the path of the database home, as described in
<a href="../ref/env/naming.html">Berkeley DB File Naming</a>.</ul>
<p>When using a Unicode build on Windows (the default), the <b>db_home</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<b>flags</b><ul compact><li>The <b>flags</b> parameter specifies the subsystems that are initialized
and how the application's environment affects Berkeley DB file naming, among
other things.
The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<p>Because there are a large number of flags that can be specified, they
have been grouped together by functionality. The first group of flags
indicates which of the Berkeley DB subsystems should be initialized.</p>
<p>The choice of subsystems initialized for a Berkeley DB database environment
is specified by the thread of control initially creating the
environment. Any subsequent thread of control joining the environment
will automatically be configured to use the same subsystems as were
created in the environment (unless the thread of control requests a
subsystem not available in the environment, which will fail).
Applications joining an environment, able to adapt to whatever
subsystems have been configured in the environment, should open the
environment without specifying any subsystem flags. Applications
joining an environment, requiring specific subsystems from their
environments, should open the environment specifying those specific
subsystem flags.</p>
<br>
<b><a name="DB_INIT_CDB">DB_INIT_CDB</a></b><ul compact><li>Initialize locking for the <a href="../ref/cam/intro.html">Berkeley DB Concurrent Data Store</a>
product. In this mode, Berkeley DB provides multiple reader/single writer
access. The only other subsystem that should be specified with the
DB_INIT_CDB flag is DB_INIT_MPOOL.</ul>
<b><a name="DB_INIT_LOCK">DB_INIT_LOCK</a></b><ul compact><li>Initialize the locking subsystem. This subsystem should be used when
multiple processes or threads are going to be reading and writing a
Berkeley DB database, so that they do not interfere with each other. If all
threads are accessing the database(s) read-only, locking is unnecessary.
When the DB_INIT_LOCK flag is specified, it is usually necessary
to run a deadlock detector, as well. See <a href="../utility/db_deadlock.html">db_deadlock</a> and
<a href="../api_c/lock_detect.html">DB_ENV-&gt;lock_detect</a> for more information.</ul>
<b><a name="DB_INIT_LOG">DB_INIT_LOG</a></b><ul compact><li>Initialize the logging subsystem. This subsystem should be used when
recovery from application or system failure is necessary. If the log
region is being created and log files are already present, the log files
are reviewed; subsequent log writes are appended to the end of the log,
rather than overwriting current log entries.</ul>
<b><a name="DB_INIT_MPOOL">DB_INIT_MPOOL</a></b><ul compact><li>Initialize the shared memory buffer pool subsystem. This subsystem
should be used whenever an application is using any Berkeley DB access
method.</ul>
<b><a name="DB_INIT_REP">DB_INIT_REP</a></b><ul compact><li>Initialize the replication subsystem. This subsystem
should be used whenever an application plans on using replication.
The DB_INIT_REP flag requires the DB_INIT_TXN and
DB_INIT_LOCK flags also be configured.</ul>
<b><a name="DB_INIT_TXN">DB_INIT_TXN</a></b><ul compact><li>Initialize the transaction subsystem. This subsystem should be used
when recovery and atomicity of multiple operations are important. The
DB_INIT_TXN flag implies the DB_INIT_LOG flag.</ul>
<br>
<p>The second group of flags govern what recovery, if any, is performed when
the environment is initialized:</p>
<br>
<b><a name="DB_RECOVER">DB_RECOVER</a></b><ul compact><li>Run normal recovery on this environment before opening it for normal
use. If this flag is set, the DB_CREATE and DB_INIT_TXN
flags must also be set, because the regions will be removed and
re-created, and transactions are required for application recovery.</ul>
<b><a name="DB_RECOVER_FATAL">DB_RECOVER_FATAL</a></b><ul compact><li>Run catastrophic recovery on this environment before opening it for
normal use. If this flag is set, the DB_CREATE and
DB_INIT_TXN flags must also be set, because the regions will be
removed and re-created, and transactions are required for application
recovery.</ul>
<br>
<p>A standard part of the recovery process is to remove the existing Berkeley DB
environment and create a new one in which to perform recovery. If the
thread of control performing recovery does not specify the correct
region initialization information (for example, the correct memory pool
cache size), the result can be an application running in an environment
with incorrect cache and other subsystem sizes. For this reason, the
thread of control performing recovery should specify correct
configuration information before calling the DB_ENV-&gt;open method; or it
should remove the environment after recovery is completed, leaving
creation of the correctly sized environment to a subsequent call to
DB_ENV-&gt;open.</p>
<p>All Berkeley DB recovery processing must be single-threaded; that is, only a
single thread of control may perform recovery or access a Berkeley DB
environment while recovery is being performed. Because it is not an
error to specify DB_RECOVER for an environment for which no
recovery is required, it is reasonable programming practice for the
thread of control responsible for performing recovery and creating the
environment to always specify the DB_CREATE and
DB_RECOVER flags during startup.</p>
<p>The DB_ENV-&gt;open function returns successfully if DB_RECOVER
or DB_RECOVER_FATAL is specified and no log files exist, so it
is necessary to ensure that all necessary log files are present before
running recovery. For further information, consult <a href="../utility/db_archive.html">db_archive</a>
and <a href="../utility/db_recover.html">db_recover</a>.</p>
<p>The third group of flags govern file-naming extensions in the environment:</p>
<br>
<a name="2"><!--meow--></a>
<b><a name="DB_USE_ENVIRON">DB_USE_ENVIRON</a></b><ul compact><li>The Berkeley DB process' environment may be permitted to specify information
to be used when naming files; see <a href="../ref/env/naming.html">Berkeley DB File Naming</a>. Because permitting users to specify which files
are used can create security problems, environment information will be
used in file naming for all users only if the DB_USE_ENVIRON
flag is set.</ul>
<b><a name="DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a></b><ul compact><li>The Berkeley DB process' environment may be permitted to specify information
to be used when naming files; see <a href="../ref/env/naming.html">Berkeley DB File Naming</a>. Because permitting users to specify which files
are used can create security problems, if the
DB_USE_ENVIRON_ROOT flag is set, environment information will
be used for file naming only for users with appropriate permissions (for
example, users with a user-ID of 0 on UNIX systems).</ul>
<br>
<p>Finally, there are a few additional unrelated flags:</p>
<br>
<b><a name="DB_CREATE">DB_CREATE</a></b><ul compact><li>Cause Berkeley DB subsystems to create any underlying files, as necessary.</ul>
<b><a name="DB_LOCKDOWN">DB_LOCKDOWN</a></b><ul compact><li>Lock shared Berkeley DB environment files and memory-mapped databases into
memory.</ul>
<b><a name="DB_PRIVATE">DB_PRIVATE</a></b><ul compact><li>Allocate region memory from the heap instead of from memory backed by
the filesystem or system shared memory.
<p>This flag implies the environment will only be accessed by a single
process (although that process may be multithreaded). This flag has two
effects on the Berkeley DB environment. First, all underlying data structures
are allocated from per-process memory instead of from shared memory that
is accessible to more than a single process. Second, mutexes are only
configured to work between threads.</p>
<p>This flag should not be specified if more than a single process is
accessing the environment because it is likely to cause database
corruption and unpredictable behavior. For example, if both a server
application and Berkeley DB utilities (for example, <a href="../utility/db_archive.html">db_archive</a>,
<a href="../utility/db_checkpoint.html">db_checkpoint</a> or <a href="../utility/db_stat.html">db_stat</a>) are expected to access the
environment, the DB_PRIVATE flag should not be specified.</p>
<p>See <a href="../ref/env/region.html">Shared Memory Regions</a> for more
information.</p></ul>
<b><a name="DB_REGISTER">DB_REGISTER</a></b><ul compact><li>Check to see if recovery needs to be performed before opening the
database environment. (For this check to be accurate, all processes
using the environment must specify DB_REGISTER when opening the
environment.) If recovery needs to be performed for any reason
(including the initial use of the DB_REGISTER flag), and
DB_RECOVER is also specified, recovery will be performed and the
open will proceed normally. If recovery needs to be performed and
DB_RECOVER is not specified, <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a> will be
returned. If recovery does not need to be performed, the
DB_RECOVER flag will be ignored. See
<a href="../ref/transapp/app.html">Architecting Transactional Data Store
applications</a> for more information.</ul>
<b><a name="DB_SYSTEM_MEM">DB_SYSTEM_MEM</a></b><ul compact><li>Allocate region memory from system shared memory instead of from heap
memory or memory backed by the filesystem.
<p>See <a href="../ref/env/region.html">Shared Memory Regions</a> for more
information.</p></ul>
<b><a name="DB_THREAD">DB_THREAD</a></b><ul compact><li>Cause the <a href="../api_c/env_class.html">DB_ENV</a> handle returned by DB_ENV-&gt;open to be
<i>free-threaded</i>; that is, concurrently usable by multiple
threads in the address space. The DB_THREAD flag should be specified
if the <a href="../api_c/env_class.html">DB_ENV</a> handle will be concurrently used by more than one
thread in the process, or if any <a href="../api_c/db_class.html">DB</a> handles opened in the scope
of the <a href="../api_c/env_class.html">DB_ENV</a> handle will be concurrently used by more than one
thread in the process.
<p>This flag is required when using the Replication Manager.</p></ul>
<br></ul>
<b>mode</b><ul compact><li>On Windows systems, the mode parameter is ignored.
<p>On UNIX systems or in IEEE/ANSI Std 1003.1 (POSIX) environments, files created by Berkeley DB
are created with mode <b>mode</b> (as described in <b>chmod</b>(2))
and modified by the process' umask value at the time of creation (see
<b>umask</b>(2)). Created files are owned by the process owner; the
group ownership of created files is based on the system and directory
defaults, and is not further specified by Berkeley DB. System shared memory
segments created by Berkeley DB are created with mode <b>mode</b>, unmodified
by the process' umask value. If <b>mode</b> is 0, Berkeley DB will use a
default mode of readable and writable by both owner and group.</p></ul>
<br>
<a name="3"><!--meow--></a>
<br><b>Errors</b>
<p>The DB_ENV-&gt;open method
may fail and return one of the following non-zero errors:</p>
<br>
<b>DB_RUNRECOVERY</b><ul compact><li>The DB_REGISTER flag was specified, a failure has occurred, and no
recovery flag was specified.</ul>
<br>
<br>
<b>DB_VERSION_MISMATCH</b><ul compact><li>The version of the Berkeley DB library doesn't match the version that created
the database environment.</ul>
<br>
<br>
<b>EAGAIN</b><ul compact><li>The shared memory region was locked and (repeatedly) unavailable.</ul>
<br>
<br>
<b>EINVAL</b><ul compact><li>If the DB_THREAD flag was specified and fast mutexes are not
available for this architecture;
The DB_HOME or TMPDIR environment variables were set, but empty;
An incorrectly formatted <b>NAME VALUE</b> entry or line was found; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>ENOSPC</b><ul compact><li>HP-UX only:
Due to the constraints of the PA-RISC memory architecture, HP-UX does not
allow a process to map a file into its address space multiple times.
For this reason, each Berkeley DB environment may be opened only once by a
process on HP-UX; that is, calls to DB_ENV-&gt;open will fail if the
specified Berkeley DB environment has been opened and not subsequently closed.</ul>
<br>
<br>
<b>ENOENT</b><ul compact><li>The file or directory does not exist.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_home</b>
<p>The DB_ENV-&gt;get_home method returns the database environment home directory.</p>
<p>The DB_ENV-&gt;get_home method may be called at any time during the life of the
application.</p>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_open_flags</b>
<p>The DB_ENV-&gt;get_open_flags method returns the open method flags originally used to create the database environment.</p>
<p>The DB_ENV-&gt;get_open_flags method may not be called before the DB_ENV-&gt;open method is called.</p>
<p>The DB_ENV-&gt;get_open_flags method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flagsp</b><ul compact><li>The DB_ENV-&gt;get_open_flags method returns the
open method flags originally used to create the database environment in <b>flagsp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

116
docs/api_c/env_remove.html Normal file
View File

@@ -0,0 +1,116 @@
<!--$Id: env_remove.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;remove</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;remove</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;remove(DB_ENV *dbenv, char *db_home, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;remove</b>
<p>The DB_ENV-&gt;remove method destroys a Berkeley DB environment if it is not
currently in use. The environment regions, including any backing files,
are removed. Any log or database files and the environment directory are
not removed.</p>
<p>If there are processes that have called <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> without
calling <a href="../api_c/env_close.html">DB_ENV-&gt;close</a> (that is, there are processes currently
using the environment), DB_ENV-&gt;remove will fail without further
action unless the <a href="../api_c/env_remove.html#DB_FORCE">DB_FORCE</a> flag is set, in which case
DB_ENV-&gt;remove will attempt to remove the environment, regardless
of any processes still using it.</p>
<p>The result of attempting to forcibly destroy the environment when it is
in use is unspecified. Processes using an environment often maintain open
file descriptors for shared regions within it. On UNIX systems, the
environment removal will usually succeed, and processes that have already
joined the region will continue to run in that region without change.
However, processes attempting to join the environment will either fail
or create new regions. On other systems in which the <b>unlink</b>(2) system call will fail if any process has an open file descriptor for
the file (for example Windows/NT), the region removal will fail.</p>
<p>Calling DB_ENV-&gt;remove should not be necessary for most applications
because the Berkeley DB environment is cleaned up as part of normal database
recovery procedures. However, applications may want to call
DB_ENV-&gt;remove as part of application shut down to free up system
resources. For example, if the <a href="../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag was specified
to <a href="../api_c/env_open.html">DB_ENV-&gt;open</a>, it may be useful to call DB_ENV-&gt;remove in
order to release system shared memory segments that have been allocated.
Or, on architectures in which mutexes require allocation of underlying
system resources, it may be useful to call DB_ENV-&gt;remove in order
to release those resources. Alternatively, if recovery is not required
because no database state is maintained across failures, and no system
resources need to be released, it is possible to clean up an environment
by simply removing all the Berkeley DB files in the database environment's
directories.</p>
<p>In multithreaded applications, only a single thread may call
DB_ENV-&gt;remove.</p>
<p>A <a href="../api_c/env_class.html">DB_ENV</a> handle that has already been used to open an environment
should not be used to call the DB_ENV-&gt;remove method; a new
<a href="../api_c/env_class.html">DB_ENV</a> handle should be created for that purpose.</p>
<p>After DB_ENV-&gt;remove has been called, regardless of its return,
the Berkeley DB environment handle may not be accessed again.</p>
<p>The DB_ENV-&gt;remove method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>db_home</b><ul compact><li>The <b>db_home</b> parameter names the database environment to be removed.</ul>
<p>When using a Unicode build on Windows (the default), the <b>db_home</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<br>
<b><a name="DB_FORCE">DB_FORCE</a></b><ul compact><li>If the <a href="../api_c/env_remove.html#DB_FORCE">DB_FORCE</a> flag is set, the environment is removed, regardless
of any processes that may still using it, and no locks are acquired
during this process. (Generally, the <a href="../api_c/env_remove.html#DB_FORCE">DB_FORCE</a> flag is
specified only when applications were unable to shut down cleanly, and there
is a risk that an application may have died holding a Berkeley DB lock.)</ul>
<a name="2"><!--meow--></a>
<b><a name="DB_USE_ENVIRON">DB_USE_ENVIRON</a></b><ul compact><li>The Berkeley DB process' environment may be permitted to specify information
to be used when naming files; see <a href="../ref/env/naming.html">Berkeley DB File Naming</a>. Because permitting users to specify which files
are used can create security problems, environment information will be
used in file naming for all users only if the DB_USE_ENVIRON
flag is set.</ul>
<b><a name="DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a></b><ul compact><li>The Berkeley DB process' environment may be permitted to specify information
to be used when naming files; see <a href="../ref/env/naming.html">Berkeley DB File Naming</a>. Because permitting users to specify which files
are used can create security problems, if the
DB_USE_ENVIRON_ROOT flag is set, environment information will
be used for file naming only for users with appropriate permissions (for
example, users with a user-ID of 0 on UNIX systems).</ul>
<br></ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;remove method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EBUSY</b><ul compact><li>The shared memory region was in use and the force flag was not set.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,93 @@
<!--$Id: env_set_alloc.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_alloc</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_alloc</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_alloc(DB_ENV *dbenv,
void *(*app_malloc)(size_t),
void *(*app_realloc)(void *, size_t),
void (*app_free)(void *));
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_alloc</b>
<p>Set the allocation functions used by the <a href="../api_c/env_class.html">DB_ENV</a> and <a href="../api_c/db_class.html">DB</a>
methods to allocate or free memory owned by the application.</p>
<p>There are a number of interfaces in Berkeley DB where memory is allocated by
the library and then given to the application. For example, the
<a href="../api_c/dbt_class.html#DB_DBT_MALLOC">DB_DBT_MALLOC</a> flag, when specified in the <a href="../api_c/dbt_class.html">DBT</a> object,
will cause the <a href="../api_c/db_class.html">DB</a> methods to allocate and reallocate memory
which then becomes the responsibility of the calling application. (See
<a href="../api_c/dbt_class.html">DBT</a> for more information.) Other examples are the Berkeley DB
interfaces which return statistical information to the application:
<a href="../api_c/db_stat.html">DB-&gt;stat</a>, <a href="../api_c/lock_stat.html">DB_ENV-&gt;lock_stat</a>, <a href="../api_c/log_archive.html">DB_ENV-&gt;log_archive</a>,
<a href="../api_c/log_stat.html">DB_ENV-&gt;log_stat</a>, <a href="../api_c/memp_stat.html">DB_ENV-&gt;memp_stat</a>, and <a href="../api_c/txn_stat.html">DB_ENV-&gt;txn_stat</a>. There is one
method in Berkeley DB where memory is allocated by the application and then
given to the library: <a href="../api_c/db_associate.html">DB-&gt;associate</a>.</p>
<p>On systems in which there may be multiple library versions of the
standard allocation routines (notably Windows NT), transferring memory
between the library and the application will fail because the Berkeley DB
library allocates memory from a different heap than the application uses
to free it. To avoid this problem, the DB_ENV-&gt;set_alloc and
<a href="../api_c/db_set_alloc.html">DB-&gt;set_alloc</a> methods can be used to pass Berkeley DB references to the
application's allocation routines.</p>
<p>It is not an error to specify only one or two of the possible allocation
function parameters to these interfaces; however, in that case the
specified interfaces must be compatible with the standard library
interfaces, as they will be used together. The functions specified must
match the calling conventions of the ANSI C X3.159-1989 (ANSI C) library routines of
the same name.</p>
<p>The DB_ENV-&gt;set_alloc method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_alloc method may not be called after the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is
called.
</p>
<p>The DB_ENV-&gt;set_alloc method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>app_malloc</b><ul compact><li>The <b>app_malloc</b> parameter is the application-specified malloc
function.</ul>
<b>app_realloc</b><ul compact><li>The <b>app_realloc</b> parameter is the application-specified realloc
function.</ul>
<b>app_free</b><ul compact><li>The <b>app_free</b> parameter is the application-specified free function.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_alloc method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,100 @@
<!--$Id: env_set_app_dispatch.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_app_dispatch</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_app_dispatch</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_app_dispatch(DB_ENV *dbenv,
int (*tx_recover)(DB_ENV *dbenv,
DBT *log_rec, DB_LSN *lsn, db_recops op));
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_app_dispatch</b>
<p>Declare a function to be called during transaction abort and recovery
to process application-specific log records.</p>
<p>The DB_ENV-&gt;set_app_dispatch method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_app_dispatch method may not be called after the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is
called.
If the database environment already exists when
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> is called, the information specified to DB_ENV-&gt;set_app_dispatch
must be consistent with the existing environment or corruption can
occur.</p>
<p>The DB_ENV-&gt;set_app_dispatch method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>tx_recover</b><ul compact><li>The <b>tx_recover</b> parameter is the application's abort and recovery
function. The function takes four parameters:
<br>
<b><b>dbenv</b></b><ul compact><li>The <b>dbenv</b> parameter is the enclosing database environment handle.</ul>
<b><b>log_rec</b></b><ul compact><li>The <b>log_rec</b> parameter is a log record.</ul>
<b><b>lsn</b></b><ul compact><li>The <b>lsn</b> parameter is a log sequence number.</ul>
<b><b>op</b></b><ul compact><li>The <b>op</b> parameter is one of the following values:</ul>
<br>
<b><a name="DB_TXN_BACKWARD_ROLL">DB_TXN_BACKWARD_ROLL</a></b><ul compact><li>The log is being read backward to determine which transactions have been
committed and to abort those operations that were not; undo the operation
described by the log record.</ul>
<b><a name="DB_TXN_FORWARD_ROLL">DB_TXN_FORWARD_ROLL</a></b><ul compact><li>The log is being played forward; redo the operation described by the log
record.</ul>
<b><a name="DB_TXN_ABORT">DB_TXN_ABORT</a></b><ul compact><li>The log is being read backward during a transaction abort; undo the
operation described by the log record.</ul>
<b><a name="DB_TXN_APPLY">DB_TXN_APPLY</a></b><ul compact><li>The log is being applied on a replica site; redo the operation
described by the log record.</ul>
<b><a name="DB_TXN_PRINT">DB_TXN_PRINT</a></b><ul compact><li>The log is being printed for debugging purposes; print the contents of
this log record in the desired format.</ul>
<br>
<p>The DB_TXN_FORWARD_ROLL and DB_TXN_APPLY operations
frequently imply the same actions, redoing changes that appear in the
log record, although if a recovery function is to be used on a
replication client where reads may be taking place concurrently with the
processing of incoming messages, DB_TXN_APPLY operations should
also perform appropriate locking. The macro DB_REDO(op) checks that the
operation is one of DB_TXN_FORWARD_ROLL or DB_TXN_APPLY,
and should be used in the recovery code to refer to the conditions under
which operations should be redone. Similarly, the macro DB_UNDO(op)
checks if the operation is one of DB_TXN_BACKWARD_ROLL or
DB_TXN_ABORT.</p>
<br>
<p>The function must return 0 on success and either <b>errno</b> or a
value outside of the Berkeley DB error name space on failure.</p></ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_app_dispatch method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/txn_class.html">DB_TXN</a>
<br><b>See Also</b>
<a href="../api_c/txn_list.html">Transaction Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!--$Id: env_set_cache_max.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_cache_max</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_cache_max</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_cache_max(DB_ENV *dbenv, u_int32_t gbytes, u_int32_t bytes);
<p>
int
DB_ENV-&gt;get_cache_max(DB_ENV *dbenv, u_int32_t *gbytesp, u_int32_t *bytesp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_cache_max</b>
<p>The DB_ENV-&gt;set_cache_max method sets the maximum cache size, in bytes.
The specified size is rounded to the nearest multiple of the cache
region size, which is the initial cache size divided by the number of
regions specified to the <a href="../api_c/env_set_cachesize.html">DB_ENV-&gt;set_cachesize</a> method. If no value is
specified, it defaults to the initial cache size.</p>
<p>The database environment's maximum cache size may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_cache_max", one or more whitespace
characters, and the size in bytes.
Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DB_ENV-&gt;set_cache_max method configures a database environment, not only operations
performed using the specified <a href="../api_c/env_class.html">DB_ENV</a> handle.</p>
<p>The DB_ENV-&gt;set_cache_max method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;set_cache_max method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>mp_mmapsize</b><ul compact><li>The <b>mp_mmapsize</b> parameter is the maximum file size, in bytes,
for a file to be mapped into the process address space.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_cache_max method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_cache_max</b>
<p>The DB_ENV-&gt;get_cache_max method returns the maximum size of the cache.</p>
<p>The DB_ENV-&gt;get_cache_max method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_cache_max method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>bytesp</b><ul compact><li>The <b>bytesp</b> parameter references memory into which
the additional bytes of memory in the cache is copied.</ul>
<b>gbytesp</b><ul compact><li>The <b>gbytesp</b> parameter references memory into which
the gigabytes of memory in the cache is copied.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,121 @@
<!--$Id: env_set_cachesize.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_cachesize</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_cachesize</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_cachesize(DB_ENV *dbenv,
u_int32_t gbytes, u_int32_t bytes, int ncache);
<p>
int
DB_ENV-&gt;get_cachesize(DB_ENV *dbenv,
u_int32_t *gbytesp, u_int32_t *bytesp, int *ncachep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_cachesize</b>
<p>Set the size of the shared memory buffer pool -- that is, the cache.
The cache should be the size of the normal working data set of the
application, with some small amount of additional memory for unusual
situations. (Note: the working set is not the same as the number of
pages accessed simultaneously, and is usually much larger.)</p>
<p>The default cache size is 256KB, and may not be specified as less than
20KB. Any cache size less than 500MB is automatically increased by 25%
to account for buffer pool overhead; cache sizes larger than 500MB are
used as specified. The maximum size of a single cache is 4GB on 32-bit
systems and 10TB on 64-bit systems. (All sizes are in powers-of-two,
that is, 256KB is 2^18 not 256,000.) For information on tuning the Berkeley DB
cache size, see <a href="../ref/am_conf/cachesize.html">Selecting a
cache size</a>.</p>
<p>It is possible to specify caches to Berkeley DB large enough they cannot be
allocated contiguously on some architectures. For example, some
releases of Solaris limit the amount of memory that may be allocated
contiguously by a process. If <b>ncache</b> is 0 or 1, the cache will
be allocated contiguously in memory. If it is greater than 1, the cache
will be split across <b>ncache</b> separate regions, where the
<b>region size</b> is equal to the initial cache size divided by
<b>ncache</b>.</p>
<p>The memory pool may be resized by calling DB_ENV-&gt;set_cachesize
after the environment is open. The supplied size will be rounded to
the nearest multiple of the region size and may not be larger than the
maximum size configured with <a href="../api_c/env_set_cache_max.html">DB_ENV-&gt;set_cache_max</a>. The
<b>ncache</b> parameter is ignored when resizing the cache.</p>
<p>The database environment's initial cache size may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_cachesize", one or more whitespace
characters, and the initial cache size specified in three parts: the gigabytes of
cache, the additional bytes of cache, and the number of caches, also
separated by whitespace characters. For example, "set_cachesize 2
524288000 3" would create a 2.5GB logical cache, split between three
physical caches.
Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DB_ENV-&gt;set_cachesize method configures a database environment, not only operations
performed using the specified <a href="../api_c/env_class.html">DB_ENV</a> handle.</p>
<p>The DB_ENV-&gt;set_cachesize method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;set_cachesize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>bytes</b><ul compact><li>The size of the cache is set to <b>gbytes</b> gigabytes plus <b>bytes</b>.</ul>
<b>gbytes</b><ul compact><li>The size of the cache is set to <b>gbytes</b> gigabytes plus <b>bytes</b>.</ul>
<b>ncache</b><ul compact><li>The <b>ncache</b> parameter is the number of caches to create.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_cachesize method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the specified cache size was impossibly small;
; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_cachesize</b>
<p>The DB_ENV-&gt;get_cachesize method returns the current size and composition of the
cache.</p>
<p>The DB_ENV-&gt;get_cachesize method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_cachesize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>bytesp</b><ul compact><li>The <b>bytesp</b> parameter references memory into which
the additional bytes of memory in the cache is copied.</ul>
<b>gbytesp</b><ul compact><li>The <b>gbytesp</b> parameter references memory into which
the gigabytes of memory in the cache is copied.</ul>
<b>ncachep</b><ul compact><li>The <b>ncachep</b> parameter references memory into which
the number of caches is copied.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,99 @@
<!--$Id: env_set_data_dir.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_data_dir</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_data_dir</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_data_dir(DB_ENV *dbenv, const char *dir);
<p>
int
DB_ENV-&gt;get_data_dirs(DB_ENV *dbenv, const char ***dirpp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_data_dir</b>
<p>Set the path of a directory to be used as the location of the access
method database files. Paths specified to the <a href="../api_c/db_open.html">DB-&gt;open</a> function
will be searched relative to this path. Paths set using this method
are additive, and specifying more than one will result in each specified
directory being searched for database files. If any directories are
specified, created database files will always be created in the first
path specified.</p>
<p>If no database directories are specified, database files must be named
either by absolute paths or relative to the environment home directory.
See <a href="../ref/env/naming.html">Berkeley DB File Naming</a> for more
information.</p>
<p>The database environment's data directories may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_data_dir", one or more whitespace
characters, and the directory name.
</p>
<p>The DB_ENV-&gt;set_data_dir method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_data_dir method may not be called after the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is
called.
If the database environment already exists when
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> is called, the information specified to DB_ENV-&gt;set_data_dir
must be consistent with the existing environment or corruption can
occur.</p>
<p>The DB_ENV-&gt;set_data_dir method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>dir</b><ul compact><li>The <b>dir</b> parameter is a directory to be used as a location for
database files.</ul>
<p>When using a Unicode build on Windows (the default), the <b>dir</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_data_dir method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_data_dirs</b>
<p>The DB_ENV-&gt;get_data_dirs method returns the NULL-terminated array of directories.</p>
<p>The DB_ENV-&gt;get_data_dirs method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_data_dirs method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>dirpp</b><ul compact><li>The DB_ENV-&gt;get_data_dirs method returns a reference to the
NULL-terminated array of directories in <b>dirpp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,94 @@
<!--$Id: env_set_encrypt.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_encrypt</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_encrypt</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_encrypt(DB_ENV *dbenv, const char *passwd, u_int32_t flags);
<p>
int
DB_ENV-&gt;get_encrypt_flags(DB_ENV *dbenv, u_int32_t *flagsp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_encrypt</b>
<p>Set the password used by the Berkeley DB library to perform encryption and
decryption.</p>
<p>The DB_ENV-&gt;set_encrypt method configures a database environment, not only operations
performed using the specified <a href="../api_c/env_class.html">DB_ENV</a> handle.</p>
<p>The DB_ENV-&gt;set_encrypt method may not be called after the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is
called.
If the database environment already exists when
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> is called, the information specified to DB_ENV-&gt;set_encrypt
must be consistent with the existing environment or an error will be
returned.
</p>
<p>The DB_ENV-&gt;set_encrypt method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_ENCRYPT_AES">DB_ENCRYPT_AES</a></b><ul compact><li>Use the Rijndael/AES (also known as the Advanced Encryption Standard
and Federal Information Processing Standard (FIPS) 197) algorithm for
encryption or decryption.</ul>
<br></ul>
<b>passwd</b><ul compact><li>The <b>passwd</b> parameter is the password used to perform encryption
and decryption.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_encrypt method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a>
was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>EOPNOTSUPP</b><ul compact><li>Cryptography is not available in this Berkeley DB release.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_encrypt_flags</b>
<p>The DB_ENV-&gt;get_encrypt_flags method returns the encryption flags.</p>
<p>The DB_ENV-&gt;get_encrypt_flags method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_encrypt_flags method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flagsp</b><ul compact><li>The DB_ENV-&gt;get_encrypt_flags method returns the
encryption flags in <b>flagsp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,77 @@
<!--$Id: env_set_errcall.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_errcall</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_errcall</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB_ENV-&gt;set_errcall(DB_ENV *dbenv, void (*db_errcall_fcn)
(const DB_ENV *dbenv, const char *errpfx, const char *msg));
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_errcall</b>
<p>When an error occurs in the Berkeley DB library, a Berkeley DB error or an error
return value is returned by the interface. In some cases, however,
the <b>errno</b> value may be insufficient to completely describe
the cause of the error, especially during initial application debugging.</p>
<p>The DB_ENV-&gt;set_errcall and <a href="../api_c/db_set_errcall.html">DB-&gt;set_errcall</a> methods are used to
enhance the mechanism for reporting error messages to the application.
In some cases, when an error occurs, Berkeley DB will call
<b>db_errcall_fcn</b> with additional error information. It is up to
the <b>db_errcall_fcn</b> function to display the error message in an
appropriate manner.</p>
<p>Setting <b>db_errcall_fcn</b> to NULL unconfigures the callback interface.</p>
<p>Alternatively, you can use the <a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a> or
<a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a> methods to display the additional information via
a C library FILE *.</p>
<p>This error-logging enhancement does not slow performance or significantly
increase application size, and may be run during normal operation as well
as during application debugging.</p>
<p>The DB_ENV-&gt;set_errcall method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_errcall method may be called at any time during the life of the
application.</p>
<b>Parameters</b> <br>
<b>db_errcall_fcn</b><ul compact><li>The <b>db_errcall_fcn</b> parameter is the application-specified error
reporting function. The function takes three parameters:
<br>
<b><b>dbenv</b></b><ul compact><li>The <b>dbenv</b> parameter is the enclosing database environment.</ul>
<b><b>errpfx</b></b><ul compact><li>The <b>errpfx</b> parameter is the prefix string (as previously set by
<a href="../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a> or <a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a>).</ul>
<b><b>msg</b></b><ul compact><li>The <b>msg</b> parameter is the error message string.</ul>
<br>
<p>Berkeley DB is not re-entrant. Callback functions should not attempt to make
library calls (for example, to release locks or close open handles).
Re-entering Berkeley DB is not guaranteed to work correctly, and the results
are undefined.</p></ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,93 @@
<!--$Id: env_set_errfile.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_errfile</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_errfile</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB_ENV-&gt;set_errfile(DB_ENV *dbenv, FILE *errfile);
<p>
void
DB_ENV-&gt;get_errfile(DB_ENV *dbenv, FILE **errfilep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_errfile</b>
When an error occurs in the Berkeley DB library, a Berkeley DB error or an error
return value is returned by the interface. In some cases, however, the
return value may be insufficient to completely describe the cause of the
error especially during initial application debugging.
<p>The DB_ENV-&gt;set_errfile and <a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a> methods are used to
enhance the mechanism for reporting error messages to the application
by setting a C library FILE * to be used for displaying additional Berkeley DB
error messages. In some cases, when an error occurs, Berkeley DB will output
an additional error message to the specified file reference.</p>
<p>The error message will consist of the prefix string and a colon
("<b>:</b>") (if a prefix string was previously specified using
<a href="../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a> or <a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a>), an error string, and
a trailing &lt;newline&gt; character.</p>
<p>The default configuration when applications first create <a href="../api_c/db_class.html">DB</a> or
<a href="../api_c/env_class.html">DB_ENV</a> handles is as if the DB_ENV-&gt;set_errfile or
<a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a> methods were called with the standard error output
(stderr) specified as the FILE * argument. Applications wanting no
output at all can turn off this default configuration by calling the
DB_ENV-&gt;set_errfile or <a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a> methods with NULL as the
FILE * argument. Additionally, explicitly configuring the error output
channel using any of the DB_ENV-&gt;set_errfile,
<a href="../api_c/db_set_errfile.html">DB-&gt;set_errfile</a>, <a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a>,
<a href="../api_c/db_set_errcall.html">DB-&gt;set_errcall</a>, <a href="../api_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> or
<a href="../api_cxx/db_set_error_stream.html">Db::set_error_stream</a> methods will also turn off this default output
for the application.</p>
<p>This error logging enhancement does not slow performance or significantly
increase application size, and may be run during normal operation as well
as during application debugging.</p>
<p>The DB_ENV-&gt;set_errfile method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_errfile method may be called at any time during the life of the
application.</p>
<b>Parameters</b> <br>
<b>errfile</b><ul compact><li>The <b>errfile</b> parameter is a C library FILE * to be used for
displaying additional Berkeley DB error information.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_errfile</b>
<p>The DB_ENV-&gt;get_errfile method returns the FILE *.</p>
<p>The DB_ENV-&gt;get_errfile method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_errfile method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>errfilep</b><ul compact><li>The DB_ENV-&gt;get_errfile method returns the
FILE * in <b>errfilep</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,72 @@
<!--$Id: env_set_errpfx.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_errpfx</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_errpfx</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
void
DB_ENV-&gt;set_errpfx(DB_ENV *dbenv, const char *errpfx);
<p>
void
DB_ENV-&gt;get_errpfx(DB_ENV *dbenv, const char **errpfxp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_errpfx</b>
<p>Set the prefix string that appears before error messages issued by Berkeley DB.</p>
<p>The <a href="../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a> and DB_ENV-&gt;set_errpfx methods do not copy
the memory to which the <b>errpfx</b> parameter refers; rather, they
maintain a reference to it. Although this allows applications to modify
the error message prefix at any time (without repeatedly calling the
interfaces), it means the memory must be maintained until the handle is
closed.</p>
<p>The DB_ENV-&gt;set_errpfx method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_errpfx method may be called at any time during the life of the
application.</p>
<b>Parameters</b> <br>
<b>errpfx</b><ul compact><li>The <b>errpfx</b> parameter is the application-specified error prefix
for additional error messages.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_errpfx</b>
<p>The DB_ENV-&gt;get_errpfx method returns the error prefix.</p>
<p>The DB_ENV-&gt;get_errpfx method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_errpfx method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>errpfxp</b><ul compact><li>The DB_ENV-&gt;get_errpfx method returns a reference to the
error prefix in <b>errpfxp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,76 @@
<!--$Id: env_set_feedback.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_feedback</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_feedback</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_feedback(DB_ENV *dbenv,
void (*db_feedback_fcn)(DB_ENV *dbenv, int opcode, int percent));
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_feedback</b>
<p>Some operations performed by the Berkeley DB library can take non-trivial
amounts of time. The DB_ENV-&gt;set_feedback method can be used by applications
to monitor progress within these operations. When an operation is
likely to take a long time, Berkeley DB will call the specified callback
function with progress information.</p>
<p>It is up to the callback function to display this information in an
appropriate manner.</p>
<p>The DB_ENV-&gt;set_feedback method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle
<p>The DB_ENV-&gt;set_feedback method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;set_feedback method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>db_feedback_fcn</b><ul compact><li>The <b>db_feedback_fcn</b> parameter is the application-specified
feedback function called to report Berkeley DB operation progress. The
callback function must take three parameters:
<br>
<b><b>dbenv</b></b><ul compact><li>The <b>dbenv</b> parameter is a reference to the enclosing database
environment.</ul>
<b><b>opcode</b></b><ul compact><li>The <b>opcode</b> parameter is an operation code. The <b>opcode</b>
parameter may take on any of the following values:
<br>
<b><a name="DB_RECOVER">DB_RECOVER</a></b><ul compact><li>The environment is being recovered.</ul>
<br></ul>
<b><b>percent</b></b><ul compact><li>The <b>percent</b> parameter is the percent of the operation that has
been completed, specified as an integer value between 0 and 100.</ul>
<br></ul>
<p>Berkeley DB is not re-entrant. Callback functions should not attempt to make
library calls (for example, to release locks or close open handles).
Re-entering Berkeley DB is not guaranteed to work correctly, and the results
are undefined.</p>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,321 @@
<!--$Id-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_flags</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_flags</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_flags(DB_ENV *dbenv, u_int32_t flags, int onoff);
<p>
int
DB_ENV-&gt;get_flags(DB_ENV *dbenv, u_int32_t *flagsp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_flags</b>
<p>Configure a database environment.</p>
<p>The database environment's flag values may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_flags", one or more whitespace
characters, and the method flag parameter as a string; for example, "set_flags
DB_TXN_NOSYNC".
Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DB_ENV-&gt;set_flags method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set by bitwise inclusively <b>OR</b>'ing together one or more
of the following values:
<br>
<b><a name="DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></b><ul compact><li>If set, <a href="../api_c/db_class.html">DB</a> handle operations for which no explicit transaction
handle was specified, and which modify databases in the database
environment, will be automatically enclosed within a transaction.
<p>Calling DB_ENV-&gt;set_flags with the <a href="../api_c/env_set_flags.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a> flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the <a href="../api_c/env_set_flags.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a> flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The <a href="../api_c/env_set_flags.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a> flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="2"><!--meow--></a>
<b><a name="DB_CDB_ALLDB">DB_CDB_ALLDB</a></b><ul compact><li>If set, Berkeley DB Concurrent Data Store applications will perform locking on an environment-wide
basis rather than on a per-database basis.
<p>Calling DB_ENV-&gt;set_flags with the DB_CDB_ALLDB flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_CDB_ALLDB flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_CDB_ALLDB flag may be used to configure Berkeley DB only before the
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is called.</p></ul>
<a name="3"><!--meow--></a>
<b><a name="DB_DIRECT_DB">DB_DIRECT_DB</a></b><ul compact><li>Turn off system buffering of Berkeley DB database files to avoid double caching.
<p>Calling DB_ENV-&gt;set_flags with the DB_DIRECT_DB flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_DIRECT_DB flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_DIRECT_DB flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="4"><!--meow--></a>
<b><a name="DB_DSYNC_DB">DB_DSYNC_DB</a></b><ul compact><li>Configure Berkeley DB to flush database writes to the backing disk before
returning from the write system call, rather than flushing database
writes explicitly in a separate system call, as necessary. This is only
available on some systems (for example, systems supporting the
IEEE/ANSI Std 1003.1 (POSIX) standard O_DSYNC flag, or systems supporting the Windows
FILE_FLAG_WRITE_THROUGH flag). This flag may result in inaccurate file
modification times and other file-level information for Berkeley DB database
files. This flag will almost certainly result in a performance decrease
on most systems. This flag is only applicable to certain filesysystem
(for example, the Veritas VxFS filesystem), where the filesystem's
support for trickling writes back to stable storage behaves badly (or
more likely, has been misconfigured).
<p>Calling DB_ENV-&gt;set_flags with the DB_DSYNC_DB flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_DSYNC_DB flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_DSYNC_DB flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<b><a name="DB_MULTIVERSION">DB_MULTIVERSION</a></b><ul compact><li>If set, all databases in the environment will be opened as if
DB_MULTIVERSION is passed to <a href="../api_c/db_open.html">DB-&gt;open</a>. This flag will
be ignored for queue databases for which DB_MULTIVERSION is not
supported.
<p>Calling DB_ENV-&gt;set_flags with the DB_MULTIVERSION flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_MULTIVERSION flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_MULTIVERSION flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="5"><!--meow--></a>
<b><a name="DB_NOLOCKING">DB_NOLOCKING</a></b><ul compact><li>If set, Berkeley DB will grant all requested mutual exclusion mutexes and
database locks without regard for their actual availability. This
functionality should never be used for purposes other than debugging.
<p>Calling DB_ENV-&gt;set_flags with the DB_NOLOCKING flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
</p>
<p>The DB_NOLOCKING flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="6"><!--meow--></a>
<b><a name="DB_NOMMAP">DB_NOMMAP</a></b><ul compact><li>If set, Berkeley DB will copy read-only database files into the local cache
instead of potentially mapping them into process memory (see the
description of the <a href="../api_c/env_set_mp_mmapsize.html">DB_ENV-&gt;set_mp_mmapsize</a> method for further
information).
<p>Calling DB_ENV-&gt;set_flags with the DB_NOMMAP flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_NOMMAP flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_NOMMAP flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="7"><!--meow--></a>
<b><a name="DB_NOPANIC">DB_NOPANIC</a></b><ul compact><li>If set, Berkeley DB will ignore any panic state in the database environment.
(Database environments in a panic state normally refuse all attempts to
call Berkeley DB functions, returning <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>.) This
functionality should never be used for purposes other than debugging.
<p>Calling DB_ENV-&gt;set_flags with the DB_NOPANIC flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
</p>
<p>The DB_NOPANIC flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<b><a name="DB_OVERWRITE">DB_OVERWRITE</a></b><ul compact><li>Overwrite files stored in encrypted formats before deleting them. Berkeley DB
overwrites files using alternating 0xff, 0x00 and 0xff byte patterns.
For file overwriting to be effective, the underlying file must be stored
on a fixed-block filesystem. Systems with journaling or logging filesystems
will require operating system support and probably modification of the
Berkeley DB sources.
<p>Calling DB_ENV-&gt;set_flags with the DB_OVERWRITE flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
</p>
<p>The DB_OVERWRITE flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="8"><!--meow--></a>
<b><a name="DB_PANIC_ENVIRONMENT">DB_PANIC_ENVIRONMENT</a></b><ul compact><li>If set, Berkeley DB will set the panic state for the database environment.
(Database environments in a panic state normally refuse all attempts to
call Berkeley DB functions, returning <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>.) This flag may
not be specified using the environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.
<p>Calling DB_ENV-&gt;set_flags with the DB_PANIC_ENVIRONMENT flag affects the
database environment, including all threads of control accessing the
database environment.</p>
<p>The DB_PANIC_ENVIRONMENT flag may be used to configure Berkeley DB only after the
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is called.</p></ul>
<a name="9"><!--meow--></a>
<b><a name="DB_REGION_INIT">DB_REGION_INIT</a></b><ul compact><li>In some applications, the expense of page-faulting the underlying shared
memory regions can affect performance. (For example, if the page-fault
occurs while holding a lock, other lock requests can convoy, and overall
throughput may decrease.) If set, Berkeley DB will page-fault shared regions
into memory when initially creating or joining a Berkeley DB environment. In
addition, Berkeley DB will write the shared regions when creating an
environment, forcing the underlying virtual memory and filesystems to
instantiate both the necessary memory and the necessary disk space.
This can also avoid out-of-disk space failures later on.
<p>Calling DB_ENV-&gt;set_flags with the DB_REGION_INIT flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_REGION_INIT flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_REGION_INIT flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<b><a name="DB_TIME_NOTGRANTED">DB_TIME_NOTGRANTED</a></b><ul compact><li>If set, database calls timing out based on lock or transaction timeout
values will
return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> instead of <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a>.
This allows applications to distinguish between operations which have
deadlocked and operations which have exceeded their time limits.
<p>Calling DB_ENV-&gt;set_flags with the DB_TIME_NOTGRANTED flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_TIME_NOTGRANTED flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_TIME_NOTGRANTED flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="10"><!--meow--></a>
<b><a name="DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></b><ul compact><li>If set, Berkeley DB will not write or synchronously flush the log on transaction
commit.
This means that transactions exhibit the ACI (atomicity, consistency,
and isolation) properties, but not D (durability); that is, database
integrity will be maintained, but if the application or system fails,
it is possible some number of the most recently committed transactions
may be undone during recovery. The number of transactions at risk is
governed by how many log updates can fit into the log buffer, how often
the operating system flushes dirty buffers to disk, and how often the
log is checkpointed.
<p>Calling DB_ENV-&gt;set_flags with the DB_TXN_NOSYNC flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_TXN_NOSYNC flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p> <p>The DB_TXN_NOSYNC flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<b><a name="DB_TXN_NOWAIT">DB_TXN_NOWAIT</a></b><ul compact><li>If set and a lock is unavailable for any Berkeley DB operation performed in
the context of a transaction, cause the operation to
return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> (or <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> if
configured using the DB_TIME_NOTGRANTED flag).
<p>Calling DB_ENV-&gt;set_flags with the DB_TXN_NOWAIT flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_TXN_NOWAIT flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_TXN_NOWAIT flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<b><a name="DB_TXN_SNAPSHOT">DB_TXN_SNAPSHOT</a></b><ul compact><li>If set, all transactions in the environment will be started as if
DB_TXN_SNAPSHOT were passed to <a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>, and all
non-transactional cursors will be opened as if DB_TXN_SNAPSHOT
were passed to <a href="../api_c/db_cursor.html">DB-&gt;cursor</a>.
<p>Calling DB_ENV-&gt;set_flags with the DB_TXN_SNAPSHOT flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_TXN_SNAPSHOT flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_TXN_SNAPSHOT flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="11"><!--meow--></a>
<b><a name="DB_TXN_WRITE_NOSYNC">DB_TXN_WRITE_NOSYNC</a></b><ul compact><li>If set, Berkeley DB will write, but will not synchronously flush, the log on
transaction commit.
This means that transactions exhibit the ACI (atomicity, consistency,
and isolation) properties, but not D (durability); that is, database
integrity will be maintained, but if the system fails, it is possible
some number of the most recently committed transactions may be undone
during recovery. The number of transactions at risk is governed by how
often the system flushes dirty buffers to disk and how often the log is
checkpointed.
<p>Calling DB_ENV-&gt;set_flags with the DB_TXN_WRITE_NOSYNC flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_TXN_WRITE_NOSYNC flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_TXN_WRITE_NOSYNC flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<a name="12"><!--meow--></a>
<b><a name="DB_YIELDCPU">DB_YIELDCPU</a></b><ul compact><li>If set, Berkeley DB will yield the processor immediately after each page or
mutex acquisition. This functionality should never be used for purposes
other than stress testing.
<p>Calling DB_ENV-&gt;set_flags with the DB_YIELDCPU flag only affects
the specified <a href="../api_c/env_class.html">DB_ENV</a> handle (and any other Berkeley DB handles opened
within the scope of that handle).
For consistent behavior across the environment, all <a href="../api_c/env_class.html">DB_ENV</a>
handles opened in the environment must either set the DB_YIELDCPU flag
or the flag should be specified in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
file.</p>
<p>The DB_YIELDCPU flag may be used to configure Berkeley DB at any time during
the life of the application.</p></ul>
<br></ul>
<b>onoff</b><ul compact><li>If the <b>onoff</b> parameter is zero, the specified flags are cleared;
otherwise they are set.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_flags method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_flags</b>
<p>The DB_ENV-&gt;get_flags method returns the configuration flags.</p>
<p>The DB_ENV-&gt;get_flags method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_flags method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flagsp</b><ul compact><li>The DB_ENV-&gt;get_flags method returns the
configuration flags in <b>flagsp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,113 @@
<!--$Id: env_set_intermediate_dir_mode.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_intermediate_dir_mode</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_intermediate_dir_mode</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_intermediate_dir_mode(DB_ENV *dbenv, const char *mode);
<p>
int
DB_ENV-&gt;get_intermediate_dir_mode(DB_ENV *dbenv, const char **modep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_intermediate_dir_mode</b>
<p>By default, Berkeley DB does not create intermediate directories needed for
recovery, that is, if the file <b>/a/b/c/mydatabase</b> is being
recovered, and the directory path <b>b/c</b> does not exist, recovery
will fail. This default behavior is because Berkeley DB does not know what
permissions are appropriate for intermediate directory creation, and
creating the directory might result in a security problem.</p>
<p>The DB_ENV-&gt;set_intermediate_dir_mode method causes Berkeley DB to create any
intermediate directories needed during recovery, using the specified
permissions.</p>
<p>On UNIX systems or in IEEE/ANSI Std 1003.1 (POSIX) environments, created directories
are owned by the process owner; the group ownership of created
directories is based on the system and directory defaults, and is not
further specified by Berkeley DB.</p>
<p>The database environment's intermediate directory permissions may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_intermediate_dir_mode", one or more whitespace
characters, and the directory permissions.
Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DB_ENV-&gt;set_intermediate_dir_mode method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_intermediate_dir_mode method may not be called after the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is
called.
</p>
<p>The DB_ENV-&gt;set_intermediate_dir_mode method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>mode</b><ul compact><li>The <b>mode</b> parameter specifies the directory permissions.
<p>Directory permissions are interpreted as a string of nine characters,
using the character set <b>r</b> (read), <b>w</b> (write), <b>x</b>
(execute or search), and <b>-</b> (none). The first character is the
read permissions for the directory owner (set to either <b>r</b> or
<b>-</b>). The second character is the write permissions for the
directory owner (set to either <b>w</b> or <b>-</b>). The third
character is the execute permissions for the directory owner (set to
either <b>x</b> or <b>-</b>).</p>
<p>Similarly, the second set of three characters are the read, write and
execute/search permissions for the directory group, and the third set
of three characters are the read, write and execute/search permissions
for all others. For example, the string <b>rwx------</b> would
configure read, write and execute/search access for the owner only. The
string <b>rwxrwx---</b> would configure read, write and execute/search
access for both the owner and the group. The string <b>rwxr-----</b>
would configure read, write and execute/search access for the directory
owner and read-only access for the directory group.</p></ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_intermediate_dir_mode method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_intermediate_dir_mode</b>
<p>The DB_ENV-&gt;get_intermediate_dir_mode method returns the intermediate directory permissions.</p>
<p>The DB_ENV-&gt;get_intermediate_dir_mode method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_intermediate_dir_mode method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>modep</b><ul compact><li>The DB_ENV-&gt;get_intermediate_dir_mode method returns a reference to the
intermediate directory permissions in <b>modep</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,81 @@
<!--$Id: env_set_isalive.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_isalive</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_isalive</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_isalive(DB_ENV *dbenv,
int (*is_alive)(DB_ENV *dbenv, pid_t pid, db_threadid_t tid, u_int32_t flags));
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_isalive</b>
<p>Declare a function that returns if a thread of control (either a true
thread or a process) is still running. The DB_ENV-&gt;set_isalive method
supports the <a href="../api_c/env_failchk.html">DB_ENV-&gt;failchk</a> method. For more information, see
<a href="../ref/cam/app.html">Architecting Data Store and Concurrent
Data Store applications</a>, and <a href="../ref/transapp/app.html">Architecting Transactional Data Store applications</a>.</p>
<p>The DB_ENV-&gt;set_isalive method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_isalive method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;set_isalive method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>is_alive</b><ul compact><li>The <b>is_alive</b> parameter is a function which returns non-zero if
the thread of control, identified by the <b>pid</b> and <b>tid</b>
arguments, is still running. The function takes four arguments:</ul>
<br>
<b><b>dbenv</b></b><ul compact><li>The <b>dbenv</b> parameter is the enclosing database environment
handle, allowing application access to the application-private fields
of that object.</ul>
<b><b>pid</b></b><ul compact><li>The <b>pid</b> parameter is a process ID returned by the function
specified to the <a href="../api_c/env_set_thread_id.html">DB_ENV-&gt;set_thread_id</a> method.</ul>
<b><b>tid</b></b><ul compact><li>The <b>tid</b> parameter is a thread ID returned by the function
specified to the <a href="../api_c/env_set_thread_id.html">DB_ENV-&gt;set_thread_id</a> method.</ul>
<b><b>flags</b></b><ul compact><li>The <b>flags</b> parameter must be set to 0 or
the following value:
<br>
<b><a name="DB_MUTEX_PROCESS_ONLY">DB_MUTEX_PROCESS_ONLY</a></b><ul compact><li>Return only if the process is alive, the thread ID should be ignored.</ul>
<br></ul>
<br>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_isalive method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>
<br><b>See Also</b>
<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,106 @@
<!--$Id: env_set_lg_bsize.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_lg_bsize</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_lg_bsize</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_lg_bsize(DB_ENV *dbenv, u_int32_t lg_bsize);
<p>
int
DB_ENV-&gt;get_lg_bsize(DB_ENV *dbenv, u_int32_t *lg_bsizep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_lg_bsize</b>
<p>Set the size of the in-memory log buffer, in bytes.</p>
<p>When the logging subsystem is configured for on-disk logging, the
default size of the in-memory log buffer is approximately 32KB. Log
information is stored in-memory until the storage space fills up or
transaction commit forces the information to be flushed to stable
storage. In the presence of long-running transactions or transactions
producing large amounts of data, larger buffer sizes can increase
throughput.</p>
<p>When the logging subsystem is configured for in-memory logging, the
default size of the in-memory log buffer is 1MB. Log information is
stored in-memory until the storage space fills up or transaction abort
or commit frees up the memory for new transactions. In the presence of
long-running transactions or transactions producing large amounts of
data, the buffer size must be sufficient to hold all log information
that can accumulate during the longest running transaction. When
choosing log buffer and file sizes for in-memory logs, applications
should ensure the in-memory log buffer size is large enough that no
transaction will ever span the entire buffer, and avoid a state where
the in-memory buffer is full and no space can be freed because a
transaction that started in the first log "file" is still active.</p>
<p>The database environment's log buffer size may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_lg_bsize", one or more whitespace
characters, and the size in bytes.
Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DB_ENV-&gt;set_lg_bsize method configures a database environment, not only operations
performed using the specified <a href="../api_c/env_class.html">DB_ENV</a> handle.</p>
<p>The DB_ENV-&gt;set_lg_bsize method may not be called after the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is
called.
If the database environment already exists when
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> is called, the information specified to DB_ENV-&gt;set_lg_bsize
will be ignored.
</p>
<p>The DB_ENV-&gt;set_lg_bsize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lg_bsize</b><ul compact><li>The <b>lg_bsize</b> parameter is the size of the in-memory log buffer,
in bytes.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_lg_bsize method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_lg_bsize</b>
<p>The DB_ENV-&gt;get_lg_bsize method returns the size of the log buffer, in bytes.</p>
<p>The DB_ENV-&gt;get_lg_bsize method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_lg_bsize method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lg_bsizep</b><ul compact><li>The DB_ENV-&gt;get_lg_bsize method returns the
size of the log buffer, in bytes in <b>lg_bsizep</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/logc_class.html">DB_LOGC</a>, <a href="../api_c/lsn_class.html">DB_LSN</a>
<br><b>See Also</b>
<a href="../api_c/log_list.html">Logging Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,97 @@
<!--$Id: env_set_lg_dir.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_lg_dir</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_lg_dir</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_lg_dir(DB_ENV *dbenv, const char *dir);
<p>
int
DB_ENV-&gt;get_lg_dir(DB_ENV *dbenv, const char **dirp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_lg_dir</b>
<p>The path of a directory to be used as the location of logging files.
Log files created by the Log Manager subsystem will be created in this
directory.</p>
<p>If no logging directory is specified, log files are created in the
environment home directory. See <a href="../ref/env/naming.html">Berkeley DB File Naming</a> for more information.</p>
<p>For the greatest degree of recoverability from system or application
failure, database files and log files should be located on separate
physical devices.</p>
<p>The database environment's logging directory may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_lg_dir", one or more whitespace
characters, and the directory name.
Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DB_ENV-&gt;set_lg_dir method configures operations performed using the specified
<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
database environment.</p>
<p>The DB_ENV-&gt;set_lg_dir method may not be called after the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is
called.
If the database environment already exists when
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> is called, the information specified to DB_ENV-&gt;set_lg_dir
must be consistent with the existing environment or corruption can
occur.</p>
<p>The DB_ENV-&gt;set_lg_dir method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>dir</b><ul compact><li>The <b>dir</b> parameter is the directory used to store the logging files.</ul>
<p>When using a Unicode build on Windows (the default), the <b>dir</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_lg_dir method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_lg_dir</b>
<p>The DB_ENV-&gt;get_lg_dir method returns the log directory.</p>
<p>The DB_ENV-&gt;get_lg_dir method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_lg_dir method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>dirp</b><ul compact><li>The DB_ENV-&gt;get_lg_dir method returns a reference to the
log directory in <b>dirp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/logc_class.html">DB_LOGC</a>, <a href="../api_c/lsn_class.html">DB_LSN</a>
<br><b>See Also</b>
<a href="../api_c/log_list.html">Logging Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,106 @@
<!--$Id: env_set_lg_max.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_lg_max</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_lg_max</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_lg_max(DB_ENV *dbenv, u_int32_t lg_max);
<p>
int
DB_ENV-&gt;get_lg_max(DB_ENV *dbenv, u_int32_t *lg_maxp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_lg_max</b>
<p>Set the maximum size of a single file in the log, in bytes. Because
<a href="../api_c/lsn_class.html">DB_LSN</a> file offsets are unsigned four-byte values, the set
value may not be larger than the maximum unsigned four-byte value.</p>
<p>When the logging subsystem is configured for on-disk logging, the
default size of a log file is 10MB.</p>
<p>When the logging subsystem is configured for in-memory logging, the
default size of a log file is 256KB. In addition, the configured log
buffer size must be larger than the log file size. (The logging
subsystem divides memory configured for in-memory log records into
"files", as database environments configured for in-memory log records
may exchange log records with other members of a replication group, and
those members may be configured to store log records on-disk.) When
choosing log buffer and file sizes for in-memory logs, applications
should ensure the in-memory log buffer size is large enough that no
transaction will ever span the entire buffer, and avoid a state where
the in-memory buffer is full and no space can be freed because a
transaction that started in the first log "file" is still active.</p>
<p>See <a href="../ref/log/limits.html">Log File Limits</a> for more
information.</p>
<p>The database environment's log file size may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_lg_max", one or more whitespace
characters, and the size in bytes.
Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DB_ENV-&gt;set_lg_max method configures a database environment, not only operations
performed using the specified <a href="../api_c/env_class.html">DB_ENV</a> handle.</p>
<p>The DB_ENV-&gt;set_lg_max method may be called at any time during the life of the
application.</p>
If no size is specified by the application, the size last specified for
the database region will be used, or if no database region previously
existed, the default will be used.
<p>The DB_ENV-&gt;set_lg_max method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lg_max</b><ul compact><li>The <b>lg_max</b> parameter is the size of a single log file, in bytes.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_lg_max method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called;
the size of the log file is less than four times the size of the in-memory
log buffer;
The specified log file size was too large; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_lg_max</b>
<p>The DB_ENV-&gt;get_lg_max method returns the maximum log file size.</p>
<p>The DB_ENV-&gt;get_lg_max method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_lg_max method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lg_maxp</b><ul compact><li>The DB_ENV-&gt;get_lg_max method returns the
maximum log file size in <b>lg_maxp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/logc_class.html">DB_LOGC</a>, <a href="../api_c/lsn_class.html">DB_LSN</a>
<br><b>See Also</b>
<a href="../api_c/log_list.html">Logging Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!--$Id: env_set_lg_mode.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_lg_filemode</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_lg_filemode</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_lg_filemode(DB_ENV *dbenv, int lg_mode);
<p>
int
DB_ENV-&gt;get_lg_filemode(DB_ENV *dbenv, int *lg_modep);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_lg_filemode</b>
<p>Set the absolute file mode for created log files. This method is
<b>only</b> useful for the rare Berkeley DB application that does not
control its umask value.</p>
<p>Normally, if Berkeley DB applications set their umask appropriately, all
processes in the application suite will have read permission on the log
files created by any process in the application suite. However, if the
Berkeley DB application is a library, a process using the library might set
its umask to a value preventing other processes in the application suite
from reading the log files it creates. In this rare case, the
DB_ENV-&gt;set_lg_filemode method can be used to set the mode of created
log files to an absolute value.</p>
<p>The database environment's log file mode may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_lg_filemode", one or more whitespace
characters, and the absolute mode of created log files.
Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DB_ENV-&gt;set_lg_filemode method configures a database environment, not only operations
performed using the specified <a href="../api_c/env_class.html">DB_ENV</a> handle.</p>
<p>The DB_ENV-&gt;set_lg_filemode method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;set_lg_filemode method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lg_filemode</b><ul compact><li>The <b>lg_filemode</b> parameter is the absolute mode of the created
log file.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_lg_filemode</b>
<p>The DB_ENV-&gt;set_lg_filemode method returns the log file mode.</p>
<p>The DB_ENV-&gt;set_lg_filemode method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;set_lg_filemode method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lg_modep</b><ul compact><li>The DB_ENV-&gt;set_lg_filemode method returns the
log file mode in <b>lg_modep</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/logc_class.html">DB_LOGC</a>, <a href="../api_c/lsn_class.html">DB_LSN</a>
<br><b>See Also</b>
<a href="../api_c/log_list.html">Logging Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

View File

@@ -0,0 +1,92 @@
<!--$Id: env_set_lg_regionmax.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;set_lg_regionmax</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_ENV-&gt;set_lg_regionmax</b>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;set_lg_regionmax(DB_ENV *dbenv, u_int32_t lg_regionmax);
<p>
int
DB_ENV-&gt;get_lg_regionmax(DB_ENV *dbenv, u_int32_t *lg_regionmaxp);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;set_lg_regionmax</b>
<p>Set the size of the underlying logging area of the Berkeley DB environment,
in bytes. By default, or if the value is set to 0, the default size is
approximately 60KB. The log region is used to store filenames, and so
may need to be increased in size if a large number of files will be
opened and registered with the specified Berkeley DB environment's log
manager.</p>
<p>The database environment's log region size may also be configured using the
environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that
file is a single line with the string "set_lg_regionmax", one or more whitespace
characters, and the size in bytes.
Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DB_ENV-&gt;set_lg_regionmax method configures a database environment, not only operations
performed using the specified <a href="../api_c/env_class.html">DB_ENV</a> handle.</p>
<p>The DB_ENV-&gt;set_lg_regionmax method may not be called after the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is
called.
If the database environment already exists when
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a> is called, the information specified to DB_ENV-&gt;set_lg_regionmax
will be ignored.
</p>
<p>The DB_ENV-&gt;set_lg_regionmax method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lg_regionmax</b><ul compact><li>The <b>lg_regionmax</b> parameter is the size of the logging area in
the Berkeley DB environment, in bytes.</ul>
<br>
<br><b>Errors</b>
<p>The DB_ENV-&gt;set_lg_regionmax method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called; or if an
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DB_ENV-&gt;get_lg_regionmax</b>
<p>The DB_ENV-&gt;get_lg_regionmax method returns the size of the underlying logging subsystem region.</p>
<p>The DB_ENV-&gt;get_lg_regionmax method may be called at any time during the life of the
application.</p>
<p>The DB_ENV-&gt;get_lg_regionmax method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>lg_regionmaxp</b><ul compact><li>The DB_ENV-&gt;get_lg_regionmax method returns the
size of the underlying logging subsystem region in <b>lg_regionmaxp</b>.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/logc_class.html">DB_LOGC</a>, <a href="../api_c/lsn_class.html">DB_LSN</a>
<br><b>See Also</b>
<a href="../api_c/log_list.html">Logging Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More