Import BSDDB 4.7.25 (as of svn r89086)
This commit is contained in:
225
docs/api_cxx/api_core.html
Normal file
225
docs/api_cxx/api_core.html
Normal 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_cxx/db_class.html">Db</a></td><td>Create a database handle</td></tr>
|
||||
<!--Db::associate--><tr><td><a href="../api_cxx/db_associate.html">Db::associate</a></td><td>Associate a secondary index</td></tr>
|
||||
<!--Db::close--><tr><td><a href="../api_cxx/db_close.html">Db::close</a></td><td>Close a database</td></tr>
|
||||
<!--Db::compact--><tr><td><a href="../api_cxx/db_compact.html">Db::compact</a></td><td>Compact a database</td></tr>
|
||||
<!--Db::cursor--><tr><td><a href="../api_cxx/db_cursor.html">Db::cursor</a></td><td>Create a cursor</td></tr>
|
||||
<!--Db::del--><tr><td><a href="../api_cxx/db_del.html">Db::del</a></td><td>Delete items from a database</td></tr>
|
||||
<!--Db::err--><tr><td><a href="../api_cxx/db_err.html">Db::err</a>, <a href="../api_cxx/db_err.html">Db::errx</a></td><td>Error message</td></tr>
|
||||
<!--Db::exists--><tr><td><a href="../api_cxx/db_exists.html">Db::exists</a></td><td>Return if an item appears in a database</td></tr>
|
||||
<!--Db::fd--><tr><td><a href="../api_cxx/db_fd.html">Db::fd</a></td><td>Return a file descriptor from a database</td></tr>
|
||||
<!--Db::get--><tr><td><a href="../api_cxx/db_get.html">Db::get</a>, <a href="../api_cxx/db_get.html">Db::pget</a></td><td>Get items from a database</td></tr>
|
||||
<!--Db::get_byteswapped--><tr><td><a href="../api_cxx/db_get_byteswapped.html">Db::get_byteswapped</a></td><td>Return if the underlying database is in host order</td></tr>
|
||||
<!--Db::get_env--><tr><td><a href="../api_cxx/db_getenv.html">Db::getenv</a></td><td>Return <a href="../api_cxx/db_class.html">Db</a>'s underlying <a href="../api_cxx/env_class.html">DbEnv</a> handle</td></tr>
|
||||
<!--Db::get_type--><tr><td><a href="../api_cxx/db_get_type.html">Db::get_type</a></td><td>Return the database type</td></tr>
|
||||
<!--Db::join--><tr><td><a href="../api_cxx/db_join.html">Db::join</a></td><td>Perform a database join on cursors</td></tr>
|
||||
<!--Db::key_range--><tr><td><a href="../api_cxx/db_key_range.html">Db::key_range</a></td><td>Return estimate of key location</td></tr>
|
||||
<!--Db::mpf--><tr><td><a href="../api_cxx/db_get_mpf.html">Db::get_mpf</a></td><td>Return <a href="../api_cxx/db_class.html">Db</a>'s underlying <a href="../api_cxx/mempfile_class.html">DbMpoolFile</a> handle</td></tr>
|
||||
<!--Db::open--><tr><td><a href="../api_cxx/db_open.html">Db::open</a></td><td>Open a database</td></tr>
|
||||
<!--Db::put--><tr><td><a href="../api_cxx/db_put.html">Db::put</a></td><td>Store items into a database</td></tr>
|
||||
<!--Db::remove--><tr><td><a href="../api_cxx/db_remove.html">Db::remove</a></td><td>Remove a database</td></tr>
|
||||
<!--Db::rename--><tr><td><a href="../api_cxx/db_rename.html">Db::rename</a></td><td>Rename a database</td></tr>
|
||||
<!--Db::set_alloc--><tr><td><a href="../api_cxx/db_set_alloc.html">Db::set_alloc</a></td><td>Set local space allocation functions</td></tr>
|
||||
<!--Db::set_append_recno--><tr><td><a href="../api_cxx/db_set_append_recno.html">Db::set_append_recno</a></td><td>Set record append callback</td></tr>
|
||||
<!--Db::set_bt_compare--><tr><td><a href="../api_cxx/db_set_bt_compare.html">Db::set_bt_compare</a></td><td>Set a Btree comparison function</td></tr>
|
||||
<!--Db::set_bt_minkey--><tr><td><a href="../api_cxx/db_set_bt_minkey.html">Db::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_cxx/db_set_bt_prefix.html">Db::set_bt_prefix</a></td><td>Set a Btree prefix comparison function</td></tr>
|
||||
<!--Db::set_cachesize--><tr><td><a href="../api_cxx/db_set_cachesize.html">Db::set_cachesize</a></td><td>Set the database cache size</td></tr>
|
||||
<!--Db::set_dup_compare--><tr><td><a href="../api_cxx/db_set_dup_compare.html">Db::set_dup_compare</a></td><td>Set a duplicate comparison function</td></tr>
|
||||
<!--Db::set_encrypt--><tr><td><a href="../api_cxx/db_set_encrypt.html">Db::set_encrypt</a></td><td>Set the database cryptographic key</td></tr>
|
||||
<!--Db::set_errcall--><tr><td><a href="../api_cxx/db_set_errcall.html">Db::set_errcall</a>, <a href="../api_cxx/db_set_msgcall.html">Db::set_msgcall</a></td><td>Set error and informational message callback</td></tr>
|
||||
<!--Db::set_errfile--><tr><td><a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a>, <a href="../api_cxx/db_set_msgfile.html">Db::set_msgfile</a></td><td>Set error and informational message FILE</td></tr>
|
||||
<!--Db::set_error_stream--><tr><td><a href="../api_cxx/db_set_error_stream.html">Db::set_error_stream</a>, <a href="../api_cxx/db_set_msg_stream.html">Db::set_message_stream</a></td><td>Set error and informational message output stream</td></tr>
|
||||
<!--Db::set_errpfx--><tr><td><a href="../api_cxx/db_set_errpfx.html">Db::set_errpfx</a></td><td>Set error message prefix</td></tr>
|
||||
<!--Db::set_feedback--><tr><td><a href="../api_cxx/db_set_feedback.html">Db::set_feedback</a></td><td>Set feedback callback</td></tr>
|
||||
<!--Db::set_flags--><tr><td><a href="../api_cxx/db_set_flags.html">Db::set_flags</a></td><td>General database configuration</td></tr>
|
||||
<!--Db::set_h_compare--><tr><td><a href="../api_cxx/db_set_h_compare.html">Db::set_h_compare</a></td><td>Set a Hash comparison function</td></tr>
|
||||
<!--Db::set_h_ffactor--><tr><td><a href="../api_cxx/db_set_h_ffactor.html">Db::set_h_ffactor</a></td><td>Set the Hash table density</td></tr>
|
||||
<!--Db::set_h_hash--><tr><td><a href="../api_cxx/db_set_h_hash.html">Db::set_h_hash</a></td><td>Set a hashing function</td></tr>
|
||||
<!--Db::set_h_nelem--><tr><td><a href="../api_cxx/db_set_h_nelem.html">Db::set_h_nelem</a></td><td>Set the Hash table size</td></tr>
|
||||
<!--Db::set_lorder--><tr><td><a href="../api_cxx/db_set_lorder.html">Db::set_lorder</a></td><td>Set the database byte order</td></tr>
|
||||
<!--Db::set_pagesize--><tr><td><a href="../api_cxx/db_set_pagesize.html">Db::set_pagesize</a></td><td>Set the underlying database page size</td></tr>
|
||||
<!--Db::set_priority--><tr><td><a href="../api_cxx/db_set_priority.html">Db::set_priority</a></td><td>Set cache page priority</td></tr>
|
||||
<!--Db::set_q_extentsize--><tr><td><a href="../api_cxx/db_set_q_extentsize.html">Db::set_q_extentsize</a></td><td>Set Queue database extent size</td></tr>
|
||||
<!--Db::set_re_delim--><tr><td><a href="../api_cxx/db_set_re_delim.html">Db::set_re_delim</a></td><td>Set the variable-length record delimiter</td></tr>
|
||||
<!--Db::set_re_len--><tr><td><a href="../api_cxx/db_set_re_len.html">Db::set_re_len</a></td><td>Set the fixed-length record length</td></tr>
|
||||
<!--Db::set_re_pad--><tr><td><a href="../api_cxx/db_set_re_pad.html">Db::set_re_pad</a></td><td>Set the fixed-length record pad byte</td></tr>
|
||||
<!--Db::set_re_source--><tr><td><a href="../api_cxx/db_set_re_source.html">Db::set_re_source</a></td><td>Set the backing Recno text file</td></tr>
|
||||
<!--Db::stat--><tr><td><a href="../api_cxx/db_stat.html">Db::stat</a>, <a href="../api_cxx/db_stat.html">Db::stat_print</a></td><td>Database statistics</td></tr>
|
||||
<!--Db::sync--><tr><td><a href="../api_cxx/db_sync.html">Db::sync</a></td><td>Flush a database to stable storage</td></tr>
|
||||
<!--Db::truncate--><tr><td><a href="../api_cxx/db_truncate.html">Db::truncate</a></td><td>Empty a database</td></tr>
|
||||
<!--Db::upgrade--><tr><td><a href="../api_cxx/db_upgrade.html">Db::upgrade</a></td><td>Upgrade a database</td></tr>
|
||||
<!--Db::verify--><tr><td><a href="../api_cxx/db_verify.html">Db::verify</a></td><td>Verify/salvage a database</td></tr>
|
||||
<!--DbCursor::close--><tr><td><a href="../api_cxx/dbc_close.html">Dbc::close</a></td><td>Close a cursor</td></tr>
|
||||
<!--DbCursor::count--><tr><td><a href="../api_cxx/dbc_count.html">Dbc::count</a></td><td>Return count of duplicates</td></tr>
|
||||
<!--DbCursor::del--><tr><td><a href="../api_cxx/dbc_del.html">Dbc::del</a></td><td>Delete by cursor</td></tr>
|
||||
<!--DbCursor::dup--><tr><td><a href="../api_cxx/dbc_dup.html">Dbc::dup</a></td><td>Duplicate a cursor</td></tr>
|
||||
<!--DbCursor::get--><tr><td><a href="../api_cxx/dbc_get.html">Dbc::get</a>, <a href="../api_cxx/dbc_get.html">Dbc::pget</a></td><td>Retrieve by cursor</td></tr>
|
||||
<!--DbCursor::put--><tr><td><a href="../api_cxx/dbc_put.html">Dbc::put</a></td><td>Store by cursor</td></tr>
|
||||
<!--DbCursor::set_priority--><tr><td><a href="../api_cxx/dbc_set_priority.html">Dbc::set_priority</a></td><td>Set the cursor's cache priority</td></tr>
|
||||
<!--DbDeadlockException--><tr><td><a href="../api_cxx/deadlock_class.html">DbDeadlockException</a></td><td>Deadlock exception</td></tr>
|
||||
<!--DbEnv::--><tr><td><a href="../api_cxx/env_class.html">DbEnv</a></td><td>Create an environment handle</td></tr>
|
||||
<!--DbEnv::cdsgroup_begin--><tr><td><a href="../api_cxx/env_cdsgroup_begin.html">DbEnv::cdsgroup_begin</a></td><td>Get a locker ID in Berkeley DB Concurrent Data Store</td></tr>
|
||||
<!--DbEnv::close--><tr><td><a href="../api_cxx/env_close.html">DbEnv::close</a></td><td>Close an environment</td></tr>
|
||||
<!--DbEnv::dbremove--><tr><td><a href="../api_cxx/env_dbremove.html">DbEnv::dbremove</a></td><td>Remove a database</td></tr>
|
||||
<!--DbEnv::dbrename--><tr><td><a href="../api_cxx/env_dbrename.html">DbEnv::dbrename</a></td><td>Rename a database</td></tr>
|
||||
<!--DbEnv::err--><tr><td><a href="../api_cxx/env_err.html">DbEnv::err</a>, <a href="../api_cxx/env_err.html">DbEnv::errx</a></td><td>Error message</td></tr>
|
||||
<!--DbEnv::failchk--><tr><td><a href="../api_cxx/env_failchk.html">DbEnv::failchk</a></td><td>Check for thread failure</td></tr>
|
||||
<!--DbEnv::fileid_reset--><tr><td><a href="../api_cxx/env_fileid_reset.html">DbEnv::fileid_reset</a></td><td>Reset database file IDs</td></tr>
|
||||
<!--DbEnv::get_home--><tr><td><a href="../api_cxx/env_open.html">DbEnv::get_home</a></td><td>Return environment's home directory</td></tr>
|
||||
<!--DbEnv::get_open_flags--><tr><td><a href="../api_cxx/env_open.html">DbEnv::get_open_flags</a></td><td>Return flags with which the environment was opened</td></tr>
|
||||
<!--DbEnv::lock_detect--><tr><td><a href="../api_cxx/lock_detect.html">DbEnv::lock_detect</a></td><td>Perform deadlock detection</td></tr>
|
||||
<!--DbEnv::lock_get--><tr><td><a href="../api_cxx/lock_get.html">DbEnv::lock_get</a></td><td>Acquire a lock</td></tr>
|
||||
<!--DbEnv::lock_id--><tr><td><a href="../api_cxx/lock_id.html">DbEnv::lock_id</a></td><td>Acquire a locker ID</td></tr>
|
||||
<!--DbEnv::lock_id_free--><tr><td><a href="../api_cxx/lock_id_free.html">DbEnv::lock_id_free</a></td><td>Release a locker ID</td></tr>
|
||||
<!--DbEnv::lock_put--><tr><td><a href="../api_cxx/lock_put.html">DbEnv::lock_put</a></td><td>Release a lock</td></tr>
|
||||
<!--DbEnv::lock_stat--><tr><td><a href="../api_cxx/lock_stat.html">DbEnv::lock_stat</a></td><td>Return lock subsystem statistics</td></tr>
|
||||
<!--DbEnv::lock_vec--><tr><td><a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a></td><td>Acquire/release locks</td></tr>
|
||||
<!--DbEnv::log_archive--><tr><td><a href="../api_cxx/log_archive.html">DbEnv::log_archive</a></td><td>List log and database files</td></tr>
|
||||
<!--DbEnv::log_file--><tr><td><a href="../api_cxx/log_file.html">DbEnv::log_file</a></td><td>Map Log Sequence Numbers to log files</td></tr>
|
||||
<!--DbEnv::log_flush--><tr><td><a href="../api_cxx/log_flush.html">DbEnv::log_flush</a></td><td>Flush log records</td></tr>
|
||||
<!--DbEnv::log_printf--><tr><td><a href="../api_cxx/log_printf.html">DbEnv::log_printf</a></td><td>Append informational message to the log</td></tr>
|
||||
<!--DbEnv::log_put--><tr><td><a href="../api_cxx/log_put.html">DbEnv::log_put</a></td><td>Write a log record</td></tr>
|
||||
<!--DbEnv::log_set_config--><tr><td><a href="../api_cxx/env_log_set_config.html">DbEnv::log_set_config</a></td><td>Configure the logging subsystem</td></tr>
|
||||
<!--DbEnv::log_stat--><tr><td><a href="../api_cxx/log_stat.html">DbEnv::log_stat</a></td><td>Return log subsystem statistics</td></tr>
|
||||
<!--DbEnv::lsn_reset--><tr><td><a href="../api_cxx/env_lsn_reset.html">DbEnv::lsn_reset</a></td><td>Reset database file LSNs</td></tr>
|
||||
<!--DbEnv::memp_fcreate--><tr><td><a href="../api_cxx/memp_fcreate.html">DbEnv::memp_fcreate</a></td><td>Create a memory pool file handle</td></tr>
|
||||
<!--DbEnv::memp_register--><tr><td><a href="../api_cxx/memp_register.html">DbEnv::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_cxx/memp_stat.html">DbEnv::memp_stat</a></td><td>Return memory pool statistics</td></tr>
|
||||
<!--DbEnv::memp_sync--><tr><td><a href="../api_cxx/memp_sync.html">DbEnv::memp_sync</a></td><td>Flush pages from a memory pool</td></tr>
|
||||
<!--DbEnv::memp_trickle--><tr><td><a href="../api_cxx/memp_trickle.html">DbEnv::memp_trickle</a></td><td>Trickle flush pages from a memory pool</td></tr>
|
||||
<!--DbEnv::mutex_alloc--><tr><td><a href="../api_cxx/mutex_alloc.html">DbEnv::mutex_alloc</a></td><td>Allocate a mutex</td></tr>
|
||||
<!--DbEnv::mutex_free--><tr><td><a href="../api_cxx/mutex_free.html">DbEnv::mutex_free</a></td><td>Free a mutex</td></tr>
|
||||
<!--DbEnv::mutex_lock--><tr><td><a href="../api_cxx/mutex_lock.html">DbEnv::mutex_lock</a></td><td>Lock a mutex</td></tr>
|
||||
<!--DbEnv::mutex_set_align--><tr><td><a href="../api_cxx/mutex_set_align.html">DbEnv::mutex_set_align</a></td><td>Configure mutex alignment</td></tr>
|
||||
<!--DbEnv::mutex_set_increment--><tr><td><a href="../api_cxx/mutex_set_max.html">DbEnv::mutex_set_increment</a></td><td>Configure number of additional mutexes</td></tr>
|
||||
<!--DbEnv::mutex_set_max--><tr><td><a href="../api_cxx/mutex_set_max.html">DbEnv::mutex_set_max</a></td><td>Configure total number of mutexes</td></tr>
|
||||
<!--DbEnv::mutex_set_tas_spins--><tr><td><a href="../api_cxx/mutex_set_tas_spins.html">DbEnv::mutex_set_tas_spins</a></td><td>Configure test-and-set mutex spin count</td></tr>
|
||||
<!--DbEnv::mutex_stat--><tr><td><a href="../api_cxx/mutex_stat.html">DbEnv::mutex_stat</a></td><td>Mutex statistics</td></tr>
|
||||
<!--DbEnv::mutex_unlock--><tr><td><a href="../api_cxx/mutex_unlock.html">DbEnv::mutex_unlock</a></td><td>Unlock a mutex</td></tr>
|
||||
<!--DbEnv::open--><tr><td><a href="../api_cxx/env_open.html">DbEnv::open</a></td><td>Open an environment</td></tr>
|
||||
<!--DbEnv::remove--><tr><td><a href="../api_cxx/env_remove.html">DbEnv::remove</a></td><td>Remove an environment</td></tr>
|
||||
<!--DbEnv::rep_elect--><tr><td><a href="../api_cxx/rep_elect.html">DbEnv::rep_elect</a></td><td>Hold a replication election</td></tr>
|
||||
<!--DbEnv::rep_process_message--><tr><td><a href="../api_cxx/rep_message.html">DbEnv::rep_process_message</a></td><td>Process a replication message</td></tr>
|
||||
<!--DbEnv::rep_set_clockskew--><tr><td><a href="../api_cxx/rep_clockskew.html">DbEnv::rep_set_clockskew</a></td><td>Configure master lease clock adjustment</td></tr>
|
||||
<!--DbEnv::rep_set_config--><tr><td><a href="../api_cxx/rep_config.html">DbEnv::rep_set_config</a></td><td>Configure the replication subsystem</td></tr>
|
||||
<!--DbEnv::rep_set_limit--><tr><td><a href="../api_cxx/rep_limit.html">DbEnv::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_cxx/rep_nsites.html">DbEnv::rep_set_nsites</a></td><td>Configure replication group site count</td></tr>
|
||||
<!--DbEnv::rep_set_priority--><tr><td><a href="../api_cxx/rep_priority.html">DbEnv::rep_set_priority</a></td><td>Configure replication site priority</td></tr>
|
||||
<!--DbEnv::rep_set_request--><tr><td><a href="../api_cxx/rep_request.html">DbEnv::rep_set_request</a></td><td>Configure replication client retransmission requests</td></tr>
|
||||
<!--DbEnv::rep_set_timeout--><tr><td><a href="../api_cxx/rep_timeout.html">DbEnv::rep_set_timeout</a></td><td>Configure replication timeouts</td></tr>
|
||||
<!--DbEnv::rep_set_transport--><tr><td><a href="../api_cxx/rep_transport.html">DbEnv::rep_set_transport</a></td><td>Configure replication transport callback</td></tr>
|
||||
<!--DbEnv::rep_start--><tr><td><a href="../api_cxx/rep_start.html">DbEnv::rep_start</a></td><td>Configure an environment for replication</td></tr>
|
||||
<!--DbEnv::rep_stat--><tr><td><a href="../api_cxx/rep_stat.html">DbEnv::rep_stat</a></td><td>Replication statistics</td></tr>
|
||||
<!--DbEnv::rep_sync--><tr><td><a href="../api_cxx/rep_sync.html">DbEnv::rep_sync</a></td><td>Replication synchronization</td></tr>
|
||||
<!--DbEnv::repmgr_add_remote_site--><tr><td><a href="../api_cxx/repmgr_remote_site.html">DbEnv::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_cxx/repmgr_ack_policy.html">DbEnv::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_cxx/repmgr_local_site.html">DbEnv::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_cxx/repmgr_site_list.html">DbEnv::repmgr_site_list</a></td><td>List the sites and their status</td></tr>
|
||||
<!--DbEnv::repmgr_start--><tr><td><a href="../api_cxx/repmgr_start.html">DbEnv::repmgr_start</a></td><td>Start the replication manager</td></tr>
|
||||
<!--DbEnv::repmgr_stat--><tr><td><a href="../api_cxx/repmgr_stat.html">DbEnv::repmgr_stat</a></td><td>Replication manager statistics</td></tr>
|
||||
<!--DbEnv::set_alloc--><tr><td><a href="../api_cxx/env_set_alloc.html">DbEnv::set_alloc</a></td><td>Set local space allocation functions</td></tr>
|
||||
<!--DbEnv::set_app_dispatch--><tr><td><a href="../api_cxx/env_set_app_dispatch.html">DbEnv::set_app_dispatch</a></td><td>Configure application recovery</td></tr>
|
||||
<!--DbEnv::set_cache_max--><tr><td><a href="../api_cxx/env_set_cache_max.html">DbEnv::set_cache_max</a></td><td>Set the maximum cache size</td></tr>
|
||||
<!--DbEnv::set_cachesize--><tr><td><a href="../api_cxx/env_set_cachesize.html">DbEnv::set_cachesize</a></td><td>Set the environment cache size</td></tr>
|
||||
<!--DbEnv::set_data_dir--><tr><td><a href="../api_cxx/env_set_data_dir.html">DbEnv::set_data_dir</a></td><td>Set the environment data directory</td></tr>
|
||||
<!--DbEnv::set_encrypt--><tr><td><a href="../api_cxx/env_set_encrypt.html">DbEnv::set_encrypt</a></td><td>Set the environment cryptographic key</td></tr>
|
||||
<!--DbEnv::set_errcall--><tr><td><a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a>, <a href="../api_cxx/env_set_msgcall.html">DbEnv::set_msgcall</a></td><td>Set error and informational message callbacks</td></tr>
|
||||
<!--DbEnv::set_errfile--><tr><td><a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a>, <a href="../api_cxx/env_set_msgfile.html">DbEnv::set_msgfile</a></td><td>Set error and informational message FILE</td></tr>
|
||||
<!--DbEnv::set_error_stream--><tr><td><a href="../api_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a>, <a href="../api_cxx/env_set_msg_stream.html">DbEnv::set_message_stream</a></td><td>Set error and informational message output stream</td></tr>
|
||||
<!--DbEnv::set_errpfx--><tr><td><a href="../api_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a></td><td>Set error message prefix</td></tr>
|
||||
<!--DbEnv::set_event_notify--><tr><td><a href="../api_cxx/env_event_notify.html">DbEnv::set_event_notify</a></td><td>Set event notification callback</td></tr>
|
||||
<!--DbEnv::set_feedback--><tr><td><a href="../api_cxx/env_set_feedback.html">DbEnv::set_feedback</a></td><td>Set feedback callback</td></tr>
|
||||
<!--DbEnv::set_flags--><tr><td><a href="../api_cxx/env_set_flags.html">DbEnv::set_flags</a></td><td>Environment configuration</td></tr>
|
||||
<!--DbEnv::set_intermediate_dir_mode--><tr><td><a href="../api_cxx/env_set_intermediate_dir_mode.html">DbEnv::set_intermediate_dir_mode</a></td><td>Set intermediate directory creation mode</td></tr>
|
||||
<!--DbEnv::set_isalive--><tr><td><a href="../api_cxx/env_set_isalive.html">DbEnv::set_isalive</a></td><td>Set thread is-alive callback</td></tr>
|
||||
<!--DbEnv::set_lg_bsize--><tr><td><a href="../api_cxx/env_set_lg_bsize.html">DbEnv::set_lg_bsize</a></td><td>Set log buffer size</td></tr>
|
||||
<!--DbEnv::set_lg_dir--><tr><td><a href="../api_cxx/env_set_lg_dir.html">DbEnv::set_lg_dir</a></td><td>Set the environment logging directory</td></tr>
|
||||
<!--DbEnv::set_lg_filemode--><tr><td><a href="../api_cxx/env_set_lg_mode.html">DbEnv::set_lg_filemode</a></td><td>Set log file mode</td></tr>
|
||||
<!--DbEnv::set_lg_max--><tr><td><a href="../api_cxx/env_set_lg_max.html">DbEnv::set_lg_max</a></td><td>Set log file size</td></tr>
|
||||
<!--DbEnv::set_lg_regionmax--><tr><td><a href="../api_cxx/env_set_lg_regionmax.html">DbEnv::set_lg_regionmax</a></td><td>Set logging region size</td></tr>
|
||||
<!--DbEnv::set_lk_conflicts--><tr><td><a href="../api_cxx/env_set_lk_conflicts.html">DbEnv::set_lk_conflicts</a></td><td>Set lock conflicts matrix</td></tr>
|
||||
<!--DbEnv::set_lk_max_detect--><tr><td><a href="../api_cxx/env_set_lk_detect.html">DbEnv::set_lk_detect</a></td><td>Set automatic deadlock detection</td></tr>
|
||||
<!--DbEnv::set_lk_max_lockers--><tr><td><a href="../api_cxx/env_set_lk_max_lockers.html">DbEnv::set_lk_max_lockers</a></td><td>Set maximum number of lockers</td></tr>
|
||||
<!--DbEnv::set_lk_max_locks--><tr><td><a href="../api_cxx/env_set_lk_max_locks.html">DbEnv::set_lk_max_locks</a></td><td>Set maximum number of locks</td></tr>
|
||||
<!--DbEnv::set_lk_max_objects--><tr><td><a href="../api_cxx/env_set_lk_max_objects.html">DbEnv::set_lk_max_objects</a></td><td>Set maximum number of lock objects</td></tr>
|
||||
<!--DbEnv::set_lk_partitions--><tr><td><a href="../api_cxx/env_set_lk_partitions.html">DbEnv::set_lk_partitions</a></td><td>Set number of lock partitions</td></tr>
|
||||
<!--DbEnv::set_mp_max_openfd--><tr><td><a href="../api_cxx/memp_openfd.html">DbEnv::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_cxx/memp_maxwrite.html">DbEnv::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_cxx/env_set_mp_mmapsize.html">DbEnv::set_mp_mmapsize</a></td><td>Set maximum mapped-in database file size</td></tr>
|
||||
<!--DbEnv::set_rpc_server--><tr><td><a href="../api_cxx/env_set_rpc_server.html">DbEnv::set_rpc_server</a></td><td>Establish an RPC server connection</td></tr>
|
||||
<!--DbEnv::set_shm_key--><tr><td><a href="../api_cxx/env_set_shm_key.html">DbEnv::set_shm_key</a></td><td>Set system memory shared segment ID</td></tr>
|
||||
<!--DbEnv::set_thread_count--><tr><td><a href="../api_cxx/env_set_thread_count.html">DbEnv::set_thread_count</a></td><td>Set approximate thread count</td></tr>
|
||||
<!--DbEnv::set_thread_id--><tr><td><a href="../api_cxx/env_set_thread_id.html">DbEnv::set_thread_id</a></td><td>Set thread of control ID function</td></tr>
|
||||
<!--DbEnv::set_thread_id_string--><tr><td><a href="../api_cxx/env_set_thread_id_string.html">DbEnv::set_thread_id_string</a></td><td>Set thread of control ID format function</td></tr>
|
||||
<!--DbEnv::set_timeout--><tr><td><a href="../api_cxx/env_set_timeout.html">DbEnv::set_timeout</a></td><td>Set lock and transaction timeout</td></tr>
|
||||
<!--DbEnv::set_tmp_dir--><tr><td><a href="../api_cxx/env_set_tmp_dir.html">DbEnv::set_tmp_dir</a></td><td>Set the environment temporary file directory</td></tr>
|
||||
<!--DbEnv::set_tx_max--><tr><td><a href="../api_cxx/env_set_tx_max.html">DbEnv::set_tx_max</a></td><td>Set maximum number of transactions</td></tr>
|
||||
<!--DbEnv::set_tx_timestamp--><tr><td><a href="../api_cxx/env_set_tx_timestamp.html">DbEnv::set_tx_timestamp</a></td><td>Set recovery timestamp</td></tr>
|
||||
<!--DbEnv::set_verbose--><tr><td><a href="../api_cxx/env_set_verbose.html">DbEnv::set_verbose</a></td><td>Set verbose messages</td></tr>
|
||||
<!--DbEnv::stat_print--><tr><td><a href="../api_cxx/env_stat.html">DbEnv::stat_print</a></td><td>Environment statistics</td></tr>
|
||||
<!--DbEnv::txn_begin--><tr><td><a href="../api_cxx/txn_begin.html">DbEnv::txn_begin</a></td><td>Begin a transaction</td></tr>
|
||||
<!--DbEnv::txn_checkpoint--><tr><td><a href="../api_cxx/txn_checkpoint.html">DbEnv::txn_checkpoint</a></td><td>Checkpoint the transaction subsystem</td></tr>
|
||||
<!--DbEnv::txn_recover--><tr><td><a href="../api_cxx/txn_recover.html">DbEnv::txn_recover</a></td><td>Distributed transaction recovery</td></tr>
|
||||
<!--DbEnv::txn_stat--><tr><td><a href="../api_cxx/txn_stat.html">DbEnv::txn_stat</a></td><td>Return transaction subsystem statistics</td></tr>
|
||||
<!--DbLockNotGrantedException--><tr><td><a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a></td><td>Lock-not-granted exception</td></tr>
|
||||
<!--DbLock--><tr><td><a href="../api_cxx/lock_class.html">DbLock</a></td><td>Lock object</td></tr>
|
||||
<!--DbLogc::--><tr><td><a href="../api_cxx/logc_class.html">DbLogc</a></td><td>Log Cursor Object</td></tr>
|
||||
<!--DbLogc::--><tr><td><a href="../api_cxx/log_cursor.html">DbEnv::log_cursor</a></td><td>Create a log cursor handle</td></tr>
|
||||
<!--DbLogc::close--><tr><td><a href="../api_cxx/logc_close.html">DbLogc::close</a></td><td>Close a log cursor</td></tr>
|
||||
<!--DbLogc::get--><tr><td><a href="../api_cxx/logc_get.html">DbLogc::get</a></td><td>Retrieve a log record</td></tr>
|
||||
<!--DbLsn--><tr><td><a href="../api_cxx/lsn_class.html">DbLsn</a></td><td>Log Sequence Numbers</td></tr>
|
||||
<!--DbMemoryException--><tr><td><a href="../api_cxx/memp_class.html">DbMemoryException</a></td><td>Insufficient memory exception</td></tr>
|
||||
<!--DbMpoolFile::--><tr><td><a href="../api_cxx/mempfile_class.html">DbMpoolFile</a></td><td>Memory pool file object</td></tr>
|
||||
<!--DbMpoolFile::close--><tr><td><a href="../api_cxx/memp_fclose.html">DbMpoolFile::close</a></td><td>Close a file in a memory pool</td></tr>
|
||||
<!--DbMpoolFile::get--><tr><td><a href="../api_cxx/memp_fget.html">DbMpoolFile::get</a></td><td>Get page from a file in a memory pool</td></tr>
|
||||
<!--DbMpoolFile::open--><tr><td><a href="../api_cxx/memp_fopen.html">DbMpoolFile::open</a></td><td>Open a file in a memory pool</td></tr>
|
||||
<!--DbMpoolFile::put--><tr><td><a href="../api_cxx/memp_fput.html">DbMpoolFile::put</a></td><td>Return a page to a memory pool</td></tr>
|
||||
<!--DbMpoolFile::set_clear_len--><tr><td><a href="../api_cxx/memp_set_clear_len.html">DbMpoolFile::set_clear_len</a></td><td>Set file page bytes to be cleared</td></tr>
|
||||
<!--DbMpoolFile::set_fileid--><tr><td><a href="../api_cxx/memp_set_fileid.html">DbMpoolFile::set_fileid</a></td><td>Set file unique identifier</td></tr>
|
||||
<!--DbMpoolFile::set_flags--><tr><td><a href="../api_cxx/memp_set_flags.html">DbMpoolFile::set_flags</a></td><td>General memory pool file configuration</td></tr>
|
||||
<!--DbMpoolFile::set_ftype--><tr><td><a href="../api_cxx/memp_set_ftype.html">DbMpoolFile::set_ftype</a></td><td>Set file type</td></tr>
|
||||
<!--DbMpoolFile::set_lsn_offset--><tr><td><a href="../api_cxx/memp_set_lsn_offset.html">DbMpoolFile::set_lsn_offset</a></td><td>Set file log-sequence-number offset</td></tr>
|
||||
<!--DbMpoolFile::set_maxsize--><tr><td><a href="../api_cxx/memp_set_maxsize.html">DbMpoolFile::set_maxsize</a></td><td>Set maximum file size</td></tr>
|
||||
<!--DbMpoolFile::set_pgcookie--><tr><td><a href="../api_cxx/memp_set_pgcookie.html">DbMpoolFile::set_pgcookie</a></td><td>Set file cookie for pgin/pgout</td></tr>
|
||||
<!--DbMpoolFile::set_priority--><tr><td><a href="../api_cxx/memp_set_priority.html">DbMpoolFile::set_priority</a></td><td>Set memory pool file priority</td></tr>
|
||||
<!--DbMpoolFile::sync--><tr><td><a href="../api_cxx/memp_fsync.html">DbMpoolFile::sync</a></td><td>Flush pages from a file in a memory pool</td></tr>
|
||||
<!--DbSequence::--><tr><td><a href="../api_cxx/seq_class.html">DbSequence</a></td><td>Create a sequence handle</td></tr>
|
||||
<!--DbSequence::close--><tr><td><a href="../api_cxx/seq_close.html">DbSequence::close</a></td><td>Close a sequence</td></tr>
|
||||
<!--DbSequence::get--><tr><td><a href="../api_cxx/seq_get.html">DbSequence::get</a></td><td>Get the next sequence element(s)</td></tr>
|
||||
<!--DbSequence::get_dbp--><tr><td><a href="../api_cxx/seq_open.html">DbSequence::get_dbp</a></td><td>Return a handle for the underlying sequence database</td></tr>
|
||||
<!--DbSequence::get_key--><tr><td><a href="../api_cxx/seq_open.html">DbSequence::get_key</a></td><td>Return the key for a sequence</td></tr>
|
||||
<!--DbSequence::initial_value--><tr><td><a href="../api_cxx/seq_initial_value.html">DbSequence::initial_value</a></td><td>Set the initial value of a sequence</td></tr>
|
||||
<!--DbSequence::open--><tr><td><a href="../api_cxx/seq_open.html">DbSequence::open</a></td><td>Open a sequence</td></tr>
|
||||
<!--DbSequence::remove--><tr><td><a href="../api_cxx/seq_remove.html">DbSequence::remove</a></td><td>Remove a sequence</td></tr>
|
||||
<!--DbSequence::set_cachesize--><tr><td><a href="../api_cxx/seq_set_cachesize.html">DbSequence::set_cachesize</a></td><td>Set the cache size of a sequence</td></tr>
|
||||
<!--DbSequence::set_flags--><tr><td><a href="../api_cxx/seq_set_flags.html">DbSequence::set_flags</a></td><td>Set the flags for a sequence</td></tr>
|
||||
<!--DbSequence::set_range--><tr><td><a href="../api_cxx/seq_set_range.html">DbSequence::set_range</a></td><td>Set the range for a sequence</td></tr>
|
||||
<!--DbSequence::stat--><tr><td><a href="../api_cxx/seq_stat.html">DbSequence::stat</a></td><td>Return sequence statistics</td></tr>
|
||||
<!--DbTxn::--><tr><td><a href="../api_cxx/txn_class.html">DbTxn</a></td><td>Transaction object</td></tr>
|
||||
<!--DbTxn::abort--><tr><td><a href="../api_cxx/txn_abort.html">DbTxn::abort</a></td><td>Abort a transaction</td></tr>
|
||||
<!--DbTxn::commit--><tr><td><a href="../api_cxx/txn_commit.html">DbTxn::commit</a></td><td>Commit a transaction</td></tr>
|
||||
<!--DbTxn::discard--><tr><td><a href="../api_cxx/txn_discard.html">DbTxn::discard</a></td><td>Discard a prepared but not resolved transaction handle</td></tr>
|
||||
<!--DbTxn::id--><tr><td><a href="../api_cxx/txn_id.html">DbTxn::id</a></td><td>Return a transaction's ID</td></tr>
|
||||
<!--DbTxn::prepare--><tr><td><a href="../api_cxx/txn_prepare.html">DbTxn::prepare</a></td><td>Prepare a transaction for commit</td></tr>
|
||||
<!--DbTxn::set_name--><tr><td><a href="../api_cxx/txn_set_name.html">DbTxn::set_name</a></td><td>Associate a string with a transaction</td></tr>
|
||||
<!--DbTxn::set_timeout--><tr><td><a href="../api_cxx/txn_set_timeout.html">DbTxn::set_timeout</a></td><td>Set transaction timeout</td></tr>
|
||||
<!--db_strerror--><tr><td><a href="../api_cxx/env_strerror.html">DbEnv::strerror</a></td><td>Error strings</td></tr>
|
||||
<!--db_version--><tr><td><a href="../api_cxx/env_version.html">DbEnv::version</a></td><td>Return version information</td></tr>
|
||||
<!--log_compare--><tr><td><a href="../api_cxx/log_compare.html">DbEnv::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>
|
||||
707
docs/api_cxx/cxx_pindex.html
Normal file
707
docs/api_cxx/cxx_pindex.html
Normal file
@@ -0,0 +1,707 @@
|
||||
<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> <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> <a href="../ref/build_unix/small.html#--disable-hash">--disable-hash</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <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> <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> <a href="../ref/build_unix/small.html#--disable-replication">--disable-replication</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--disable-shared">--disable-shared</a></td></tr>
|
||||
<tr><td align=right>QNX </td><td> <a href="../ref/build_unix/qnx.html#--disable-shared">--disable-shared</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <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> <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> <a href="../ref/build_unix/small.html#--disable-verify">--disable-verify</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-compat185">--enable-compat185</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-cxx">--enable-cxx</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-debug">--enable-debug</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <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> <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> <a href="../ref/build_unix/conf.html#--enable-diagnostic">--enable-diagnostic</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-dump185">--enable-dump185</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-java">--enable-java</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-posixmutexes">--enable-posixmutexes</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <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> <a href="../ref/build_unix/conf.html#--enable-rpc">--enable-rpc</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <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> <a href="../ref/build_unix/small.html#--enable-smallbuild">--enable-smallbuild</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-tcl">--enable-tcl</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-test">--enable-test</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-uimutexes">--enable-uimutexes</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <a href="../ref/build_unix/conf.html#--enable-umrw">--enable-umrw</a></td></tr>
|
||||
<tr><td align=right>Configuring Berkeley DB </td><td> <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> <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> <a href="../ref/build_unix/conf.html#--with-uniquename=NAME">--with-uniquename=NAME</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/install/file.html#2">/etc/magic</a></td></tr>
|
||||
<tr><td align=right>configuring Berkeley DB </td><td> <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> <a href="../ref/build_unix/conf.html#9">1.85</a> databases</td></tr>
|
||||
<tr><td align=right>selecting an </td><td> <a href="../ref/am_conf/select.html#2">access</a> method</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_misc/faq.html#2">access</a> method FAQ</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_misc/tune.html#2">access</a> method tuning</td></tr>
|
||||
<tr><td align=right>introduction to the </td><td> <a href="../ref/am_conf/intro.html#2">access</a> methods</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/aix.html#2">AIX</a></td></tr>
|
||||
<tr><td align=right>data </td><td> <a href="../ref/am_misc/align.html#2">alignment</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/ext/mod.html#2">Apache</a></td></tr>
|
||||
<tr><td align=right>programmatic </td><td> <a href="../ref/arch/apis.html#2">APIs</a></td></tr>
|
||||
<tr><td align=right>hot </td><td> <a href="../ref/transapp/archival.html#4">backup</a></td></tr>
|
||||
<tr><td align=right>introduction to the </td><td> <a href="../ref/mp/intro.html#4">buffer</a> pool subsystem</td></tr>
|
||||
<tr><td align=right>turn off system </td><td> <a href="../api_cxx/memp_fopen.html#2">buffering</a></td></tr>
|
||||
<tr><td align=right>turn off system </td><td> <a href="../api_cxx/env_set_flags.html#3">buffering</a> for database files</td></tr>
|
||||
<tr><td align=right>turn off system </td><td> <a href="../api_cxx/env_set_flags.html#4">buffering</a> for database files</td></tr>
|
||||
<tr><td align=right>turn off system </td><td> <a href="../api_cxx/env_log_set_config.html#2">buffering</a> for log files</td></tr>
|
||||
<tr><td align=right>turn off system </td><td> <a href="../api_cxx/env_log_set_config.html#3">buffering</a> for log files</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_brew/intro.html#2">building</a> for BREW</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/intro.html#3">building</a> for QNX</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_s60/intro.html#2">building</a> for S60</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/intro.html#2">building</a> for UNIX</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/notes.html#2">building</a> for UNIX FAQ</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_vxworks/intro.html#2">building</a> for VxWorks</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_vxworks/introae.html#2">building</a> for VxWorks AE</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_vxworks/faq.html#2">building</a> for VxWorks FAQ</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_vxworks/intro6x.html#2">building</a> for VxWorks6.x</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_win/intro.html#2">building</a> for Windows</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_wince/intro.html#2">building</a> for Windows CE</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_win/faq.html#2">building</a> for Windows FAQ</td></tr>
|
||||
<tr><td align=right>selecting a </td><td> <a href="../ref/am_conf/byteorder.html#2">byte</a> order</td></tr>
|
||||
<tr><td align=right>configuring the </td><td> <a href="../ref/build_unix/conf.html#8">C++</a> API</td></tr>
|
||||
<tr><td align=right>flushing the database </td><td> <a href="../ref/am/sync.html#2">cache</a></td></tr>
|
||||
<tr><td align=right>selecting a </td><td> <a href="../ref/am_conf/cachesize.html#2">cache</a> size</td></tr>
|
||||
<tr><td align=right>introduction to the memory </td><td> <a href="../ref/mp/intro.html#3">cache</a> subsystem</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/archival.html#3">catastrophic</a> recovery</td></tr>
|
||||
<tr><td align=right>Patches, Updates and </td><td> <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> <a href="../api_cxx/db_set_flags.html#2">checksum</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/curclose.html#2">closing</a> a cursor</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/close.html#2">closing</a> a database</td></tr>
|
||||
<tr><td align=right>specifying a Btree </td><td> <a href="../ref/am_conf/bt_compare.html#2">comparison</a> function</td></tr>
|
||||
<tr><td align=right>changing </td><td> <a href="../ref/build_unix/flags.html#2">compile</a> or load options</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/cam/intro.html#2">Concurrent</a> Data Store</td></tr>
|
||||
<tr><td align=right>database environment </td><td> <a href="../ref/env/db_config.html#3">configuration</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/conf.html#2">configuring</a> Berkeley DB for UNIX systems</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/program/copy.html#2">copying</a> databases</td></tr>
|
||||
<tr><td align=right>salvaging </td><td> <a href="../ref/am/verify.html#4">corrupted</a> databases</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/count.html#2">counting</a> data items for a key</td></tr>
|
||||
<tr><td align=right>closing a </td><td> <a href="../ref/am/curclose.html#3">cursor</a></td></tr>
|
||||
<tr><td align=right>deleting records with a </td><td> <a href="../ref/am/curdel.html#3">cursor</a></td></tr>
|
||||
<tr><td align=right>duplicating a </td><td> <a href="../ref/am/curdup.html#3">cursor</a></td></tr>
|
||||
<tr><td align=right>retrieving records with a </td><td> <a href="../ref/am/curget.html#3">cursor</a></td></tr>
|
||||
<tr><td align=right>storing records with a </td><td> <a href="../ref/am/curput.html#3">cursor</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_misc/stability.html#2">cursor</a> stability</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/read.html#4">cursor</a> stability</td></tr>
|
||||
<tr><td align=right>database </td><td> <a href="../ref/am/cursor.html#2">cursors</a></td></tr>
|
||||
<tr><td align=right>Dbc::put </td><td> <a href="../api_cxx/dbc_put.html#DB_AFTER">DB_AFTER</a></td></tr>
|
||||
<tr><td align=right>Db::verify </td><td> <a href="../api_cxx/db_verify.html#DB_AGGRESSIVE">DB_AGGRESSIVE</a></td></tr>
|
||||
<tr><td align=right>Db::put </td><td> <a href="../api_cxx/db_put.html#DB_APPEND">DB_APPEND</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_archive </td><td> <a href="../api_cxx/log_archive.html#DB_ARCH_ABS">DB_ARCH_ABS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_archive </td><td> <a href="../api_cxx/log_archive.html#DB_ARCH_DATA">DB_ARCH_DATA</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_archive </td><td> <a href="../api_cxx/log_archive.html#DB_ARCH_LOG">DB_ARCH_LOG</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_archive </td><td> <a href="../api_cxx/log_archive.html#DB_ARCH_REMOVE">DB_ARCH_REMOVE</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::dbremove </td><td> <a href="../api_cxx/env_dbremove.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::dbrename </td><td> <a href="../api_cxx/env_dbrename.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a></td></tr>
|
||||
<tr><td align=right>Dbc::put </td><td> <a href="../api_cxx/dbc_put.html#DB_BEFORE">DB_BEFORE</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_BTREE">DB_BTREE</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/dbt_class.html#3">DB_BUFFER_SMALL</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/memp_class.html#2">DB_BUFFER_SMALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_CDB_ALLDB">DB_CDB_ALLDB</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_CHKSUM">DB_CHKSUM</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/env/db_config.html#2">DB_CONFIG</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/env/db_config.html#4">DB_CONFIG</a></td></tr>
|
||||
<tr><td align=right>Db::get </td><td> <a href="../api_cxx/db_get.html#DB_CONSUME">DB_CONSUME</a></td></tr>
|
||||
<tr><td align=right>Db::get </td><td> <a href="../api_cxx/db_get.html#DB_CONSUME_WAIT">DB_CONSUME_WAIT</a></td></tr>
|
||||
<tr><td align=right>Db::associate </td><td> <a href="../api_cxx/db_associate.html#DB_CREATE">DB_CREATE</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_CREATE">DB_CREATE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_CREATE">DB_CREATE</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::open </td><td> <a href="../api_cxx/memp_fopen.html#DB_CREATE">DB_CREATE</a></td></tr>
|
||||
<tr><td align=right>DbSequence::open </td><td> <a href="../api_cxx/seq_open.html#DB_CREATE">DB_CREATE</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_CURRENT">DB_CURRENT</a></td></tr>
|
||||
<tr><td align=right>Dbc::put </td><td> <a href="../api_cxx/dbc_put.html#DB_CURRENT">DB_CURRENT</a></td></tr>
|
||||
<tr><td align=right>DbLogc::get </td><td> <a href="../api_cxx/logc_get.html#DB_CURRENT">DB_CURRENT</a></td></tr>
|
||||
<tr><td align=right>Db </td><td> <a href="../api_cxx/db_class.html#DB_CXX_NO_EXCEPTIONS">DB_CXX_NO_EXCEPTIONS</a></td></tr>
|
||||
<tr><td align=right>DbEnv </td><td> <a href="../api_cxx/env_class.html#DB_CXX_NO_EXCEPTIONS">DB_CXX_NO_EXCEPTIONS</a></td></tr>
|
||||
<tr><td align=right>Db::associate </td><td> <a href="../api_cxx/db_associate.html#DB_DBT_APPMALLOC">DB_DBT_APPMALLOC</a></td></tr>
|
||||
<tr><td align=right>Dbt </td><td> <a href="../api_cxx/dbt_class.html#DB_DBT_APPMALLOC">DB_DBT_APPMALLOC</a></td></tr>
|
||||
<tr><td align=right>Dbt </td><td> <a href="../api_cxx/dbt_class.html#DB_DBT_MALLOC">DB_DBT_MALLOC</a></td></tr>
|
||||
<tr><td align=right>Db::associate </td><td> <a href="../api_cxx/db_associate.html#DB_DBT_MULTIPLE">DB_DBT_MULTIPLE</a></td></tr>
|
||||
<tr><td align=right>Dbt </td><td> <a href="../api_cxx/dbt_class.html#DB_DBT_MULTIPLE">DB_DBT_MULTIPLE</a></td></tr>
|
||||
<tr><td align=right>Dbt </td><td> <a href="../api_cxx/dbt_class.html#DB_DBT_PARTIAL">DB_DBT_PARTIAL</a></td></tr>
|
||||
<tr><td align=right>Dbt </td><td> <a href="../api_cxx/dbt_class.html#DB_DBT_REALLOC">DB_DBT_REALLOC</a></td></tr>
|
||||
<tr><td align=right>Dbt </td><td> <a href="../api_cxx/dbt_class.html#DB_DBT_USERMEM">DB_DBT_USERMEM</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::open </td><td> <a href="../api_cxx/memp_fopen.html#DB_DIRECT">DB_DIRECT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_DIRECT_DB">DB_DIRECT_DB</a></td></tr>
|
||||
<tr><td align=right>Db::associate </td><td> <a href="../api_cxx/db_associate.html#DB_DONOTINDEX">DB_DONOTINDEX</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_DSYNC_DB">DB_DSYNC_DB</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_DUP">DB_DUP</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_DUPSORT">DB_DUPSORT</a></td></tr>
|
||||
<tr><td align=right>Db::upgrade </td><td> <a href="../api_cxx/db_upgrade.html#DB_DUPSORT">DB_DUPSORT</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/rep/id.html#2">DB_EID_BROADCAST</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/rep/id.html#3">DB_EID_INVALID</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_ENCRYPT">DB_ENCRYPT</a></td></tr>
|
||||
<tr><td align=right>Db::set_encrypt </td><td> <a href="../api_cxx/db_set_encrypt.html#DB_ENCRYPT_AES">DB_ENCRYPT_AES</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_encrypt </td><td> <a href="../api_cxx/env_set_encrypt.html#DB_ENCRYPT_AES">DB_ENCRYPT_AES</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_event_notify </td><td> <a href="../api_cxx/env_event_notify.html#DB_EVENT_PANIC">DB_EVENT_PANIC</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_event_notify </td><td> <a href="../api_cxx/env_event_notify.html#DB_EVENT_REP_CLIENT">DB_EVENT_REP_CLIENT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_event_notify </td><td> <a href="../api_cxx/env_event_notify.html#DB_EVENT_REP_ELECTED">DB_EVENT_REP_ELECTED</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_event_notify </td><td> <a href="../api_cxx/env_event_notify.html#DB_EVENT_REP_MASTER">DB_EVENT_REP_MASTER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_event_notify </td><td> <a href="../api_cxx/env_event_notify.html#DB_EVENT_REP_NEWMASTER">DB_EVENT_REP_NEWMASTER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_event_notify </td><td> <a href="../api_cxx/env_event_notify.html#DB_EVENT_REP_PERM_FAILED">DB_EVENT_REP_PERM_FAILED</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_event_notify </td><td> <a href="../api_cxx/env_event_notify.html#DB_EVENT_REP_STARTUPDONE">DB_EVENT_REP_STARTUPDONE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_event_notify </td><td> <a href="../api_cxx/env_event_notify.html#DB_EVENT_WRITE_FAILED">DB_EVENT_WRITE_FAILED</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_EXCL">DB_EXCL</a></td></tr>
|
||||
<tr><td align=right>DbSequence::open </td><td> <a href="../api_cxx/seq_open.html#DB_EXCL">DB_EXCL</a></td></tr>
|
||||
<tr><td align=right>Db::stat </td><td> <a href="../api_cxx/db_stat.html#DB_FAST_STAT">DB_FAST_STAT</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_FIRST">DB_FIRST</a></td></tr>
|
||||
<tr><td align=right>DbLogc::get </td><td> <a href="../api_cxx/logc_get.html#DB_FIRST">DB_FIRST</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_recover </td><td> <a href="../api_cxx/txn_recover.html#DB_FIRST">DB_FIRST</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_put </td><td> <a href="../api_cxx/log_put.html#DB_FLUSH">DB_FLUSH</a></td></tr>
|
||||
<tr><td align=right>DbEnv::remove </td><td> <a href="../api_cxx/env_remove.html#DB_FORCE">DB_FORCE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_checkpoint </td><td> <a href="../api_cxx/txn_checkpoint.html#DB_FORCE">DB_FORCE</a></td></tr>
|
||||
<tr><td align=right>Db::compact </td><td> <a href="../api_cxx/db_compact.html#DB_FREELIST_ONLY">DB_FREELIST_ONLY</a></td></tr>
|
||||
<tr><td align=right>Db::compact </td><td> <a href="../api_cxx/db_compact.html#DB_FREE_SPACE">DB_FREE_SPACE</a></td></tr>
|
||||
<tr><td align=right>Db::get </td><td> <a href="../api_cxx/db_get.html#DB_GET_BOTH">DB_GET_BOTH</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_GET_BOTH">DB_GET_BOTH</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_GET_BOTH_RANGE">DB_GET_BOTH_RANGE</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_GET_RECNO">DB_GET_RECNO</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_HASH">DB_HASH</a></td></tr>
|
||||
<tr><td align=right>File naming </td><td> <a href="../ref/env/naming.html#DB_HOME">DB_HOME</a></td></tr>
|
||||
<tr><td align=right>File naming </td><td> <a href="../ref/env/naming.html#db_home">db_home</a></td></tr>
|
||||
<tr><td align=right>Db::get </td><td> <a href="../api_cxx/db_get.html#DB_IGNORE_LEASE">DB_IGNORE_LEASE</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_IGNORE_LEASE">DB_IGNORE_LEASE</a></td></tr>
|
||||
<tr><td align=right>Db::associate </td><td> <a href="../api_cxx/db_associate.html#DB_IMMUTABLE_KEY">DB_IMMUTABLE_KEY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_INIT_LOCK">DB_INIT_LOCK</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_INIT_LOG">DB_INIT_LOG</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_INIT_MPOOL">DB_INIT_MPOOL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_INIT_REP">DB_INIT_REP</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_INIT_TXN">DB_INIT_TXN</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_INORDER">DB_INORDER</a></td></tr>
|
||||
<tr><td align=right>Db::join </td><td> <a href="../api_cxx/db_join.html#DB_JOIN_ITEM">DB_JOIN_ITEM</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_JOIN_ITEM">DB_JOIN_ITEM</a></td></tr>
|
||||
<tr><td align=right>Db::join </td><td> <a href="../api_cxx/db_join.html#DB_JOIN_NOSORT">DB_JOIN_NOSORT</a></td></tr>
|
||||
<tr><td align=right>Error returns to applications </td><td> <a href="../ref/program/errorret.html#DB_KEYEMPTY">DB_KEYEMPTY</a></td></tr>
|
||||
<tr><td align=right>Error returns to applications </td><td> <a href="../ref/program/errorret.html#DB_KEYEXIST">DB_KEYEXIST</a></td></tr>
|
||||
<tr><td align=right>Dbc::put </td><td> <a href="../api_cxx/dbc_put.html#DB_KEYFIRST">DB_KEYFIRST</a></td></tr>
|
||||
<tr><td align=right>Dbc::put </td><td> <a href="../api_cxx/dbc_put.html#DB_KEYLAST">DB_KEYLAST</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_LAST">DB_LAST</a></td></tr>
|
||||
<tr><td align=right>DbLogc::get </td><td> <a href="../api_cxx/logc_get.html#DB_LAST">DB_LAST</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_LOCKDOWN">DB_LOCKDOWN</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_begin </td><td> <a href="../api_cxx/txn_begin.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/program/errorret.html#4">DB_LOCK_DEADLOCK</a></td></tr>
|
||||
<tr><td align=right>Error returns to applications </td><td> <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_lk_detect </td><td> <a href="../api_cxx/env_set_lk_detect.html#DB_LOCK_DEFAULT">DB_LOCK_DEFAULT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_detect </td><td> <a href="../api_cxx/lock_detect.html#DB_LOCK_DEFAULT">DB_LOCK_DEFAULT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_lk_detect </td><td> <a href="../api_cxx/env_set_lk_detect.html#DB_LOCK_EXPIRE">DB_LOCK_EXPIRE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_detect </td><td> <a href="../api_cxx/lock_detect.html#DB_LOCK_EXPIRE">DB_LOCK_EXPIRE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_GET">DB_LOCK_GET</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_GET_TIMEOUT">DB_LOCK_GET_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_IREAD">DB_LOCK_IREAD</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_IWR">DB_LOCK_IWR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_IWRITE">DB_LOCK_IWRITE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_lk_detect </td><td> <a href="../api_cxx/env_set_lk_detect.html#DB_LOCK_MAXLOCKS">DB_LOCK_MAXLOCKS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_detect </td><td> <a href="../api_cxx/lock_detect.html#DB_LOCK_MAXLOCKS">DB_LOCK_MAXLOCKS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_lk_detect </td><td> <a href="../api_cxx/env_set_lk_detect.html#DB_LOCK_MAXWRITE">DB_LOCK_MAXWRITE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_detect </td><td> <a href="../api_cxx/lock_detect.html#DB_LOCK_MAXWRITE">DB_LOCK_MAXWRITE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_lk_detect </td><td> <a href="../api_cxx/env_set_lk_detect.html#DB_LOCK_MINLOCKS">DB_LOCK_MINLOCKS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_detect </td><td> <a href="../api_cxx/lock_detect.html#DB_LOCK_MINLOCKS">DB_LOCK_MINLOCKS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_lk_detect </td><td> <a href="../api_cxx/env_set_lk_detect.html#DB_LOCK_MINWRITE">DB_LOCK_MINWRITE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_detect </td><td> <a href="../api_cxx/lock_detect.html#DB_LOCK_MINWRITE">DB_LOCK_MINWRITE</a></td></tr>
|
||||
<tr><td align=right>Error returns to applications </td><td> <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_get </td><td> <a href="../api_cxx/lock_get.html#DB_LOCK_NOWAIT">DB_LOCK_NOWAIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_NOWAIT">DB_LOCK_NOWAIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_lk_detect </td><td> <a href="../api_cxx/env_set_lk_detect.html#DB_LOCK_OLDEST">DB_LOCK_OLDEST</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_detect </td><td> <a href="../api_cxx/lock_detect.html#DB_LOCK_OLDEST">DB_LOCK_OLDEST</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_PUT">DB_LOCK_PUT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_PUT_ALL">DB_LOCK_PUT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_PUT_OBJ">DB_LOCK_PUT_OBJ</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_lk_detect </td><td> <a href="../api_cxx/env_set_lk_detect.html#DB_LOCK_RANDOM">DB_LOCK_RANDOM</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_detect </td><td> <a href="../api_cxx/lock_detect.html#DB_LOCK_RANDOM">DB_LOCK_RANDOM</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_READ">DB_LOCK_READ</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_TIMEOUT">DB_LOCK_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#DB_LOCK_WRITE">DB_LOCK_WRITE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_lk_detect </td><td> <a href="../api_cxx/env_set_lk_detect.html#DB_LOCK_YOUNGEST">DB_LOCK_YOUNGEST</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_detect </td><td> <a href="../api_cxx/lock_detect.html#DB_LOCK_YOUNGEST">DB_LOCK_YOUNGEST</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_set_config </td><td> <a href="../api_cxx/env_log_set_config.html#DB_LOG_AUTO_REMOVE">DB_LOG_AUTO_REMOVE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_set_config </td><td> <a href="../api_cxx/env_log_set_config.html#DB_LOG_BUFFER_FULL">DB_LOG_BUFFER_FULL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_set_config </td><td> <a href="../api_cxx/env_log_set_config.html#DB_LOG_DIRECT">DB_LOG_DIRECT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_set_config </td><td> <a href="../api_cxx/env_log_set_config.html#DB_LOG_DSYNC">DB_LOG_DSYNC</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_set_config </td><td> <a href="../api_cxx/env_log_set_config.html#DB_LOG_IN_MEMORY">DB_LOG_IN_MEMORY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_set_config </td><td> <a href="../api_cxx/env_log_set_config.html#DB_LOG_ZERO">DB_LOG_ZERO</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::get </td><td> <a href="../api_cxx/memp_fget.html#DB_MPOOL_CREATE">DB_MPOOL_CREATE</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::get </td><td> <a href="../api_cxx/memp_fget.html#DB_MPOOL_DIRTY">DB_MPOOL_DIRTY</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::get </td><td> <a href="../api_cxx/memp_fget.html#DB_MPOOL_EDIT">DB_MPOOL_EDIT</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::get </td><td> <a href="../api_cxx/memp_fget.html#DB_MPOOL_LAST">DB_MPOOL_LAST</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::get </td><td> <a href="../api_cxx/memp_fget.html#DB_MPOOL_NEW">DB_MPOOL_NEW</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::set_flags </td><td> <a href="../api_cxx/memp_set_flags.html#DB_MPOOL_NOFILE">DB_MPOOL_NOFILE</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::set_flags </td><td> <a href="../api_cxx/memp_set_flags.html#DB_MPOOL_UNLINK">DB_MPOOL_UNLINK</a></td></tr>
|
||||
<tr><td align=right>Db::get </td><td> <a href="../api_cxx/db_get.html#DB_MULTIPLE">DB_MULTIPLE</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_MULTIVERSION">DB_MULTIVERSION</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_MULTIVERSION">DB_MULTIVERSION</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::open </td><td> <a href="../api_cxx/memp_fopen.html#DB_MULTIVERSION">DB_MULTIVERSION</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_isalive </td><td> <a href="../api_cxx/env_set_isalive.html#DB_MUTEX_PROCESS_ONLY">DB_MUTEX_PROCESS_ONLY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::mutex_alloc </td><td> <a href="../api_cxx/mutex_alloc.html#DB_MUTEX_PROCESS_ONLY">DB_MUTEX_PROCESS_ONLY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::mutex_alloc </td><td> <a href="../api_cxx/mutex_alloc.html#DB_MUTEX_SELF_BLOCK">DB_MUTEX_SELF_BLOCK</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_NEXT">DB_NEXT</a></td></tr>
|
||||
<tr><td align=right>DbLogc::get </td><td> <a href="../api_cxx/logc_get.html#DB_NEXT">DB_NEXT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_recover </td><td> <a href="../api_cxx/txn_recover.html#DB_NEXT">DB_NEXT</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_NEXT_DUP">DB_NEXT_DUP</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_NEXT_NODUP">DB_NEXT_NODUP</a></td></tr>
|
||||
<tr><td align=right>Db::put </td><td> <a href="../api_cxx/db_put.html#DB_NODUPDATA">DB_NODUPDATA</a></td></tr>
|
||||
<tr><td align=right>Dbc::put </td><td> <a href="../api_cxx/dbc_put.html#DB_NODUPDATA">DB_NODUPDATA</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_NOLOCKING">DB_NOLOCKING</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_NOMMAP">DB_NOMMAP</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_NOMMAP">DB_NOMMAP</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::open </td><td> <a href="../api_cxx/memp_fopen.html#DB_NOMMAP">DB_NOMMAP</a></td></tr>
|
||||
<tr><td align=right>Db::verify </td><td> <a href="../api_cxx/db_verify.html#DB_NOORDERCHK">DB_NOORDERCHK</a></td></tr>
|
||||
<tr><td align=right>Db::put </td><td> <a href="../api_cxx/db_put.html#DB_NOOVERWRITE">DB_NOOVERWRITE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_NOPANIC">DB_NOPANIC</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/env_set_rpc_server.html#2">DB_NOSERVER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_rpc_server </td><td> <a href="../api_cxx/env_set_rpc_server.html#DB_NOSERVER">DB_NOSERVER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_rpc_server </td><td> <a href="../api_cxx/env_set_rpc_server.html#DB_NOSERVER_HOME">DB_NOSERVER_HOME</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/env_set_rpc_server.html#3">DB_NOSERVER_ID</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_rpc_server </td><td> <a href="../api_cxx/env_set_rpc_server.html#DB_NOSERVER_ID">DB_NOSERVER_ID</a></td></tr>
|
||||
<tr><td align=right>Db::close </td><td> <a href="../api_cxx/db_close.html#DB_NOSYNC">DB_NOSYNC</a></td></tr>
|
||||
<tr><td align=right>Error returns to applications </td><td> <a href="../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::open </td><td> <a href="../api_cxx/memp_fopen.html#DB_ODDFILESIZE">DB_ODDFILESIZE</a></td></tr>
|
||||
<tr><td align=right>Db::upgrade </td><td> <a href="../api_cxx/db_upgrade.html#DB_OLD_VERSION">DB_OLD_VERSION</a></td></tr>
|
||||
<tr><td align=right>Db::verify </td><td> <a href="../api_cxx/db_verify.html#DB_ORDERCHKONLY">DB_ORDERCHKONLY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_OVERWRITE">DB_OVERWRITE</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/memp_fget.html#2">DB_PAGE_NOTFOUND</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_PANIC_ENVIRONMENT">DB_PANIC_ENVIRONMENT</a></td></tr>
|
||||
<tr><td align=right>Dbc::dup </td><td> <a href="../api_cxx/dbc_dup.html#DB_POSITION">DB_POSITION</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_PREV">DB_PREV</a></td></tr>
|
||||
<tr><td align=right>DbLogc::get </td><td> <a href="../api_cxx/logc_get.html#DB_PREV">DB_PREV</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_PREV_DUP">DB_PREV_DUP</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_PREV_NODUP">DB_PREV_NODUP</a></td></tr>
|
||||
<tr><td align=right>Db::verify </td><td> <a href="../api_cxx/db_verify.html#DB_PRINTABLE">DB_PRINTABLE</a></td></tr>
|
||||
<tr><td align=right>Db::set_priority </td><td> <a href="../api_cxx/db_set_priority.html#DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></td></tr>
|
||||
<tr><td align=right>Dbc::set_priority </td><td> <a href="../api_cxx/dbc_set_priority.html#DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::put </td><td> <a href="../api_cxx/memp_fput.html#DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::set_priority </td><td> <a href="../api_cxx/memp_set_priority.html#DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></td></tr>
|
||||
<tr><td align=right>Db::set_priority </td><td> <a href="../api_cxx/db_set_priority.html#DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></td></tr>
|
||||
<tr><td align=right>Dbc::set_priority </td><td> <a href="../api_cxx/dbc_set_priority.html#DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::put </td><td> <a href="../api_cxx/memp_fput.html#DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::set_priority </td><td> <a href="../api_cxx/memp_set_priority.html#DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></td></tr>
|
||||
<tr><td align=right>Db::set_priority </td><td> <a href="../api_cxx/db_set_priority.html#DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></td></tr>
|
||||
<tr><td align=right>Dbc::set_priority </td><td> <a href="../api_cxx/dbc_set_priority.html#DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::put </td><td> <a href="../api_cxx/memp_fput.html#DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::set_priority </td><td> <a href="../api_cxx/memp_set_priority.html#DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::put </td><td> <a href="../api_cxx/memp_fput.html#DB_PRIORITY_UNCHANGED">DB_PRIORITY_UNCHANGED</a></td></tr>
|
||||
<tr><td align=right>Db::set_priority </td><td> <a href="../api_cxx/db_set_priority.html#DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></td></tr>
|
||||
<tr><td align=right>Dbc::set_priority </td><td> <a href="../api_cxx/dbc_set_priority.html#DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::put </td><td> <a href="../api_cxx/memp_fput.html#DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::set_priority </td><td> <a href="../api_cxx/memp_set_priority.html#DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></td></tr>
|
||||
<tr><td align=right>Db::set_priority </td><td> <a href="../api_cxx/db_set_priority.html#DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></td></tr>
|
||||
<tr><td align=right>Dbc::set_priority </td><td> <a href="../api_cxx/dbc_set_priority.html#DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::put </td><td> <a href="../api_cxx/memp_fput.html#DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::set_priority </td><td> <a href="../api_cxx/memp_set_priority.html#DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_PRIVATE">DB_PRIVATE</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_QUEUE">DB_QUEUE</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_RDONLY">DB_RDONLY</a></td></tr>
|
||||
<tr><td align=right>DbMpoolFile::open </td><td> <a href="../api_cxx/memp_fopen.html#DB_RDONLY">DB_RDONLY</a></td></tr>
|
||||
<tr><td align=right>Db::cursor </td><td> <a href="../api_cxx/db_cursor.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::exists </td><td> <a href="../api_cxx/db_exists.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::get </td><td> <a href="../api_cxx/db_get.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::stat </td><td> <a href="../api_cxx/db_stat.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_begin </td><td> <a href="../api_cxx/txn_begin.html#DB_READ_COMMITTED">DB_READ_COMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::cursor </td><td> <a href="../api_cxx/db_cursor.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::exists </td><td> <a href="../api_cxx/db_exists.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::get </td><td> <a href="../api_cxx/db_get.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::join </td><td> <a href="../api_cxx/db_join.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::stat </td><td> <a href="../api_cxx/db_stat.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_begin </td><td> <a href="../api_cxx/txn_begin.html#DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_RECNO">DB_RECNO</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_RECNUM">DB_RECNUM</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_RECOVER">DB_RECOVER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_feedback </td><td> <a href="../api_cxx/env_set_feedback.html#DB_RECOVER">DB_RECOVER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_RECOVER_FATAL">DB_RECOVER_FATAL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_REGION_INIT">DB_REGION_INIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_REGISTER">DB_REGISTER</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_set_ack_policy </td><td> <a href="../api_cxx/repmgr_ack_policy.html#DB_REPMGR_ACKS_ALL">DB_REPMGR_ACKS_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_set_ack_policy </td><td> <a href="../api_cxx/repmgr_ack_policy.html#DB_REPMGR_ACKS_ALL_PEERS">DB_REPMGR_ACKS_ALL_PEERS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_set_ack_policy </td><td> <a href="../api_cxx/repmgr_ack_policy.html#DB_REPMGR_ACKS_NONE">DB_REPMGR_ACKS_NONE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_set_ack_policy </td><td> <a href="../api_cxx/repmgr_ack_policy.html#DB_REPMGR_ACKS_ONE">DB_REPMGR_ACKS_ONE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_set_ack_policy </td><td> <a href="../api_cxx/repmgr_ack_policy.html#DB_REPMGR_ACKS_ONE_PEER">DB_REPMGR_ACKS_ONE_PEER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_set_ack_policy </td><td> <a href="../api_cxx/repmgr_ack_policy.html#DB_REPMGR_ACKS_QUORUM">DB_REPMGR_ACKS_QUORUM</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_config </td><td> <a href="../api_cxx/rep_config.html#DB_REPMGR_CONF_2SITE_STRICT">DB_REPMGR_CONF_2SITE_STRICT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_site_list </td><td> <a href="../api_cxx/repmgr_site_list.html#DB_REPMGR_CONNECTED">DB_REPMGR_CONNECTED</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_site_list </td><td> <a href="../api_cxx/repmgr_site_list.html#DB_REPMGR_DISCONNECTED">DB_REPMGR_DISCONNECTED</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_add_remote_site </td><td> <a href="../api_cxx/repmgr_remote_site.html#DB_REPMGR_PEER">DB_REPMGR_PEER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_timeout </td><td> <a href="../api_cxx/rep_timeout.html#DB_REP_ACK_TIMEOUT">DB_REP_ACK_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_transport </td><td> <a href="../api_cxx/rep_transport.html#DB_REP_ANYWHERE">DB_REP_ANYWHERE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_timeout </td><td> <a href="../api_cxx/rep_timeout.html#DB_REP_CHECKPOINT_DELAY">DB_REP_CHECKPOINT_DELAY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_start </td><td> <a href="../api_cxx/rep_start.html#DB_REP_CLIENT">DB_REP_CLIENT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_start </td><td> <a href="../api_cxx/repmgr_start.html#DB_REP_CLIENT">DB_REP_CLIENT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_config </td><td> <a href="../api_cxx/rep_config.html#DB_REP_CONF_BULK">DB_REP_CONF_BULK</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_config </td><td> <a href="../api_cxx/rep_config.html#DB_REP_CONF_DELAYCLIENT">DB_REP_CONF_DELAYCLIENT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_config </td><td> <a href="../api_cxx/rep_config.html#DB_REP_CONF_LEASE">DB_REP_CONF_LEASE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_config </td><td> <a href="../api_cxx/rep_config.html#DB_REP_CONF_NOAUTOINIT">DB_REP_CONF_NOAUTOINIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_config </td><td> <a href="../api_cxx/rep_config.html#DB_REP_CONF_NOWAIT">DB_REP_CONF_NOWAIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_timeout </td><td> <a href="../api_cxx/rep_timeout.html#DB_REP_CONNECTION_RETRY">DB_REP_CONNECTION_RETRY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_process_message </td><td> <a href="../api_cxx/rep_message.html#DB_REP_DUPMASTER">DB_REP_DUPMASTER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_start </td><td> <a href="../api_cxx/repmgr_start.html#DB_REP_ELECTION">DB_REP_ELECTION</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_timeout </td><td> <a href="../api_cxx/rep_timeout.html#DB_REP_ELECTION_RETRY">DB_REP_ELECTION_RETRY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_timeout </td><td> <a href="../api_cxx/rep_timeout.html#DB_REP_ELECTION_TIMEOUT">DB_REP_ELECTION_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_timeout </td><td> <a href="../api_cxx/rep_timeout.html#DB_REP_FULL_ELECTION_TIMEOUT">DB_REP_FULL_ELECTION_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/db_put.html#2">DB_REP_HANDLE_DEAD</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_timeout </td><td> <a href="../api_cxx/rep_timeout.html#DB_REP_HEARTBEAT_MONITOR">DB_REP_HEARTBEAT_MONITOR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_timeout </td><td> <a href="../api_cxx/rep_timeout.html#DB_REP_HEARTBEAT_SEND">DB_REP_HEARTBEAT_SEND</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_process_message </td><td> <a href="../api_cxx/rep_message.html#DB_REP_HOLDELECTION">DB_REP_HOLDELECTION</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_process_message </td><td> <a href="../api_cxx/rep_message.html#DB_REP_IGNORE">DB_REP_IGNORE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_process_message </td><td> <a href="../api_cxx/rep_message.html#DB_REP_ISPERM">DB_REP_ISPERM</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_process_message </td><td> <a href="../api_cxx/rep_message.html#DB_REP_JOIN_FAILURE">DB_REP_JOIN_FAILURE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_config </td><td> <a href="../api_cxx/rep_config.html#DB_REP_LEASE_EXPIRED">DB_REP_LEASE_EXPIRED</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_timeout </td><td> <a href="../api_cxx/rep_timeout.html#DB_REP_LEASE_TIMEOUT">DB_REP_LEASE_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/db_put.html#3">DB_REP_LOCKOUT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_start </td><td> <a href="../api_cxx/rep_start.html#DB_REP_MASTER">DB_REP_MASTER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_start </td><td> <a href="../api_cxx/repmgr_start.html#DB_REP_MASTER">DB_REP_MASTER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_process_message </td><td> <a href="../api_cxx/rep_message.html#DB_REP_NEWSITE">DB_REP_NEWSITE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_transport </td><td> <a href="../api_cxx/rep_transport.html#DB_REP_NOBUFFER">DB_REP_NOBUFFER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_process_message </td><td> <a href="../api_cxx/rep_message.html#DB_REP_NOTPERM">DB_REP_NOTPERM</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_transport </td><td> <a href="../api_cxx/rep_transport.html#DB_REP_PERMANENT">DB_REP_PERMANENT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_set_transport </td><td> <a href="../api_cxx/rep_transport.html#DB_REP_REREQUEST">DB_REP_REREQUEST</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/rep_elect.html#2">DB_REP_UNAVAIL</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_REVSPLITOFF">DB_REVSPLITOFF</a></td></tr>
|
||||
<tr><td align=right>Db::exists </td><td> <a href="../api_cxx/db_exists.html#DB_RMW">DB_RMW</a></td></tr>
|
||||
<tr><td align=right>Db::get </td><td> <a href="../api_cxx/db_get.html#DB_RMW">DB_RMW</a></td></tr>
|
||||
<tr><td align=right>Db::join </td><td> <a href="../api_cxx/db_join.html#DB_RMW">DB_RMW</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_RMW">DB_RMW</a></td></tr>
|
||||
<tr><td align=right>DbEnv </td><td> <a href="../api_cxx/env_class.html#DB_RPCCLIENT">DB_RPCCLIENT</a></td></tr>
|
||||
<tr><td align=right>Error returns to applications </td><td> <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a></td></tr>
|
||||
<tr><td align=right>Db::verify </td><td> <a href="../api_cxx/db_verify.html#DB_SALVAGE">DB_SALVAGE</a></td></tr>
|
||||
<tr><td align=right>Error returns to applications </td><td> <a href="../ref/program/errorret.html#DB_SECONDARY_BAD">DB_SECONDARY_BAD</a></td></tr>
|
||||
<tr><td align=right>DbSequence::set_flags </td><td> <a href="../api_cxx/seq_set_flags.html#DB_SEQ_DEC">DB_SEQ_DEC</a></td></tr>
|
||||
<tr><td align=right>DbSequence::set_flags </td><td> <a href="../api_cxx/seq_set_flags.html#DB_SEQ_INC">DB_SEQ_INC</a></td></tr>
|
||||
<tr><td align=right>DbSequence::set_flags </td><td> <a href="../api_cxx/seq_set_flags.html#DB_SEQ_WRAP">DB_SEQ_WRAP</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_SET">DB_SET</a></td></tr>
|
||||
<tr><td align=right>DbLogc::get </td><td> <a href="../api_cxx/logc_get.html#DB_SET">DB_SET</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_timeout </td><td> <a href="../api_cxx/env_set_timeout.html#DB_SET_LOCK_TIMEOUT">DB_SET_LOCK_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right>DbTxn::set_timeout </td><td> <a href="../api_cxx/txn_set_timeout.html#DB_SET_LOCK_TIMEOUT">DB_SET_LOCK_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_SET_RANGE">DB_SET_RANGE</a></td></tr>
|
||||
<tr><td align=right>Db::get </td><td> <a href="../api_cxx/db_get.html#DB_SET_RECNO">DB_SET_RECNO</a></td></tr>
|
||||
<tr><td align=right>Dbc::get </td><td> <a href="../api_cxx/dbc_get.html#DB_SET_RECNO">DB_SET_RECNO</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_timeout </td><td> <a href="../api_cxx/env_set_timeout.html#DB_SET_TXN_TIMEOUT">DB_SET_TXN_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right>DbTxn::set_timeout </td><td> <a href="../api_cxx/txn_set_timeout.html#DB_SET_TXN_TIMEOUT">DB_SET_TXN_TIMEOUT</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_SNAPSHOT">DB_SNAPSHOT</a></td></tr>
|
||||
<tr><td align=right>Db::stat </td><td> <a href="../api_cxx/db_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::stat_print </td><td> <a href="../api_cxx/env_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_stat </td><td> <a href="../api_cxx/lock_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_stat </td><td> <a href="../api_cxx/log_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::memp_stat </td><td> <a href="../api_cxx/memp_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::mutex_stat </td><td> <a href="../api_cxx/mutex_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_stat </td><td> <a href="../api_cxx/rep_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_stat </td><td> <a href="../api_cxx/repmgr_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_stat </td><td> <a href="../api_cxx/txn_stat.html#DB_STAT_ALL">DB_STAT_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::stat_print </td><td> <a href="../api_cxx/env_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_stat </td><td> <a href="../api_cxx/lock_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::log_stat </td><td> <a href="../api_cxx/log_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::memp_stat </td><td> <a href="../api_cxx/memp_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::mutex_stat </td><td> <a href="../api_cxx/mutex_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::rep_stat </td><td> <a href="../api_cxx/rep_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::repmgr_stat </td><td> <a href="../api_cxx/repmgr_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
|
||||
<tr><td align=right>DbSequence::stat </td><td> <a href="../api_cxx/seq_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_stat </td><td> <a href="../api_cxx/txn_stat.html#DB_STAT_CLEAR">DB_STAT_CLEAR</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_stat </td><td> <a href="../api_cxx/lock_stat.html#DB_STAT_LOCK_CONF">DB_STAT_LOCK_CONF</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_stat </td><td> <a href="../api_cxx/lock_stat.html#DB_STAT_LOCK_LOCKERS">DB_STAT_LOCK_LOCKERS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_stat </td><td> <a href="../api_cxx/lock_stat.html#DB_STAT_LOCK_OBJECTS">DB_STAT_LOCK_OBJECTS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_stat </td><td> <a href="../api_cxx/lock_stat.html#DB_STAT_LOCK_PARAMS">DB_STAT_LOCK_PARAMS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::memp_stat </td><td> <a href="../api_cxx/memp_stat.html#DB_STAT_MEMP_HASH">DB_STAT_MEMP_HASH</a></td></tr>
|
||||
<tr><td align=right>DbEnv::stat_print </td><td> <a href="../api_cxx/env_stat.html#DB_STAT_SUBSYSTEM">DB_STAT_SUBSYSTEM</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_THREAD">DB_THREAD</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_THREAD">DB_THREAD</a></td></tr>
|
||||
<tr><td align=right>DbSequence::open </td><td> <a href="../api_cxx/seq_open.html#DB_THREAD">DB_THREAD</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/env_set_thread_id_string.html#2">DB_THREADID_STRLEN</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_TIME_NOTGRANTED">DB_TIME_NOTGRANTED</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_TRUNCATE">DB_TRUNCATE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_app_dispatch </td><td> <a href="../api_cxx/env_set_app_dispatch.html#DB_TXN_ABORT">DB_TXN_ABORT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_app_dispatch </td><td> <a href="../api_cxx/env_set_app_dispatch.html#DB_TXN_APPLY">DB_TXN_APPLY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_app_dispatch </td><td> <a href="../api_cxx/env_set_app_dispatch.html#DB_TXN_BACKWARD_ROLL">DB_TXN_BACKWARD_ROLL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_app_dispatch </td><td> <a href="../api_cxx/env_set_app_dispatch.html#DB_TXN_FORWARD_ROLL">DB_TXN_FORWARD_ROLL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
|
||||
<tr><td align=right>DbSequence::get </td><td> <a href="../api_cxx/seq_get.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
|
||||
<tr><td align=right>DbSequence::remove </td><td> <a href="../api_cxx/seq_remove.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_begin </td><td> <a href="../api_cxx/txn_begin.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
|
||||
<tr><td align=right>DbTxn::commit </td><td> <a href="../api_cxx/txn_commit.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a></td></tr>
|
||||
<tr><td align=right>Db::set_flags </td><td> <a href="../api_cxx/db_set_flags.html#DB_TXN_NOT_DURABLE">DB_TXN_NOT_DURABLE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_TXN_NOWAIT">DB_TXN_NOWAIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_begin </td><td> <a href="../api_cxx/txn_begin.html#DB_TXN_NOWAIT">DB_TXN_NOWAIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_app_dispatch </td><td> <a href="../api_cxx/env_set_app_dispatch.html#DB_TXN_PRINT">DB_TXN_PRINT</a></td></tr>
|
||||
<tr><td align=right>Db::cursor </td><td> <a href="../api_cxx/db_cursor.html#DB_TXN_SNAPSHOT">DB_TXN_SNAPSHOT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_TXN_SNAPSHOT">DB_TXN_SNAPSHOT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_begin </td><td> <a href="../api_cxx/txn_begin.html#DB_TXN_SNAPSHOT">DB_TXN_SNAPSHOT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_begin </td><td> <a href="../api_cxx/txn_begin.html#DB_TXN_SYNC">DB_TXN_SYNC</a></td></tr>
|
||||
<tr><td align=right>DbTxn::commit </td><td> <a href="../api_cxx/txn_commit.html#DB_TXN_SYNC">DB_TXN_SYNC</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_begin </td><td> <a href="../api_cxx/txn_begin.html#DB_TXN_WAIT">DB_TXN_WAIT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_TXN_WRITE_NOSYNC">DB_TXN_WRITE_NOSYNC</a></td></tr>
|
||||
<tr><td align=right>DbEnv::txn_begin </td><td> <a href="../api_cxx/txn_begin.html#DB_TXN_WRITE_NOSYNC">DB_TXN_WRITE_NOSYNC</a></td></tr>
|
||||
<tr><td align=right>Db::open </td><td> <a href="../api_cxx/db_open.html#DB_UNKNOWN">DB_UNKNOWN</a></td></tr>
|
||||
<tr><td align=right>Db::set_feedback </td><td> <a href="../api_cxx/db_set_feedback.html#DB_UPGRADE">DB_UPGRADE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_USE_ENVIRON">DB_USE_ENVIRON</a></td></tr>
|
||||
<tr><td align=right>DbEnv::remove </td><td> <a href="../api_cxx/env_remove.html#DB_USE_ENVIRON">DB_USE_ENVIRON</a></td></tr>
|
||||
<tr><td align=right>DbEnv::open </td><td> <a href="../api_cxx/env_open.html#DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::remove </td><td> <a href="../api_cxx/env_remove.html#DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_DEADLOCK">DB_VERB_DEADLOCK</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_FILEOPS">DB_VERB_FILEOPS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_FILEOPS_ALL">DB_VERB_FILEOPS_ALL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_RECOVERY">DB_VERB_RECOVERY</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_REGISTER">DB_VERB_REGISTER</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_REPLICATION">DB_VERB_REPLICATION</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_REPMGR_CONNFAIL">DB_VERB_REPMGR_CONNFAIL</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_REPMGR_MISC">DB_VERB_REPMGR_MISC</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_REP_ELECT">DB_VERB_REP_ELECT</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_REP_LEASE">DB_VERB_REP_LEASE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_REP_MISC">DB_VERB_REP_MISC</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_REP_MSGS">DB_VERB_REP_MSGS</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_REP_SYNC">DB_VERB_REP_SYNC</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_verbose </td><td> <a href="../api_cxx/env_set_verbose.html#DB_VERB_WAITSFOR">DB_VERB_WAITSFOR</a></td></tr>
|
||||
<tr><td align=right>Db::set_feedback </td><td> <a href="../api_cxx/db_set_feedback.html#DB_VERIFY">DB_VERIFY</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/db_verify.html#2">DB_VERIFY_BAD</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/env_open.html#3">DB_VERSION_MISMATCH</a></td></tr>
|
||||
<tr><td align=right>Db::cursor </td><td> <a href="../api_cxx/db_cursor.html#DB_WRITECURSOR">DB_WRITECURSOR</a></td></tr>
|
||||
<tr><td align=right>Db </td><td> <a href="../api_cxx/db_class.html#DB_XA_CREATE">DB_XA_CREATE</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/txn_prepare.html#2">DB_XIDDATASIZE</a></td></tr>
|
||||
<tr><td align=right>DbEnv::set_flags </td><td> <a href="../api_cxx/env_set_flags.html#DB_YIELDCPU">DB_YIELDCPU</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/lock/dead.html#2">deadlocks</a></td></tr>
|
||||
<tr><td align=right>introduction to </td><td> <a href="../ref/debug/intro.html#2">debugging</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/read.html#8">degree</a> 1 isolation</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/read.html#6">degree</a> 2 isolation</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_misc/stability.html#4">degrees</a> of isolation</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/delete.html#2">deleting</a> records</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/curdel.html#2">deleting</a> records with a cursor</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/read.html#10">dirty</a> reads</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_misc/diskspace.html#2">disk</a> space requirements</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/xa/intro.html#2">Distributed</a> Transactions</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_misc/faq.html#3">double</a> buffering</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/db_set_flags.html#5">duplicate</a> data items</td></tr>
|
||||
<tr><td align=right>sorted </td><td> <a href="../api_cxx/db_set_flags.html#6">duplicate</a> data items</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_conf/dup.html#2">duplicate</a> data items</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/curdup.html#2">duplicating</a> a cursor</td></tr>
|
||||
<tr><td align=right>turn off database </td><td> <a href="../api_cxx/db_set_flags.html#4">durability</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/truncate.html#3">emptying</a> a database</td></tr>
|
||||
<tr><td align=right>database </td><td> <a href="../api_cxx/db_set_flags.html#3">encryption</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/env/encrypt.html#2">encryption</a></td></tr>
|
||||
<tr><td align=right>turn off access to a database </td><td> <a href="../api_cxx/env_set_flags.html#8">environment</a></td></tr>
|
||||
<tr><td align=right>database </td><td> <a href="../ref/env/create.html#2">environment</a></td></tr>
|
||||
<tr><td align=right>use </td><td> <a href="../api_cxx/env_open.html#2">environment</a> constants in naming</td></tr>
|
||||
<tr><td align=right>use </td><td> <a href="../api_cxx/env_remove.html#2">environment</a> constants in naming</td></tr>
|
||||
<tr><td align=right>database </td><td> <a href="../ref/env/faq.html#2">environment</a> FAQ</td></tr>
|
||||
<tr><td align=right>fault database </td><td> <a href="../api_cxx/env_set_flags.html#9">environment</a> in during open</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/program/environ.html#2">environment</a> variables</td></tr>
|
||||
<tr><td align=right>introduction to database </td><td> <a href="../ref/env/intro.html#2">environments</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/join.html#2">equality</a> join</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_misc/error.html#2">error</a> handling</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/program/errorret.html#3">error</a> name space</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/program/errorret.html#2">error</a> returns</td></tr>
|
||||
<tr><td align=right>selecting a Queue </td><td> <a href="../ref/am_conf/extentsize.html#2">extent</a> size</td></tr>
|
||||
<tr><td align=right>hot </td><td> <a href="../ref/transapp/hotfail.html#2">failover</a></td></tr>
|
||||
<tr><td align=right>Java </td><td> <a href="../ref/java/faq.html#2">FAQ</a></td></tr>
|
||||
<tr><td align=right>Tcl </td><td> <a href="../ref/tcl/faq.html#2">FAQ</a></td></tr>
|
||||
<tr><td align=right>XA </td><td> <a href="../ref/xa/faq.html#2">FAQ</a></td></tr>
|
||||
<tr><td align=right>configuring without large </td><td> <a href="../ref/build_unix/conf.html#4">file</a> support</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/install/file.html#3">file</a> utility</td></tr>
|
||||
<tr><td align=right>recovery and </td><td> <a href="../ref/transapp/filesys.html#2">filesystem</a> operations</td></tr>
|
||||
<tr><td align=right>remote </td><td> <a href="../ref/env/remote.html#2">filesystems</a></td></tr>
|
||||
<tr><td align=right>page </td><td> <a href="../ref/am_conf/h_ffactor.html#2">fill</a> factor</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/program/ram.html#2">Flash</a> memory configurations</td></tr>
|
||||
<tr><td align=right>configuring a small memory </td><td> <a href="../ref/build_unix/conf.html#12">footprint</a> library</td></tr>
|
||||
<tr><td align=right>Berkeley DB </td><td> <a href="../ref/program/scope.html#3">free-threaded</a> handles</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/freebsd.html#2">FreeBSD</a></td></tr>
|
||||
<tr><td align=right>specifying a database </td><td> <a href="../ref/am_conf/h_hash.html#2">hash</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_conf/h_nelem.html#2">hash</a> table size</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/hpux.html#2">HP-UX</a></td></tr>
|
||||
<tr><td align=right>secondary </td><td> <a href="../ref/am/second.html#3">indices</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/install.html#2">installing</a> Berkeley DB for UNIX systems</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/program/compatible.html#2">interface</a> compatibility</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/irix.html#2">IRIX</a></td></tr>
|
||||
<tr><td align=right>degrees of </td><td> <a href="../ref/am_misc/stability.html#5">isolation</a></td></tr>
|
||||
<tr><td align=right>degree 2 </td><td> <a href="../ref/transapp/read.html#5">isolation</a></td></tr>
|
||||
<tr><td align=right>degree 1 </td><td> <a href="../ref/transapp/read.html#7">isolation</a></td></tr>
|
||||
<tr><td align=right>configuring the </td><td> <a href="../ref/build_unix/conf.html#10">Java</a> API</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/java/compat.html#2">Java</a> compatibility</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/java/conf.html#2">Java</a> configuration</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/java/faq.html#3">Java</a> FAQ</td></tr>
|
||||
<tr><td align=right>equality </td><td> <a href="../ref/am/join.html#3">join</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/dbt_class.html#2">key/data</a> pairs</td></tr>
|
||||
<tr><td align=right>retrieved </td><td> <a href="../ref/am_misc/perm.html#3">key/data</a> permanence</td></tr>
|
||||
<tr><td align=right>database </td><td> <a href="../ref/am_misc/dbsizes.html#2">limits</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/linux.html#2">Linux</a></td></tr>
|
||||
<tr><td align=right>changing compile or </td><td> <a href="../ref/build_unix/flags.html#3">load</a> options</td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#lock">lock</a></td></tr>
|
||||
<tr><td align=right>standard </td><td> <a href="../ref/lock/stdmode.html#2">lock</a> modes</td></tr>
|
||||
<tr><td align=right>allocate a </td><td> <a href="../api_cxx/env_cdsgroup_begin.html#2">locker</a> ID for Berkeley DB Concurrent Data Store</td></tr>
|
||||
<tr><td align=right>ignore </td><td> <a href="../api_cxx/env_set_flags.html#5">locking</a></td></tr>
|
||||
<tr><td align=right>page-level </td><td> <a href="../ref/lock/page.html#2">locking</a></td></tr>
|
||||
<tr><td align=right>two-phase </td><td> <a href="../ref/lock/twopl.html#2">locking</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/lock/nondb.html#2">locking</a> and non-Berkeley DB applications</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/lock/config.html#2">locking</a> configuration</td></tr>
|
||||
<tr><td align=right>Berkeley DB Transactional Data Store </td><td> <a href="../ref/lock/am_conv.html#2">locking</a> conventions</td></tr>
|
||||
<tr><td align=right>Berkeley DB Concurrent Data Store </td><td> <a href="../ref/lock/cam_conv.html#2">locking</a> conventions</td></tr>
|
||||
<tr><td align=right>configure </td><td> <a href="../api_cxx/env_set_flags.html#2">locking</a> for Berkeley DB Concurrent Data Store</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/lock/page.html#3">locking</a> granularity</td></tr>
|
||||
<tr><td align=right>introduction to the </td><td> <a href="../ref/lock/intro.html#2">locking</a> subsystem</td></tr>
|
||||
<tr><td align=right>sizing the </td><td> <a href="../ref/lock/max.html#2">locking</a> subsystem</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/lock/notxn.html#2">locking</a> without transactions</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/log/limits.html#2">log</a> file limits</td></tr>
|
||||
<tr><td align=right>automatic </td><td> <a href="../api_cxx/env_log_set_config.html#4">log</a> file removal</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/logfile.html#2">log</a> file removal</td></tr>
|
||||
<tr><td align=right>pre-zero </td><td> <a href="../api_cxx/env_log_set_config.html#6">log</a> files</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/log/config.html#2">logging</a> configuration</td></tr>
|
||||
<tr><td align=right>introduction to the </td><td> <a href="../ref/log/intro.html#2">logging</a> subsystem</td></tr>
|
||||
<tr><td align=right>retrieving Btree records by </td><td> <a href="../ref/am_conf/bt_recnum.html#3">logical</a> record @number</td></tr>
|
||||
<tr><td align=right>in memory </td><td> <a href="../api_cxx/env_log_set_config.html#5">logs</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/macosx.html#2">Mac</a> OS X</td></tr>
|
||||
<tr><td align=right>turn off database file </td><td> <a href="../api_cxx/env_set_flags.html#6">memory</a> mapping</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/mp/config.html#2">memory</a> pool configuration</td></tr>
|
||||
<tr><td align=right>introduction to the </td><td> <a href="../ref/mp/intro.html#2">memory</a> pool subsystem</td></tr>
|
||||
<tr><td align=right>configuring for </td><td> <a href="../ref/build_win/faq.html#4">MinGW</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/ext/mod.html#3">mod</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#mode">mode</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/program/copy.html#3">moving</a> databases</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/read.html#12">multiversion</a> concurrency control</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/read.html#13">MVCC</a></td></tr>
|
||||
<tr><td align=right>Berkeley DB library </td><td> <a href="../ref/program/namespace.html#2">name</a> spaces</td></tr>
|
||||
<tr><td align=right>file </td><td> <a href="../ref/env/naming.html#2">naming</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/join.html#4">natural</a> join</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/env/remote.html#3">NFS</a> problems</td></tr>
|
||||
<tr><td align=right>retrieving Btree records by logical record </td><td> <a href="../ref/am_conf/bt_recnum.html#2">number</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#obj">obj</a></td></tr>
|
||||
<tr><td align=right>DbEnv::lock_vec </td><td> <a href="../api_cxx/lock_vec.html#op">op</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/open.html#2">opening</a> a database</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/db_set_flags.html#10">ordered</a> retrieval of records from Queue databases</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/osf1.html#2">OSF/1</a></td></tr>
|
||||
<tr><td align=right>selecting a </td><td> <a href="../ref/am_conf/pagesize.html#2">page</a> size</td></tr>
|
||||
<tr><td align=right>ignore database environment </td><td> <a href="../api_cxx/env_set_flags.html#7">panic</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_misc/partial.html#2">partial</a> record storage and retrieval</td></tr>
|
||||
<tr><td align=right></td><td> <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> <a href="../ref/ext/perl.html#2">Perl</a></td></tr>
|
||||
<tr><td align=right>retrieved key/data </td><td> <a href="../ref/am_misc/perm.html#2">permanence</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/ext/php.html#2">PHP</a></td></tr>
|
||||
<tr><td align=right>task/thread </td><td> <a href="../ref/program/faq.html#2">priority</a></td></tr>
|
||||
<tr><td align=right>Berkeley DB </td><td> <a href="../ref/intro/products.html#2">products</a></td></tr>
|
||||
<tr><td align=right>building for </td><td> <a href="../ref/build_unix/intro.html#5">QNX</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/qnx.html#2">QNX</a></td></tr>
|
||||
<tr><td align=right>dirty </td><td> <a href="../ref/transapp/read.html#9">reads</a></td></tr>
|
||||
<tr><td align=right>accessing Btree records by </td><td> <a href="../api_cxx/db_set_flags.html#7">record</a> number</td></tr>
|
||||
<tr><td align=right>logical </td><td> <a href="../ref/am_conf/logrec.html#2">record</a> numbers</td></tr>
|
||||
<tr><td align=right>managing </td><td> <a href="../ref/am_conf/recno.html#2">record-based</a> databases</td></tr>
|
||||
<tr><td align=right>logically renumbering </td><td> <a href="../ref/am_conf/renumber.html#2">records</a></td></tr>
|
||||
<tr><td align=right>Berkeley DB </td><td> <a href="../ref/transapp/reclimit.html#2">recoverability</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/db_set_flags.html#11">renumbering</a> records in Recno databases</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/read.html#2">repeatable</a> reads</td></tr>
|
||||
<tr><td align=right>introduction to </td><td> <a href="../ref/rep/intro.html#2">replication</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/xa/intro.html#3">Resource</a> Manager</td></tr>
|
||||
<tr><td align=right>XA </td><td> <a href="../ref/xa/xa_intro.html#3">Resource</a> Manager</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/get.html#2">retrieving</a> records</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_misc/get_bulk.html#2">retrieving</a> records in bulk</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/curget.html#2">retrieving</a> records with a cursor</td></tr>
|
||||
<tr><td align=right>turn off </td><td> <a href="../api_cxx/db_set_flags.html#8">reverse</a> splits in Btree databases</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/rpc/client.html#2">RPC</a> client</td></tr>
|
||||
<tr><td align=right>configuring a </td><td> <a href="../ref/build_unix/conf.html#11">RPC</a> client/server</td></tr>
|
||||
<tr><td align=right>introduction to </td><td> <a href="../ref/rpc/intro.html#2">rpc</a> client/server</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/rpc/faq.html#2">RPC</a> FAQ</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/rpc/server.html#2">RPC</a> server</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_s60/notes.html#2">S60</a> notes</td></tr>
|
||||
<tr><td align=right>database </td><td> <a href="../ref/am/verify.html#3">salvage</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/sco.html#2">SCO</a></td></tr>
|
||||
<tr><td align=right>Berkeley DB handle </td><td> <a href="../ref/program/scope.html#2">scope</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/second.html#2">secondary</a> indices</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/env/security.html#2">security</a></td></tr>
|
||||
<tr><td align=right>introduction to </td><td> <a href="../ref/sequence/intro.html#2">sequences</a></td></tr>
|
||||
<tr><td align=right>disabling </td><td> <a href="../ref/build_unix/conf.html#5">shared</a> libraries</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/shlib.html#2">shared</a> libraries</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/program/appsignals.html#2">signal</a> handling</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/read.html#11">snapshot</a> isolation</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/solaris.html#2">Solaris</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/distrib/layout.html#2">source</a> code layout</td></tr>
|
||||
<tr><td align=right>turn off reverse </td><td> <a href="../api_cxx/db_set_flags.html#9">splits</a> in Btree databases</td></tr>
|
||||
<tr><td align=right>cursor </td><td> <a href="../ref/am_misc/stability.html#3">stability</a></td></tr>
|
||||
<tr><td align=right>cursor </td><td> <a href="../ref/transapp/read.html#3">stability</a></td></tr>
|
||||
<tr><td align=right>disabling </td><td> <a href="../ref/build_unix/conf.html#6">static</a> libraries</td></tr>
|
||||
<tr><td align=right>database </td><td> <a href="../ref/am/stat.html#2">statistics</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/put.html#2">storing</a> records</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/curput.html#2">storing</a> records with a cursor</td></tr>
|
||||
<tr><td align=right>configure for </td><td> <a href="../api_cxx/env_set_flags.html#12">stress</a> testing</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/sunos.html#2">SunOS</a></td></tr>
|
||||
<tr><td align=right>loading Berkeley DB with </td><td> <a href="../ref/tcl/intro.html#2">Tcl</a></td></tr>
|
||||
<tr><td align=right>using Berkeley DB with </td><td> <a href="../ref/tcl/using.html#2">Tcl</a></td></tr>
|
||||
<tr><td align=right>configuring the </td><td> <a href="../ref/build_unix/conf.html#13">Tcl</a> API</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/tcl/program.html#2">Tcl</a> API programming notes</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/tcl/faq.html#3">Tcl</a> FAQ</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../api_cxx/env_set_tmp_dir.html#2">temporary</a> files</td></tr>
|
||||
<tr><td align=right>configuring the </td><td> <a href="../ref/build_unix/conf.html#14">test</a> suite</td></tr>
|
||||
<tr><td align=right>running the </td><td> <a href="../ref/test/run.html#2">test</a> suite</td></tr>
|
||||
<tr><td align=right>running the </td><td> <a href="../ref/build_unix/test.html#2">test</a> suite under UNIX</td></tr>
|
||||
<tr><td align=right>running the </td><td> <a href="../ref/build_win/test.html#2">test</a> suite under Windows</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am_conf/re_source.html#2">text</a> backing files</td></tr>
|
||||
<tr><td align=right>pre-loading </td><td> <a href="../api_cxx/db_set_flags.html#12">text</a> files into Recno databases</td></tr>
|
||||
<tr><td align=right>loading </td><td> <a href="../ref/dumpload/text.html#2">text</a> into databases</td></tr>
|
||||
<tr><td align=right>dumping/loading </td><td> <a href="../ref/dumpload/utility.html#2">text</a> to/from databases</td></tr>
|
||||
<tr><td align=right>building </td><td> <a href="../ref/program/mt.html#2">threaded</a> applications</td></tr>
|
||||
<tr><td align=right>lock </td><td> <a href="../ref/lock/timeout.html#2">timeouts</a></td></tr>
|
||||
<tr><td align=right>transaction </td><td> <a href="../ref/lock/timeout.html#3">timeouts</a></td></tr>
|
||||
<tr><td align=right>turn off synchronous </td><td> <a href="../api_cxx/env_set_flags.html#10">transaction</a> commit</td></tr>
|
||||
<tr><td align=right>turn off synchronous </td><td> <a href="../api_cxx/env_set_flags.html#11">transaction</a> commit</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/txn/config.html#2">transaction</a> configuration</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/faq.html#2">transaction</a> FAQ</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/txn/limits.html#2">transaction</a> limits</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/xa/build.html#2">Transaction</a> Manager</td></tr>
|
||||
<tr><td align=right>administering </td><td> <a href="../ref/transapp/admin.html#2">transaction</a> protected applications</td></tr>
|
||||
<tr><td align=right>archival in </td><td> <a href="../ref/transapp/archival.html#2">transaction</a> protected applications</td></tr>
|
||||
<tr><td align=right>checkpoints in </td><td> <a href="../ref/transapp/checkpoint.html#2">transaction</a> protected applications</td></tr>
|
||||
<tr><td align=right>deadlock detection in </td><td> <a href="../ref/transapp/deadlock.html#2">transaction</a> protected applications</td></tr>
|
||||
<tr><td align=right>recovery in </td><td> <a href="../ref/transapp/recovery.html#2">transaction</a> protected applications</td></tr>
|
||||
<tr><td align=right>introduction to the </td><td> <a href="../ref/txn/intro.html#2">transaction</a> subsystem</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/throughput.html#2">transaction</a> throughput</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/tune.html#2">transaction</a> tuning</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/transapp/intro.html#2">Transactional</a> Data Store</td></tr>
|
||||
<tr><td align=right>nested </td><td> <a href="../ref/transapp/nested.html#2">transactions</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/am/truncate.html#2">truncating</a> a database</td></tr>
|
||||
<tr><td align=right>access method </td><td> <a href="../ref/am_misc/tune.html#3">tuning</a></td></tr>
|
||||
<tr><td align=right>transaction </td><td> <a href="../ref/transapp/tune.html#3">tuning</a></td></tr>
|
||||
<tr><td align=right>configuring Berkeley DB with the </td><td> <a href="../ref/xa/xa_config.html#2">Tuxedo</a> System</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_unix/ultrix.html#2">Ultrix</a></td></tr>
|
||||
<tr><td align=right>building for </td><td> <a href="../ref/build_unix/intro.html#4">UNIX</a></td></tr>
|
||||
<tr><td align=right>building for </td><td> <a href="../ref/build_unix/notes.html#3">UNIX</a> FAQ</td></tr>
|
||||
<tr><td align=right>configuring Berkeley DB for </td><td> <a href="../ref/build_unix/conf.html#3">UNIX</a> systems</td></tr>
|
||||
<tr><td align=right>Patches, </td><td> <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> <a href="../ref/am/upgrade.html#2">upgrading</a> databases</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.2.0/toc.html#2">Upgrading</a> to release 2.0</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.3.0/toc.html#2">Upgrading</a> to release 3.0</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.3.1/toc.html#2">Upgrading</a> to release 3.1</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.3.2/toc.html#2">Upgrading</a> to release 3.2</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.3.3/toc.html#2">Upgrading</a> to release 3.3</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.4.0/toc.html#2">Upgrading</a> to release 4.0</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.4.1/toc.html#2">Upgrading</a> to release 4.1</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.4.2/toc.html#2">Upgrading</a> to release 4.2</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.4.3/toc.html#2">Upgrading</a> to release 4.3</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.4.4/toc.html#2">Upgrading</a> to release 4.4</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.4.5/toc.html#2">Upgrading</a> to release 4.5</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.4.6/toc.html#2">Upgrading</a> to release 4.6</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/upgrade.4.7/toc.html#2">Upgrading</a> to release 4.7</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/arch/utilities.html#2">utilities</a></td></tr>
|
||||
<tr><td align=right>database </td><td> <a href="../ref/am/verify.html#2">verification</a></td></tr>
|
||||
<tr><td align=right>building for </td><td> <a href="../ref/build_vxworks/faq.html#3">VxWorks</a> FAQ</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_vxworks/notes.html#2">VxWorks</a> notes</td></tr>
|
||||
<tr><td align=right>running the test suite under </td><td> <a href="../ref/build_win/test.html#3">Windows</a></td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_wince/notes.html#2">Windows</a> CE notes</td></tr>
|
||||
<tr><td align=right>building for </td><td> <a href="../ref/build_win/faq.html#3">Windows</a> FAQ</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/build_win/notes.html#2">Windows</a> notes</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/xa/faq.html#3">XA</a> FAQ</td></tr>
|
||||
<tr><td align=right></td><td> <a href="../ref/xa/xa_intro.html#2">XA</a> Resource Manager</td></tr>
|
||||
<tr><td align=right></td><td> <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>
|
||||
193
docs/api_cxx/db_associate.html
Normal file
193
docs/api_cxx/db_associate.html
Normal file
@@ -0,0 +1,193 @@
|
||||
<!--$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::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::associate</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::associate(DbTxn *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::associate</b>
|
||||
<p>The Db::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::associate method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/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_cxx/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_cxx/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_cxx/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_cxx/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_cxx/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_cxx/dbt_class.html">Dbt</a> in the
|
||||
array of returned <a href="../api_cxx/dbt_class.html">Dbt</a>'s to indicate that Berkeley DB should free the
|
||||
memory referenced by that particular <a href="../api_cxx/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_cxx/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_cxx/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::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::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 associate method called should be a method of 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_cxx/env_open.html#DB_THREAD">DB_THREAD</a> flag it is safe to use it in multiple threads
|
||||
of control after the Db::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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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::associate method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
108
docs/api_cxx/db_class.html
Normal file
108
docs/api_cxx/db_class.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<!--$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</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</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
class Db {
|
||||
public:
|
||||
Db(DbEnv *dbenv, u_int32_t flags);
|
||||
~Db();
|
||||
<p>
|
||||
DB *Db::get_DB();
|
||||
const DB *Db::get_const_DB() const;
|
||||
static Db *Db::get_Db(DB *db);
|
||||
static const Db *Db::get_const_Db(const DB *db);
|
||||
...
|
||||
};
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db</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_cxx/env_open.html#DB_THREAD">DB_THREAD</a> flag is
|
||||
specified to the <a href="../api_cxx/db_open.html">Db::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_cxx/db_close.html">Db::close</a>, <a href="../api_cxx/db_remove.html">Db::remove</a>,
|
||||
<a href="../api_cxx/db_rename.html">Db::rename</a>, or <a href="../api_cxx/db_verify.html">Db::verify</a> methods are called, the handle may
|
||||
not be accessed again, regardless of the method's return.</p>
|
||||
<p>The constructor creates a Db object that is the handle for a
|
||||
Berkeley DB database. The constructor allocates memory internally; calling
|
||||
the <a href="../api_cxx/db_close.html">Db::close</a>, <a href="../api_cxx/db_remove.html">Db::remove</a> or <a href="../api_cxx/db_rename.html">Db::rename</a> methods will
|
||||
free that memory.</p>
|
||||
<p>Each Db object has an associated DB struct, which is
|
||||
used by the underlying implementation of Berkeley DB and its C-language API.
|
||||
The Db::get_DB method returns a pointer to this struct. Given a const
|
||||
Db object, Db::get_const_DB returns a const pointer to the
|
||||
same struct.</p>
|
||||
<p>Given a DB struct, the Db::get_Db method returns the
|
||||
corresponding Db object, if there is one. If the DB
|
||||
object was not associated with a Db (that is, it was not
|
||||
returned from a call to Db::get_DB), then the result of Db::get_Db is
|
||||
undefined. Given a const DB struct, Db::get_const_Db returns
|
||||
the associated const Db object, if there is one.</p>
|
||||
<p>These methods may be useful for Berkeley DB applications including both C
|
||||
and C++ language software. It should not be necessary to use these
|
||||
calls in a purely C++ application.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>dbenv</b><ul compact><li>If no <b>dbenv</b> value is specified, the database is standalone; that
|
||||
is, it is not part of any Berkeley DB environment.
|
||||
<p>If a <b>dbenv</b> value is specified, 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 by bitwise inclusively <b>OR</b>'ing together one
|
||||
or more of the following values:
|
||||
<br>
|
||||
<b><a name="DB_CXX_NO_EXCEPTIONS">DB_CXX_NO_EXCEPTIONS</a></b><ul compact><li>The Berkeley DB C++ API supports two different error behaviors. By default,
|
||||
whenever an error occurs, an exception is thrown that encapsulates the
|
||||
error information. This generally allows for cleaner logic for
|
||||
transaction processing because a try block can surround a single
|
||||
transaction. However, if DB_CXX_NO_EXCEPTIONS is specified,
|
||||
exceptions are not thrown; instead, each individual function returns an
|
||||
error code.
|
||||
<p>If <b>dbenv</b> is not null, this flag is ignored, and the error behavior
|
||||
of the specified environment is used instead.</p></ul>
|
||||
<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>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
Db
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
95
docs/api_cxx/db_close.html
Normal file
95
docs/api_cxx/db_close.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!--$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::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::close</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::close(u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::close</b>
|
||||
<p>The Db::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_cxx/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_cxx/dbc_class.html">Dbc</a> and
|
||||
<a href="../api_cxx/txn_class.html">DbTxn</a> handles.</p>
|
||||
<p>Because key/data pairs are cached in memory, failing to sync the file
|
||||
with the Db::close or <a href="../api_cxx/db_sync.html">Db::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_cxx/db_class.html">Db</a> concurrently, only a single
|
||||
thread may call the Db::close method.</p>
|
||||
<p>The <a href="../api_cxx/db_class.html">Db</a> handle may not be accessed again after Db::close is
|
||||
called, regardless of its return.</p>
|
||||
<p>The Db::close method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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::close, atomically replace the original database with the
|
||||
updated copy.</p></ul>
|
||||
<br></ul>
|
||||
<br>
|
||||
<br><b>Errors</b>
|
||||
<p>The Db::close method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_compact.html
Normal file
146
docs/api_cxx/db_compact.html
Normal file
@@ -0,0 +1,146 @@
|
||||
<!--$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::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::compact</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::compact(DbTxn *txnid,
|
||||
Dbt *start, Dbt *stop, DB_COMPACT *c_data, u_int32_t flags, Dbt *end);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::compact</b>
|
||||
<p>The Db::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::compact method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/txn_begin.html">DbEnv::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::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::compact method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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>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>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Db::compact method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Db::compact method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
100
docs/api_cxx/db_cursor.html
Normal file
100
docs/api_cxx/db_cursor.html
Normal file
@@ -0,0 +1,100 @@
|
||||
<!--$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::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::cursor</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::cursor(DbTxn *txnid, Dbc **cursorp, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::cursor</b>
|
||||
<p>The Db::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::cursor method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/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_cxx/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_cxx/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_cxx/env_set_flags.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a> flag is specified to the
|
||||
<a href="../api_cxx/env_set_flags.html">DbEnv::set_flags</a> or <a href="../api_cxx/db_open.html">Db::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_cxx/txn_begin.html">DbEnv::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::cursor method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/dbc_class.html">Dbc</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/dbc_list.html">Database Cursors and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
102
docs/api_cxx/db_del.html
Normal file
102
docs/api_cxx/db_del.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<!--$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::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::del</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::del(DbTxn *txnid, Dbt *key, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::del</b>
|
||||
<p>The Db::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_cxx/db_associate.html">Db::associate</a> method, the Db::del method deletes the
|
||||
key/data pair from the primary database and all secondary indices.</p>
|
||||
<p>The Db::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::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::del method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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::del method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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>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>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Db::del method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Db::del method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
83
docs/api_cxx/db_err.html
Normal file
83
docs/api_cxx/db_err.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!--$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::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::err</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
Db::err(int error, const char *fmt, ...);
|
||||
<p>
|
||||
Db::errx(const char *fmt, ...);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::err</b>
|
||||
<p>The <a href="../api_cxx/env_err.html">DbEnv::err</a>, <a href="../api_cxx/env_err.html">DbEnv::errx</a>, Db::err and
|
||||
Db::errx methods provide error-messaging functionality for
|
||||
applications written using the Berkeley DB library.</p>
|
||||
<p>The Db::err and <a href="../api_cxx/env_err.html">DbEnv::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_cxx/env_set_errcall.html">DbEnv::set_errcall</a> method, any prefix string specified using the
|
||||
<a href="../api_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a> method, followed by two separating characters: a colon
|
||||
and a <space> 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 <space> 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_cxx/env_strerror.html">DbEnv::strerror</a> method.</ul>
|
||||
<br>
|
||||
</blockquote>
|
||||
<p>The Db::errx and <a href="../api_cxx/env_err.html">DbEnv::errx</a> methods are the same as the
|
||||
Db::err and <a href="../api_cxx/env_err.html">DbEnv::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_cxx/db_set_errcall.html">Db::set_errcall</a>
|
||||
and <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a>), that function is called with two
|
||||
parameters: any prefix string specified (see <a href="../api_cxx/db_set_errpfx.html">Db::set_errpfx</a> and
|
||||
<a href="../api_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a>) and the error message.</p>
|
||||
<p>If a C library FILE * has been set (see <a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a> and
|
||||
<a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a>), the error message is written to that output
|
||||
stream.</p>
|
||||
<p>If a C++ ostream has been set
|
||||
(see <a href="../api_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> and <a href="../api_cxx/db_set_error_stream.html">Db::set_error_stream</a>),
|
||||
the error message is written to that 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_cxx/env_err.html">DbEnv::err</a> and Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_exists.html
Normal file
82
docs/api_cxx/db_exists.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!--$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::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::exists</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::exists(DbTxn *txnid, Dbt *key, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::exists</b>
|
||||
<p>The Db::exists method returns if the specified key appears in the
|
||||
database.</p>
|
||||
<p>The Db::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::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::exists method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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::exists method will not hold locks across
|
||||
Berkeley DB calls in non-transactional operations, the <a href="../api_cxx/dbc_get.html#DB_RMW">DB_RMW</a> flag to
|
||||
the Db::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_cxx/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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::cdsgroup_begin</a>; otherwise NULL.
|
||||
</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_fd.html
Normal file
57
docs/api_cxx/db_fd.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!--$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::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::fd</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::fd(int *fdp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::fd</b>
|
||||
<p>The Db::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_cxx/db_open.html">Db::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::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::fd method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
212
docs/api_cxx/db_get.html
Normal file
212
docs/api_cxx/db_get.html
Normal file
@@ -0,0 +1,212 @@
|
||||
<!--$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::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::get</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::get(DbTxn *txnid, Dbt *key, Dbt *data, u_int32_t flags);
|
||||
<p>
|
||||
int
|
||||
Db::pget(DbTxn *txnid, Dbt *key, Dbt *pkey, Dbt *data, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get</b>
|
||||
<p>The Db::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::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_cxx/dbc_get.html">Dbc::get</a> for details.</p>
|
||||
<p>When called on a database that has been made into a secondary index
|
||||
using the <a href="../api_cxx/db_associate.html">Db::associate</a> method, the Db::get and
|
||||
Db::pget methods return the key from the secondary index and the data
|
||||
item from the primary database. In addition, the Db::pget method
|
||||
returns the key from the primary database. In databases that are not
|
||||
secondary indices, the Db::pget method will always fail.</p>
|
||||
<p>The Db::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::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::get method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>data</b><ul compact><li>The data <a href="../api_cxx/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_cxx/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::get method
|
||||
with the DB_CONSUME_WAIT flag
|
||||
may return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or throw a
|
||||
<a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.
|
||||
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::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::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_cxx/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_cxx/db_associate.html">Db::associate</a> method.</p>
|
||||
<p>See
|
||||
<a href="../api_cxx/dbt_bulk_class.html">DbMultipleDataIterator</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_cxx/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::get method will not hold locks across
|
||||
Berkeley DB calls in non-transactional operations, the <a href="../api_cxx/dbc_get.html#DB_RMW">DB_RMW</a> flag
|
||||
to the Db::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_cxx/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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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::get method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_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_cxx/env_open.html#DB_THREAD">DB_THREAD</a> flag was specified to the <a href="../api_cxx/db_open.html">Db::open</a> method and
|
||||
none of the <a href="../api_cxx/dbt_class.html#DB_DBT_MALLOC">DB_DBT_MALLOC</a>, <a href="../api_cxx/dbt_class.html#DB_DBT_REALLOC">DB_DBT_REALLOC</a> or
|
||||
<a href="../api_cxx/dbt_class.html#DB_DBT_USERMEM">DB_DBT_USERMEM</a> flags were set in the <a href="../api_cxx/dbt_class.html">Dbt</a>;
|
||||
the Db::pget method was called with a <a href="../api_cxx/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>
|
||||
<p>If the requested item could not be returned due to undersized buffer, the Db::get method will fail and
|
||||
either return DB_BUFFER_SMALL or
|
||||
throw a <a href="../api_cxx/memp_class.html">DbMemoryException</a> exception.</p>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Db::get method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Db::get method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<p>If 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,
|
||||
the Db::get method will fail and
|
||||
either return DB_LOCK_NOTGRANTED or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
69
docs/api_cxx/db_get_byteswapped.html
Normal file
69
docs/api_cxx/db_get_byteswapped.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!--$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::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::get_byteswapped</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::get_byteswapped(int *isswapped);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_byteswapped</b>
|
||||
<p>The Db::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::get_byteswapped method may not be called before the <a href="../api_cxx/db_open.html">Db::open</a> method is called.</p>
|
||||
<p>The Db::get_byteswapped method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::get_byteswapped method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_get_mpf.html
Normal file
43
docs/api_cxx/db_get_mpf.html
Normal 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::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::get_mpf</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
DbMpoolFile *
|
||||
Db::get_mpf();
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_mpf</b>
|
||||
<p>The Db::get_mpf method returns the handle for the cache file underlying the database.</p>
|
||||
<p>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_get_type.html
Normal file
65
docs/api_cxx/db_get_type.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!--$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::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::get_type</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::get_type(DBTYPE *type);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_type</b>
|
||||
<p>The Db::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_cxx/db_open.html">Db::open</a> with the <b>type</b>
|
||||
parameter set to DB_UNKNOWN.</p>
|
||||
<p>The Db::get_type method may not be called before the <a href="../api_cxx/db_open.html">Db::open</a> method is called.</p>
|
||||
<p>The Db::get_type method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::get_type method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_getenv.html
Normal file
43
docs/api_cxx/db_getenv.html
Normal 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::getenv</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::getenv</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
DbEnv *
|
||||
Db::get_env();
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::getenv</b>
|
||||
<p>The Db::getenv method returns the handle for the database environment underlying the database.</p>
|
||||
<p>The Db::getenv 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
138
docs/api_cxx/db_join.html
Normal file
138
docs/api_cxx/db_join.html
Normal file
@@ -0,0 +1,138 @@
|
||||
<!--$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::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::join</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::join(Dbc **curslist, Dbc **dbcp, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::join</b>
|
||||
<p>The Db::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::join method method is called using the <a href="../api_cxx/db_class.html">Db</a> handle of
|
||||
the primary database.</p>
|
||||
<p>The join cursor supports only the <a href="../api_cxx/dbc_get.html">Dbc::get</a> and <b>dbc_close</b>
|
||||
cursor functions:</p>
|
||||
<br>
|
||||
<b><a href="../api_cxx/dbc_get.html">Dbc::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_cxx/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_cxx/dbc_close.html">Dbc::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::join method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/dbc_get.html">Dbc::get</a> call with the <a href="../api_cxx/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::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::join.</ul>
|
||||
<br></ul>
|
||||
<br>
|
||||
<br><b>Errors</b>
|
||||
<p>The Db::join method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/dbc_get.html">Dbc::get</a> or <a href="../api_cxx/dbc_close.html">Dbc::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
110
docs/api_cxx/db_key_range.html
Normal file
110
docs/api_cxx/db_key_range.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!--$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::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::key_range</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::key_range(DbTxn *txnid
|
||||
Dbt *key, DB_KEY_RANGE *key_range, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::key_range</b>
|
||||
<p>The Db::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::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::key_range method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>key</b><ul compact><li>The key <a href="../api_cxx/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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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::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::key_range method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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 underlying database was not of type Btree; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Db::key_range method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Db::key_range method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_list.html
Normal file
71
docs/api_cxx/db_list.html
Normal 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_cxx/db_class.html">Db</a></td><td>Create a database handle</td></tr>
|
||||
<!--Db::associate--><tr><td><a href="../api_cxx/db_associate.html">Db::associate</a></td><td>Associate a secondary index</td></tr>
|
||||
<!--Db::close--><tr><td><a href="../api_cxx/db_close.html">Db::close</a></td><td>Close a database</td></tr>
|
||||
<!--Db::compact--><tr><td><a href="../api_cxx/db_compact.html">Db::compact</a></td><td>Compact a database</td></tr>
|
||||
<!--Db::cursor--><tr><td><a href="../api_cxx/db_cursor.html">Db::cursor</a></td><td>Create a cursor</td></tr>
|
||||
<!--Db::del--><tr><td><a href="../api_cxx/db_del.html">Db::del</a></td><td>Delete items from a database</td></tr>
|
||||
<!--Db::err--><tr><td><a href="../api_cxx/db_err.html">Db::err</a>, <a href="../api_cxx/db_err.html">Db::errx</a></td><td>Error message</td></tr>
|
||||
<!--Db::exists--><tr><td><a href="../api_cxx/db_exists.html">Db::exists</a></td><td>Return if an item appears in a database</td></tr>
|
||||
<!--Db::fd--><tr><td><a href="../api_cxx/db_fd.html">Db::fd</a></td><td>Return a file descriptor from a database</td></tr>
|
||||
<!--Db::get--><tr><td><a href="../api_cxx/db_get.html">Db::get</a>, <a href="../api_cxx/db_get.html">Db::pget</a></td><td>Get items from a database</td></tr>
|
||||
<!--Db::get_byteswapped--><tr><td><a href="../api_cxx/db_get_byteswapped.html">Db::get_byteswapped</a></td><td>Return if the underlying database is in host order</td></tr>
|
||||
<!--Db::get_type--><tr><td><a href="../api_cxx/db_get_type.html">Db::get_type</a></td><td>Return the database type</td></tr>
|
||||
<!--Db::join--><tr><td><a href="../api_cxx/db_join.html">Db::join</a></td><td>Perform a database join on cursors</td></tr>
|
||||
<!--Db::key_range--><tr><td><a href="../api_cxx/db_key_range.html">Db::key_range</a></td><td>Return estimate of key location</td></tr>
|
||||
<!--Db::open--><tr><td><a href="../api_cxx/db_open.html">Db::open</a></td><td>Open a database</td></tr>
|
||||
<!--Db::put--><tr><td><a href="../api_cxx/db_put.html">Db::put</a></td><td>Store items into a database</td></tr>
|
||||
<!--Db::remove--><tr><td><a href="../api_cxx/db_remove.html">Db::remove</a></td><td>Remove a database</td></tr>
|
||||
<!--Db::rename--><tr><td><a href="../api_cxx/db_rename.html">Db::rename</a></td><td>Rename a database</td></tr>
|
||||
<!--Db::set_priority--><tr><td><a href="../api_cxx/db_set_priority.html">Db::set_priority</a></td><td>Set cache page priority</td></tr>
|
||||
<!--Db::stat--><tr><td><a href="../api_cxx/db_stat.html">Db::stat</a>, <a href="../api_cxx/db_stat.html">Db::stat_print</a></td><td>Database statistics</td></tr>
|
||||
<!--Db::sync--><tr><td><a href="../api_cxx/db_sync.html">Db::sync</a></td><td>Flush a database to stable storage</td></tr>
|
||||
<!--Db::truncate--><tr><td><a href="../api_cxx/db_truncate.html">Db::truncate</a></td><td>Empty a database</td></tr>
|
||||
<!--Db::upgrade--><tr><td><a href="../api_cxx/db_upgrade.html">Db::upgrade</a></td><td>Upgrade a database</td></tr>
|
||||
<!--Db::verify--><tr><td><a href="../api_cxx/db_verify.html">Db::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_cxx/db_set_alloc.html">Db::set_alloc</a></td><td>Set local space allocation functions</td></tr>
|
||||
<!--Db::set_cachesize--><tr><td><a href="../api_cxx/db_set_cachesize.html">Db::set_cachesize</a></td><td>Set the database cache size</td></tr>
|
||||
<!--Db::set_dup_compare--><tr><td><a href="../api_cxx/db_set_dup_compare.html">Db::set_dup_compare</a></td><td>Set a duplicate comparison function</td></tr>
|
||||
<!--Db::set_encrypt--><tr><td><a href="../api_cxx/db_set_encrypt.html">Db::set_encrypt</a></td><td>Set the database cryptographic key</td></tr>
|
||||
<!--Db::set_errcall--><tr><td><a href="../api_cxx/db_set_errcall.html">Db::set_errcall</a>, <a href="../api_cxx/db_set_msgcall.html">Db::set_msgcall</a></td><td>Set error and informational message callback</td></tr>
|
||||
<!--Db::set_errfile--><tr><td><a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a>, <a href="../api_cxx/db_set_msgfile.html">Db::set_msgfile</a></td><td>Set error and informational message FILE</td></tr>
|
||||
<!--Db::set_error_stream--><tr><td><a href="../api_cxx/db_set_error_stream.html">Db::set_error_stream</a>, <a href="../api_cxx/db_set_msg_stream.html">Db::set_message_stream</a></td><td>Set error and informational message output stream</td></tr>
|
||||
<!--Db::set_errpfx--><tr><td><a href="../api_cxx/db_set_errpfx.html">Db::set_errpfx</a></td><td>Set error message prefix</td></tr>
|
||||
<!--Db::set_feedback--><tr><td><a href="../api_cxx/db_set_feedback.html">Db::set_feedback</a></td><td>Set feedback callback</td></tr>
|
||||
<!--Db::set_flags--><tr><td><a href="../api_cxx/db_set_flags.html">Db::set_flags</a></td><td>General database configuration</td></tr>
|
||||
<!--Db::set_lorder--><tr><td><a href="../api_cxx/db_set_lorder.html">Db::set_lorder</a></td><td>Set the database byte order</td></tr>
|
||||
<!--Db::set_pagesize--><tr><td><a href="../api_cxx/db_set_pagesize.html">Db::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_cxx/db_set_append_recno.html">Db::set_append_recno</a></td><td>Set record append callback</td></tr>
|
||||
<!--Db::set_bt_compare--><tr><td><a href="../api_cxx/db_set_bt_compare.html">Db::set_bt_compare</a></td><td>Set a Btree comparison function</td></tr>
|
||||
<!--Db::set_bt_minkey--><tr><td><a href="../api_cxx/db_set_bt_minkey.html">Db::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_cxx/db_set_bt_prefix.html">Db::set_bt_prefix</a></td><td>Set a Btree prefix comparison function</td></tr>
|
||||
<!--Db::set_re_delim--><tr><td><a href="../api_cxx/db_set_re_delim.html">Db::set_re_delim</a></td><td>Set the variable-length record delimiter</td></tr>
|
||||
<!--Db::set_re_len--><tr><td><a href="../api_cxx/db_set_re_len.html">Db::set_re_len</a></td><td>Set the fixed-length record length</td></tr>
|
||||
<!--Db::set_re_pad--><tr><td><a href="../api_cxx/db_set_re_pad.html">Db::set_re_pad</a></td><td>Set the fixed-length record pad byte</td></tr>
|
||||
<!--Db::set_re_source--><tr><td><a href="../api_cxx/db_set_re_source.html">Db::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_cxx/db_set_h_compare.html">Db::set_h_compare</a></td><td>Set a Hash comparison function</td></tr>
|
||||
<!--Db::set_h_ffactor--><tr><td><a href="../api_cxx/db_set_h_ffactor.html">Db::set_h_ffactor</a></td><td>Set the Hash table density</td></tr>
|
||||
<!--Db::set_h_hash--><tr><td><a href="../api_cxx/db_set_h_hash.html">Db::set_h_hash</a></td><td>Set a hashing function</td></tr>
|
||||
<!--Db::set_h_nelem--><tr><td><a href="../api_cxx/db_set_h_nelem.html">Db::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_cxx/db_set_q_extentsize.html">Db::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>
|
||||
275
docs/api_cxx/db_open.html
Normal file
275
docs/api_cxx/db_open.html
Normal file
@@ -0,0 +1,275 @@
|
||||
<!--$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::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::open</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::open(DbTxn *txnid, const char *file,
|
||||
const char *database, DBTYPE type, u_int32_t flags, int mode);
|
||||
<p>
|
||||
int
|
||||
Db::get_dbname(const char **filenamep, const char **dbnamep);
|
||||
<p>
|
||||
int
|
||||
Db::get_multiple()
|
||||
<p>
|
||||
int
|
||||
Db::get_open_flags(u_int32_t *flagsp);
|
||||
<p>
|
||||
int
|
||||
Db::get_transactional()
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::open</b>
|
||||
<p>The Db::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_cxx/dbt_class.html">Dbt</a> for more information.</p>
|
||||
<p>Calling Db::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::open method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
If Db::open fails, the <a href="../api_cxx/db_close.html">Db::close</a> method must be called to
|
||||
discard the <a href="../api_cxx/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::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::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_cxx/env_set_mp_mmapsize.html">DbEnv::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_cxx/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_cxx/db_class.html">Db</a> handle returned by Db::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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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_cxx/db_class.html">Db</a> handle
|
||||
requires the <a href="../api_cxx/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::open will
|
||||
automatically determine its type. The <a href="../api_cxx/db_get_type.html">Db::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::open is affected by any database directory specified using
|
||||
the <a href="../api_cxx/env_set_data_dir.html">DbEnv::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::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>
|
||||
<br>
|
||||
<b>ENOENT</b><ul compact><li>The file or directory does not exist.</ul>
|
||||
<br>
|
||||
<p>The Db::open method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or return one of
|
||||
the following non-zero errors:</p>
|
||||
<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_cxx/env_open.html#DB_THREAD">DB_THREAD</a> flag was specified and fast mutexes are not
|
||||
available for this architecture;
|
||||
the <a href="../api_cxx/env_open.html#DB_THREAD">DB_THREAD</a> flag was specified to Db::open, but was
|
||||
not specified to the <a href="../api_cxx/env_open.html">DbEnv::open</a> call for the environment in
|
||||
which the <a href="../api_cxx/db_class.html">Db</a> handle was created;
|
||||
a backing flat text file was specified with either the <a href="../api_cxx/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>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Db::open method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Db::open method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_dbname</b>
|
||||
<p>The Db::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::get_dbname method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_dbname method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: <a href="../api_cxx/db_open.html">Db::get_multiple</a></b>
|
||||
<p>The <a href="../api_cxx/db_open.html">Db::get_multiple</a> method returns non-zero if the <a href="../api_cxx/db_class.html">Db</a> handle
|
||||
references a physical file supporting multiple databases.</p>
|
||||
<p>In this case, the <a href="../api_cxx/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_cxx/db_open.html">Db::get_multiple</a> method may not be called before the Db::open method is called.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_open_flags</b>
|
||||
<p>The Db::get_open_flags method returns the current open method flags.</p>
|
||||
<p>The Db::get_open_flags method may not be called before the Db::open method is called.</p>
|
||||
<p>The Db::get_open_flags method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>flagsp</b><ul compact><li>The Db::get_open_flags method returns the
|
||||
current open method flags in <b>flagsp</b>.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_transactional</b>
|
||||
<p>The Db::get_transactional method returns non-zero if the <a href="../api_cxx/db_class.html">Db</a>
|
||||
handle has been opened in a transactional mode.</p>
|
||||
<p>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
134
docs/api_cxx/db_put.html
Normal file
134
docs/api_cxx/db_put.html
Normal file
@@ -0,0 +1,134 @@
|
||||
<!--$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::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::put</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::put(DbTxn *txnid, Dbt *key, Dbt *data, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::put</b>
|
||||
<p>The Db::put method stores key/data pairs in the database. The default
|
||||
behavior of the Db::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::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::put method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::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::put method will return <a href="../api_cxx/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::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::put method will return <a href="../api_cxx/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_cxx/dbt_class.html">Dbt</a> operated on.</ul>
|
||||
<b>key</b><ul compact><li>The key <a href="../api_cxx/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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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::put method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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>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>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Db::put method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Db::put method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_remove.html
Normal file
94
docs/api_cxx/db_remove.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!--$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::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::remove</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::remove(const char *file, const char *database, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::remove</b>
|
||||
<p>The Db::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_cxx/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::remove method should not be called if the remove is intended
|
||||
to be transactionally safe; the <a href="../api_cxx/env_dbremove.html">DbEnv::dbremove</a> method should be used
|
||||
instead.</p>
|
||||
<p>The Db::remove method may not be called after calling the
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> method on any <a href="../api_cxx/db_class.html">Db</a> handle. If the <a href="../api_cxx/db_open.html">Db::open</a> method
|
||||
has already been called on a <a href="../api_cxx/db_class.html">Db</a> handle, close the existing
|
||||
handle and create a new one before calling Db::remove.</p>
|
||||
<p>The <a href="../api_cxx/db_class.html">Db</a> handle may not be accessed again after Db::remove is
|
||||
called, regardless of its return.</p>
|
||||
<p>The Db::remove method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::remove is affected by any database directory specified using
|
||||
the <a href="../api_cxx/env_set_data_dir.html">DbEnv::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::remove method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or return one of
|
||||
the following non-zero errors:</p>
|
||||
<br>
|
||||
<b>EINVAL</b><ul compact><li>If Db::remove called after <a href="../api_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
98
docs/api_cxx/db_rename.html
Normal file
98
docs/api_cxx/db_rename.html
Normal file
@@ -0,0 +1,98 @@
|
||||
<!--$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::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::rename</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::rename(const char *file,
|
||||
const char *database, const char *newname, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::rename</b>
|
||||
<p>The Db::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::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::rename method should not be called if the rename is intended
|
||||
to be transactionally safe; the <a href="../api_cxx/env_dbrename.html">DbEnv::dbrename</a> method should be used
|
||||
instead.</p>
|
||||
<p>The Db::rename method may not be called after calling the
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> method on any <a href="../api_cxx/db_class.html">Db</a> handle. If the <a href="../api_cxx/db_open.html">Db::open</a> method
|
||||
has already been called on a <a href="../api_cxx/db_class.html">Db</a> handle, close the existing
|
||||
handle and create a new one before calling Db::rename.</p>
|
||||
<p>The <a href="../api_cxx/db_class.html">Db</a> handle may not be accessed again after Db::rename is
|
||||
called, regardless of its return.</p>
|
||||
<p>The Db::rename method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::rename is affected by any database directory specified using
|
||||
the <a href="../api_cxx/env_set_data_dir.html">DbEnv::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::rename method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or return one of
|
||||
the following non-zero errors:</p>
|
||||
<br>
|
||||
<b>EINVAL</b><ul compact><li>If Db::rename called after <a href="../api_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_set_alloc.html
Normal file
96
docs/api_cxx/db_set_alloc.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!--$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::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::set_alloc</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
extern "C" {
|
||||
typedef void *(*db_malloc_fcn_type)(size_t);
|
||||
typedef void *(*db_realloc_fcn_type)(void *, size_t);
|
||||
typedef void *(*db_free_fcn_type)(void *);
|
||||
};
|
||||
<p>
|
||||
int
|
||||
Db::set_alloc(db_malloc_fcn_type app_malloc,
|
||||
db_realloc_fcn_type app_realloc,
|
||||
db_free_fcn_type app_free);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::set_alloc</b>
|
||||
<p>Set the allocation functions used by the <a href="../api_cxx/env_class.html">DbEnv</a> and <a href="../api_cxx/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_cxx/dbt_class.html#DB_DBT_MALLOC">DB_DBT_MALLOC</a> flag, when specified in the <a href="../api_cxx/dbt_class.html">Dbt</a> object,
|
||||
will cause the <a href="../api_cxx/db_class.html">Db</a> methods to allocate and reallocate memory
|
||||
which then becomes the responsibility of the calling application. (See
|
||||
<a href="../api_cxx/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_cxx/db_stat.html">Db::stat</a>, <a href="../api_cxx/lock_stat.html">DbEnv::lock_stat</a>, <a href="../api_cxx/log_archive.html">DbEnv::log_archive</a>,
|
||||
<a href="../api_cxx/log_stat.html">DbEnv::log_stat</a>, <a href="../api_cxx/memp_stat.html">DbEnv::memp_stat</a>, and <a href="../api_cxx/txn_stat.html">DbEnv::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_cxx/db_associate.html">Db::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_cxx/env_set_alloc.html">DbEnv::set_alloc</a> and
|
||||
Db::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::set_alloc method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
</p>
|
||||
<p>The Db::set_alloc method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<br><b>Errors</b>
|
||||
<p>The Db::set_alloc method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
86
docs/api_cxx/db_set_append_recno.html
Normal file
86
docs/api_cxx/db_set_append_recno.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!--$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::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::set_append_recno</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_append_recno(int (*db_append_recno_fcn)(DB *dbp, Dbt *data, db_recno_t recno));
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::set_append_recno</b>
|
||||
<p>When using the <a href="../api_cxx/db_put.html#DB_APPEND">DB_APPEND</a> option of the <a href="../api_cxx/db_put.html">Db::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::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::set_append_recno method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::set_append_recno method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
</p>
|
||||
<p>The Db::set_append_recno method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/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_cxx/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::set_append_recno method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
95
docs/api_cxx/db_set_bt_compare.html
Normal file
95
docs/api_cxx/db_set_bt_compare.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!--$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::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::set_bt_compare</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
extern "C" {
|
||||
typedef int (*bt_compare_fcn_type)(DB *db, const DBT *dbt1, const DBT *dbt2);
|
||||
};
|
||||
int
|
||||
Db::set_bt_compare(bt_compare_fcn_type bt_compare_fcn);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_bt_compare method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::set_bt_compare method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_bt_compare must
|
||||
be the same as that historically used to create the database or
|
||||
corruption can occur.</p>
|
||||
<p>The Db::set_bt_compare method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/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_cxx/db_set_bt_prefix.html">Db::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_cxx/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::set_bt_compare method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
92
docs/api_cxx/db_set_bt_minkey.html
Normal file
92
docs/api_cxx/db_set_bt_minkey.html
Normal file
@@ -0,0 +1,92 @@
|
||||
<!--$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::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::set_bt_minkey</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_bt_minkey(u_int32_t bt_minkey);
|
||||
<p>
|
||||
int
|
||||
Db::get_bt_minkey(u_int32_t *bt_minkeyp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_bt_minkey method configures a database, not only operations performed
|
||||
using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p>
|
||||
<p>The Db::set_bt_minkey method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_bt_minkey will
|
||||
be ignored.
|
||||
</p>
|
||||
<p>The Db::set_bt_minkey method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_bt_minkey method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_bt_minkey</b>
|
||||
<p>The Db::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::get_bt_minkey method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_bt_minkey method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>bt_minkeyp</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
98
docs/api_cxx/db_set_bt_prefix.html
Normal file
98
docs/api_cxx/db_set_bt_prefix.html
Normal file
@@ -0,0 +1,98 @@
|
||||
<!--$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::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::set_bt_prefix</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
extern "C" {
|
||||
typedef size_t (*bt_prefix_fcn_type)(DB *, const DBT *, const DBT *);
|
||||
};
|
||||
int
|
||||
Db::set_bt_prefix(bt_prefix_fcn_type bt_prefix_fcn);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_bt_prefix method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::set_bt_prefix method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_bt_prefix must
|
||||
be the same as that historically used to create the database or
|
||||
corruption can occur.</p>
|
||||
<p>The Db::set_bt_prefix method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/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_cxx/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::set_bt_prefix method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
110
docs/api_cxx/db_set_cachesize.html
Normal file
110
docs/api_cxx/db_set_cachesize.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!--$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::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::set_cachesize</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_cachesize(u_int32_t gbytes, u_int32_t bytes, int ncache);
|
||||
int
|
||||
Db::get_cachesize(u_int32_t *gbytesp, u_int32_t *bytesp, int *ncachep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_cachesize method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
</p>
|
||||
<p>The Db::set_cachesize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_cachesize method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_cachesize</b>
|
||||
<p>The Db::get_cachesize method returns the current size and composition of the
|
||||
cache.</p>
|
||||
<p>The Db::get_cachesize method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_cachesize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
93
docs/api_cxx/db_set_dup_compare.html
Normal file
93
docs/api_cxx/db_set_dup_compare.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!--$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::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::set_dup_compare</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
extern "C" {
|
||||
typedef int (*dup_compare_fcn_type)(DB *, const DBT *, const DBT *);
|
||||
};
|
||||
int
|
||||
Db::set_dup_compare(dup_compare_fcn_type dup_compare_fcn);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_dup_compare implies calling
|
||||
<a href="../api_cxx/db_set_flags.html">Db::set_flags</a> with the <a href="../api_cxx/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::set_dup_compare method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_dup_compare must
|
||||
be the same as that historically used to create the database or
|
||||
corruption can occur.</p>
|
||||
<p>The Db::set_dup_compare method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/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_cxx/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::set_dup_compare method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_set_encrypt.html
Normal file
96
docs/api_cxx/db_set_encrypt.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!--$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::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::set_encrypt</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_encrypt(const char *passwd, u_int32_t flags);
|
||||
<p>
|
||||
int
|
||||
Db::get_encrypt_flags(u_int32_t *flagsp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_encrypt method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
</p>
|
||||
<p>The Db::set_encrypt method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_encrypt method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::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::get_encrypt_flags</b>
|
||||
<p>The Db::get_encrypt_flags method returns the encryption flags.</p>
|
||||
<p>The Db::get_encrypt_flags method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_encrypt_flags method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>flagsp</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
83
docs/api_cxx/db_set_errcall.html
Normal file
83
docs/api_cxx/db_set_errcall.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!--$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::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::set_errcall</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void Db::set_errcall(void (*db_errcall_fcn)
|
||||
(const DbEnv *dbenv, const char *errpfx, const char *msg));
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::set_errcall</b>
|
||||
When an error occurs in the Berkeley DB library, an exception is thrown 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>The <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a> and Db::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_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> and
|
||||
<a href="../api_cxx/db_set_error_stream.html">Db::set_error_stream</a> methods to display the additional information via
|
||||
an output stream, or the <a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a> or
|
||||
<a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a> methods to display the additional information via a C
|
||||
library FILE *. You should not mix these approaches.</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_cxx/db_class.html">Db</a> handles opened inside of Berkeley DB environments, calling the
|
||||
Db::set_errcall method affects the entire environment and is equivalent to calling
|
||||
the <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a> method.</p>
|
||||
<p>The Db::set_errcall method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::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_cxx/db_set_errpfx.html">Db::set_errpfx</a> or <a href="../api_cxx/env_set_errpfx.html">DbEnv::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
102
docs/api_cxx/db_set_errfile.html
Normal file
102
docs/api_cxx/db_set_errfile.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<!--$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::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::set_errfile</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void Db::set_errfile(FILE *errfile);
|
||||
<p>
|
||||
void Db::get_errfile(FILE **errfilep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::set_errfile</b>
|
||||
When an error occurs in the Berkeley DB library, an exception is thrown or an
|
||||
error return value is returned by the interface. In some cases,
|
||||
however, the exception or returned value may be insufficient to
|
||||
completely describe the cause of the error, especially during initial
|
||||
application debugging.
|
||||
<p>The <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a> and <a href="../api_cxx/db_set_errcall.html">Db::set_errcall</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>Alternatively, you can use the <a href="../api_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> method to display
|
||||
the additional information via an output stream, or the
|
||||
<a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a> method to capture the additional error information in
|
||||
a way that does not use either output streams or C library FILE *'s. You
|
||||
should not mix these approaches.</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_cxx/db_set_errpfx.html">Db::set_errpfx</a> or <a href="../api_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a>), an error string, and
|
||||
a trailing <newline> character.</p>
|
||||
<p>The default configuration when applications first create <a href="../api_cxx/db_class.html">Db</a> or
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handles is as if the <a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a> or
|
||||
Db::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_cxx/env_set_errfile.html">DbEnv::set_errfile</a> or Db::set_errfile methods with NULL as the
|
||||
FILE * argument. Additionally, explicitly configuring the error output
|
||||
channel using any of the <a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a>,
|
||||
Db::set_errfile, <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a>,
|
||||
<a href="../api_cxx/db_set_errcall.html">Db::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_cxx/db_class.html">Db</a> handles opened inside of Berkeley DB environments, calling the
|
||||
Db::set_errfile method affects the entire environment and is equivalent to calling
|
||||
the <a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a> method.</p>
|
||||
<p>The Db::set_errfile method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::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::get_errfile</b>
|
||||
<p>The Db::get_errfile method returns the FILE *.</p>
|
||||
<p>The Db::get_errfile method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_errfile method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>errfilep</b><ul compact><li>The Db::get_errfile method returns the
|
||||
FILE * in <b>errfilep</b>.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
76
docs/api_cxx/db_set_error_stream.html
Normal file
76
docs/api_cxx/db_set_error_stream.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<!--$Id: db_set_error_stream.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--$Id: db_set_error_stream.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::set_error_stream</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::set_error_stream</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void Db::set_error_stream(class ostream*);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::set_error_stream</b>
|
||||
<p>When an error occurs in the Berkeley DB library, an exception is thrown or an
|
||||
<b>errno</b> 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_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> and Db::set_error_stream methods
|
||||
are used to enhance the mechanism for reporting error messages to the
|
||||
application by setting the C++ ostream 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 stream.</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_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a>), an error string, and a trailing
|
||||
<newline> character.</p>
|
||||
<p>Setting <b>stream</b> to NULL unconfigures the interface.</p>
|
||||
<p>Alternatively, you can use the <a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a> and
|
||||
<a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a> methods to display the additional information via a C
|
||||
library FILE *, or the <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a> and
|
||||
<a href="../api_cxx/db_set_errcall.html">Db::set_errcall</a> methods to capture the additional error information
|
||||
in a way that does not use either output streams or C library FILE *'s.
|
||||
You should not mix these approaches.</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_cxx/db_class.html">Db</a> handles opened inside of Berkeley DB environments, calling the
|
||||
Db::set_error_stream method affects the entire environment and is equivalent to calling
|
||||
the <a href="../api_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> method.</p>
|
||||
<p>The Db::set_error_stream method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::set_error_stream method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>stream</b><ul compact><li>The <b>stream</b> parameter is the application-specified output stream to
|
||||
be used for additional error information.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
75
docs/api_cxx/db_set_errpfx.html
Normal file
75
docs/api_cxx/db_set_errpfx.html
Normal 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::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::set_errpfx</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void Db::set_errpfx(const char *errpfx);
|
||||
<p>
|
||||
void Db::get_errpfx(const char **errpfxp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::set_errpfx</b>
|
||||
<p>Set the prefix string that appears before error messages issued by Berkeley DB.</p>
|
||||
<p>The Db::set_errpfx and <a href="../api_cxx/env_set_errpfx.html">DbEnv::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_cxx/db_class.html">Db</a> handles opened inside of Berkeley DB environments, calling the
|
||||
Db::set_errpfx method affects the entire environment and is equivalent to calling
|
||||
the <a href="../api_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a> method.</p>
|
||||
<p>The Db::set_errpfx method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::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::get_errpfx</b>
|
||||
<p>The Db::get_errpfx method returns the error prefix.</p>
|
||||
<p>The Db::get_errpfx method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_errpfx method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>errpfxp</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
75
docs/api_cxx/db_set_feedback.html
Normal file
75
docs/api_cxx/db_set_feedback.html
Normal 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::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::set_feedback</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_feedback(void (*db_feedback_fcn)(DB *dbp, int opcode, int percent));
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::set_feedback</b>
|
||||
<p>Some operations performed by the Berkeley DB library can take non-trivial
|
||||
amounts of time. The Db::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::set_feedback method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::set_feedback method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
299
docs/api_cxx/db_set_flags.html
Normal file
299
docs/api_cxx/db_set_flags.html
Normal file
@@ -0,0 +1,299 @@
|
||||
<!--$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::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::set_flags</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_flags(u_int32_t flags);
|
||||
<p>
|
||||
int Db::get_flags(u_int32_t *flagsp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::set_flags</b>
|
||||
<p>Configure a database. Calling Db::set_flags is additive; there
|
||||
is no way to clear flags.</p>
|
||||
<p>The Db::set_flags method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
</p>
|
||||
<p>The Db::set_flags method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_flags with the DB_CHKSUM flag only affects the
|
||||
specified <a href="../api_cxx/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_cxx/db_open.html">Db::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_cxx/env_set_encrypt.html">DbEnv::set_encrypt</a> or <a href="../api_cxx/db_set_encrypt.html">Db::set_encrypt</a> methods.
|
||||
<p>Calling Db::set_flags with the DB_ENCRYPT flag only affects the
|
||||
specified <a href="../api_cxx/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_cxx/db_open.html">Db::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_cxx/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_cxx/txn_checkpoint.html">DbEnv::txn_checkpoint</a> or <a href="../api_cxx/memp_sync.html">DbEnv::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::set_flags with the DB_TXN_NOT_DURABLE flag only affects the
|
||||
specified <a href="../api_cxx/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::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_cxx/db_open.html">Db::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_cxx/db_set_dup_compare.html">Db::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::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_cxx/db_open.html">Db::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_cxx/db_get.html#DB_SET_RECNO">DB_SET_RECNO</a> flag to the <a href="../api_cxx/db_get.html">Db::get</a>
|
||||
and <a href="../api_cxx/dbc_get.html">Dbc::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::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_cxx/db_open.html">Db::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::set_flags with the DB_REVSPLITOFF flag only affects the
|
||||
specified <a href="../api_cxx/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::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_cxx/db_open.html">Db::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_cxx/db_set_dup_compare.html">Db::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::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_cxx/db_open.html">Db::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_cxx/db_get.html#DB_CONSUME">DB_CONSUME</a> or <a href="../api_cxx/db_get.html#DB_CONSUME_WAIT">DB_CONSUME_WAIT</a> flags to <a href="../api_cxx/db_get.html">Db::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_cxx/db_get.html">Db::get</a> call returns.</p>
|
||||
<p>This flag modifies the <a href="../api_cxx/db_get.html">Db::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::set_flags with the DB_INORDER flag only affects the
|
||||
specified <a href="../api_cxx/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_cxx/db_put.html">Db::put</a> or <a href="../api_cxx/dbc_put.html">Dbc::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::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_cxx/db_open.html">Db::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_cxx/db_open.html">Db::open</a> is called. If this flag is not
|
||||
specified, the <b>re_source</b> file may be read lazily.
|
||||
<p>Calling Db::set_flags with the DB_SNAPSHOT flag only affects the
|
||||
specified <a href="../api_cxx/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::set_flags method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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::get_flags</b>
|
||||
<p>The Db::get_flags method returns the current flags.</p>
|
||||
<p>The Db::get_flags method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_flags method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>flagsp</b><ul compact><li>The Db::get_flags method returns the
|
||||
current flags in <b>flagsp</b>.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_set_h_compare.html
Normal file
91
docs/api_cxx/db_set_h_compare.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!--$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::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::set_h_compare</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
extern "C" {
|
||||
typedef int (*compare_fcn_type)(DB *db, const DBT *dbt1, const DBT *dbt2);
|
||||
};
|
||||
int
|
||||
Db::set_h_compare(compare_fcn_type compare_fcn);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_h_compare method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::set_h_compare method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_h_compare must
|
||||
be the same as that historically used to create the database or
|
||||
corruption can occur.</p>
|
||||
<p>The Db::set_h_compare method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/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_cxx/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::set_h_compare method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
90
docs/api_cxx/db_set_h_ffactor.html
Normal file
90
docs/api_cxx/db_set_h_ffactor.html
Normal file
@@ -0,0 +1,90 @@
|
||||
<!--$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::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::set_h_ffactor</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_h_ffactor(u_int32_t h_ffactor);
|
||||
<p>
|
||||
int Db::get_h_ffactor(u_int32_t *h_ffactorp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_h_ffactor method configures a database, not only operations performed
|
||||
using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p>
|
||||
<p>The Db::set_h_ffactor method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_h_ffactor will
|
||||
be ignored.
|
||||
</p>
|
||||
<p>The Db::set_h_ffactor method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_h_ffactor method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_h_ffactor</b>
|
||||
<p>The Db::get_h_ffactor method returns the hash table density.</p>
|
||||
<p>The Db::get_h_ffactor method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_h_ffactor method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>h_ffactorp</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
80
docs/api_cxx/db_set_h_hash.html
Normal file
80
docs/api_cxx/db_set_h_hash.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<!--$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::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::set_h_hash</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
extern "C" {
|
||||
typedef u_int32_t (*h_hash_fcn_type)
|
||||
(DB *, const void *bytes, u_int32_t length);
|
||||
};
|
||||
int
|
||||
Db::set_h_hash(h_hash_fcn_type h_hash_fcn);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_h_hash method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::set_h_hash method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_h_hash must
|
||||
be the same as that historically used to create the database or
|
||||
corruption can occur.</p>
|
||||
<p>The Db::set_h_hash method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_h_hash method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
89
docs/api_cxx/db_set_h_nelem.html
Normal file
89
docs/api_cxx/db_set_h_nelem.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<!--$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::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::set_h_nelem</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_h_nelem(u_int32_t h_nelem);
|
||||
<p>
|
||||
int
|
||||
Db::get_h_nelem(u_int32_t *h_nelemp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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_cxx/db_set_h_ffactor.html">Db::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::set_h_nelem method configures a database, not only operations performed
|
||||
using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p>
|
||||
<p>The Db::set_h_nelem method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_h_nelem will
|
||||
be ignored.
|
||||
</p>
|
||||
<p>The Db::set_h_nelem method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_h_nelem method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_h_nelem</b>
|
||||
<p>The Db::get_h_nelem method returns the estimate of the final size of the hash table.</p>
|
||||
<p>The Db::get_h_nelem method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_h_nelem method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>h_nelemp</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_set_lorder.html
Normal file
94
docs/api_cxx/db_set_lorder.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!--$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::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::set_lorder</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_lorder(int lorder);
|
||||
<p>
|
||||
int
|
||||
Db::get_lorder(int *lorderp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_lorder method configures a database, not only operations performed
|
||||
using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p>
|
||||
<p>The Db::set_lorder method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_lorder will
|
||||
be ignored.
|
||||
</p>
|
||||
If creating additional databases in a single physical file, information
|
||||
specified to Db::set_lorder will be ignored and the byte order
|
||||
of the existing databases will be used.
|
||||
<p>The Db::set_lorder method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_lorder method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_lorder</b>
|
||||
<p>The Db::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::get_lorder method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_lorder method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>lorderp</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
67
docs/api_cxx/db_set_msg_stream.html
Normal file
67
docs/api_cxx/db_set_msg_stream.html
Normal file
@@ -0,0 +1,67 @@
|
||||
<!--$Id: db_set_msg_stream.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--$Id: db_set_msg_stream.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::set_message_stream</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::set_message_stream</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void Db::set_message_stream(class ostream*);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::set_message_stream</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_cxx/env_set_verbose.html">DbEnv::set_verbose</a> and <a href="../api_cxx/env_stat.html">DbEnv::stat_print</a>.</p>
|
||||
<p>The <a href="../api_cxx/env_set_msg_stream.html">DbEnv::set_message_stream</a> and
|
||||
Db::set_message_stream methods are used to display these messages for
|
||||
the application. In this case, the message will include a trailing
|
||||
<newline> character.</p>
|
||||
<p>Setting <b>stream</b> to NULL unconfigures the interface.</p>
|
||||
<p>Alternatively, you can use the <a href="../api_cxx/env_set_msgfile.html">DbEnv::set_msgfile</a> and
|
||||
<a href="../api_cxx/db_set_msgfile.html">Db::set_msgfile</a> methods to display the messages via a C library FILE *,
|
||||
or the <a href="../api_cxx/env_set_msgcall.html">DbEnv::set_msgcall</a> and <a href="../api_cxx/db_set_msgcall.html">Db::set_msgcall</a> methods to
|
||||
capture the additional error information in a way that does not use
|
||||
either output streams or C library FILE *'s. You should not mix these
|
||||
approaches.</p>
|
||||
<p>For <a href="../api_cxx/db_class.html">Db</a> handles opened inside of Berkeley DB environments, calling the
|
||||
Db::set_message_stream method affects the entire environment and is equivalent to calling
|
||||
the <a href="../api_cxx/env_set_msg_stream.html">DbEnv::set_message_stream</a> method.</p>
|
||||
<p>The Db::set_message_stream method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::set_message_stream method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>stream</b><ul compact><li>The <b>stream</b> parameter is the application-specified output stream to
|
||||
be used for additional message information.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_set_msgcall.html
Normal file
74
docs/api_cxx/db_set_msgcall.html
Normal 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::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::set_msgcall</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void Db::set_msgcall(void (*db_msgcall_fcn)(const DbEnv *dbenv, char *msg));
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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_cxx/env_set_verbose.html">DbEnv::set_verbose</a> and <a href="../api_cxx/env_stat.html">DbEnv::stat_print</a>.</p>
|
||||
<p>The DbEnv::set_msgcall and Db::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_cxx/env_set_msg_stream.html">DbEnv::set_message_stream</a> and
|
||||
<a href="../api_cxx/db_set_msg_stream.html">Db::set_message_stream</a> methods to display the messages via an output
|
||||
stream, or the <a href="../api_cxx/db_set_msgfile.html">Db::set_msgfile</a> or <a href="../api_cxx/env_set_msgfile.html">DbEnv::set_msgfile</a> methods
|
||||
to display the messages via a C library FILE *.</p>
|
||||
<p>For <a href="../api_cxx/db_class.html">Db</a> handles opened inside of Berkeley DB environments, calling the
|
||||
Db::set_msgcall method affects the entire environment and is equivalent to calling
|
||||
the DbEnv::set_msgcall method.</p>
|
||||
<p>The Db::set_msgcall method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_set_msgfile.html
Normal file
82
docs/api_cxx/db_set_msgfile.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!--$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::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::set_msgfile</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void Db::set_msgfile(FILE *msgfile);
|
||||
<p>
|
||||
void Db::get_msgfile(FILE **msgfilep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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_cxx/env_set_verbose.html">DbEnv::set_verbose</a> and <a href="../api_cxx/env_stat.html">DbEnv::stat_print</a>.</p>
|
||||
<p>The <a href="../api_cxx/env_set_msgfile.html">DbEnv::set_msgfile</a> and Db::set_msgfile methods are used to
|
||||
display these messages for the application. In this case, the message
|
||||
will include a trailing <newline> character.</p>
|
||||
<p>Setting <b>msgfile</b> to NULL unconfigures the interface.</p>
|
||||
<p>Alternatively, you can use the <a href="../api_cxx/env_set_msg_stream.html">DbEnv::set_message_stream</a> and
|
||||
<a href="../api_cxx/db_set_msg_stream.html">Db::set_message_stream</a> methods to display the messages via an output
|
||||
stream, or the <a href="../api_cxx/env_set_msgcall.html">DbEnv::set_msgcall</a> and <a href="../api_cxx/db_set_msgcall.html">Db::set_msgcall</a> methods
|
||||
to capture the additional error information in a way that does not use
|
||||
either output streams or C library FILE *'s. You should not mix these
|
||||
approaches.</p>
|
||||
<p>For <a href="../api_cxx/db_class.html">Db</a> handles opened inside of Berkeley DB environments, calling the
|
||||
Db::set_msgfile method affects the entire environment and is equivalent to calling
|
||||
the <a href="../api_cxx/env_set_msgfile.html">DbEnv::set_msgfile</a> method.</p>
|
||||
<p>The Db::set_msgfile method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::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::get_msgfile</b>
|
||||
<p>The Db::get_msgfile method returns the FILE *.</p>
|
||||
<p>The Db::get_msgfile method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_msgfile method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>msgfilep</b><ul compact><li>The Db::get_msgfile method returns the
|
||||
FILE * in <b>msgfilep</b>.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
93
docs/api_cxx/db_set_pagesize.html
Normal file
93
docs/api_cxx/db_set_pagesize.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!--$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::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::set_pagesize</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_pagesize(u_int32_t pagesize);
|
||||
<p>
|
||||
int
|
||||
Db::get_pagesize(u_int32_t *pagesizep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_pagesize method configures a database, not only operations performed
|
||||
using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p>
|
||||
<p>The Db::set_pagesize method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_pagesize will
|
||||
be ignored.
|
||||
</p>
|
||||
If creating additional databases in a single physical file, information
|
||||
specified to Db::set_pagesize will be ignored and the page size
|
||||
of the existing databases will be used.
|
||||
<p>The Db::set_pagesize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_pagesize method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_pagesize</b>
|
||||
<p>The Db::get_pagesize method returns the page size.</p>
|
||||
<p>The Db::get_pagesize method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_pagesize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>pagesizep</b><ul compact><li>The Db::get_pagesize method returns the
|
||||
page size in <b>pagesizep</b>.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
70
docs/api_cxx/db_set_priority.html
Normal file
70
docs/api_cxx/db_set_priority.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<!--$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::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::set_priority</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_priority(DB_CACHE_PRIORITY priority);
|
||||
<p>
|
||||
int
|
||||
Db::get_priority(DB_CACHE_PRIORITY *priorityp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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_cxx/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::set_priority method is only advisory, and does
|
||||
not guarantee pages will be treated in a specific way.</p>
|
||||
<p>The Db::set_priority method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::set_priority method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
89
docs/api_cxx/db_set_q_extentsize.html
Normal file
89
docs/api_cxx/db_set_q_extentsize.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<!--$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::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::set_q_extentsize</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_q_extentsize(u_int32_t extentsize);
|
||||
<p>
|
||||
int
|
||||
Db::get_q_extentsize(u_int32_t *extentsizep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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::set_q_extentsize method configures a database, not only operations performed
|
||||
using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p>
|
||||
<p>The Db::set_q_extentsize method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_q_extentsize will
|
||||
be ignored.
|
||||
</p>
|
||||
<p>The Db::set_q_extentsize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_q_extentsize method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_q_extentsize</b>
|
||||
<p>The Db::get_q_extentsize method returns the number of pages in an extent.</p>
|
||||
<p>The Db::get_q_extentsize method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_q_extentsize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>extentsizep</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
89
docs/api_cxx/db_set_re_delim.html
Normal file
89
docs/api_cxx/db_set_re_delim.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<!--$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::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::set_re_delim</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_re_delim(int re_delim);
|
||||
<p>
|
||||
int
|
||||
Db::get_re_delim(int *delimp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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, <newline> characters (that
|
||||
is, ASCII 0x0a) are interpreted as end-of-record markers.</p>
|
||||
<p>The Db::set_re_delim method configures a database, not only operations performed
|
||||
using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p>
|
||||
<p>The Db::set_re_delim method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_re_delim will
|
||||
be ignored.
|
||||
</p>
|
||||
<p>The Db::set_re_delim method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_re_delim method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_re_delim</b>
|
||||
<p>The Db::get_re_delim method returns the delimiting byte.</p>
|
||||
<p>The Db::get_re_delim method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_re_delim method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>delimp</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_set_re_len.html
Normal file
96
docs/api_cxx/db_set_re_len.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!--$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::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::set_re_len</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_re_len(u_int32_t re_len);
|
||||
<p>
|
||||
int
|
||||
Db::get_re_len(u_int32_t *re_lenp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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_cxx/db_set_re_pad.html">Db::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::set_re_len method configures a database, not only operations performed
|
||||
using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p>
|
||||
<p>The Db::set_re_len method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_re_len will
|
||||
be ignored.
|
||||
</p>
|
||||
<p>The Db::set_re_len method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_re_len method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_re_len</b>
|
||||
<p>The Db::get_re_len method returns the record length.</p>
|
||||
<p>The Db::get_re_len method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_re_len method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>re_lenp</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_set_re_pad.html
Normal file
87
docs/api_cxx/db_set_re_pad.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<!--$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::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::set_re_pad</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_re_pad(int re_pad);
|
||||
<p>
|
||||
int
|
||||
Db::get_re_pad(int *re_padp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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, <space> characters (that
|
||||
is, ASCII 0x20) are used for padding.</p>
|
||||
<p>The Db::set_re_pad method configures a database, not only operations performed
|
||||
using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p>
|
||||
<p>The Db::set_re_pad method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_re_pad will
|
||||
be ignored.
|
||||
</p>
|
||||
<p>The Db::set_re_pad method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_re_pad method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_re_pad</b>
|
||||
<p>The Db::get_re_pad method returns the pad character.</p>
|
||||
<p>The Db::get_re_pad method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Db::get_re_pad method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>re_padp</b><ul compact><li>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
120
docs/api_cxx/db_set_re_source.html
Normal file
120
docs/api_cxx/db_set_re_source.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!--$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::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::set_re_source</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::set_re_source(char *source);
|
||||
<p>
|
||||
int
|
||||
Db::get_re_source(const char **sourcep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::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_cxx/db_set_re_delim.html">Db::set_re_delim</a>. For example, standard UNIX byte
|
||||
stream files can be interpreted as a sequence of variable length records
|
||||
separated by <newline> characters.</p>
|
||||
<p>In addition, when cached data would normally be written back to the
|
||||
underlying database file (for example, the <a href="../api_cxx/db_close.html">Db::close</a> or
|
||||
<a href="../api_cxx/db_sync.html">Db::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_cxx/db_open.html">Db::open</a> call. See the
|
||||
<a href="../api_cxx/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_cxx/db_open.html">Db::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_cxx/db_sync.html">Db::sync</a> or <a href="../api_cxx/db_close.html">Db::close</a> methods will fail, of course.
|
||||
Specify the <a href="../api_cxx/db_close.html#DB_NOSYNC">DB_NOSYNC</a> flag to the <a href="../api_cxx/db_close.html">Db::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::set_re_source method configures operations performed using the specified
|
||||
<a href="../api_cxx/db_class.html">Db</a> handle, not all operations performed on the underlying
|
||||
database.</p>
|
||||
<p>The Db::set_re_source method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
If the database already exists when
|
||||
<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_re_source must
|
||||
be the same as that historically used to create the database or
|
||||
corruption can occur.</p>
|
||||
<p>The Db::set_re_source method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::set_re_source method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_open.html">Db::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::get_re_source</b>
|
||||
<p>The Db::get_re_source method returns the source file.</p>
|
||||
<p>The Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
257
docs/api_cxx/db_stat.html
Normal file
257
docs/api_cxx/db_stat.html
Normal file
@@ -0,0 +1,257 @@
|
||||
<!--$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::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::stat</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::stat(DbTxn *txnid, void *sp, u_int32_t flags);
|
||||
<p>
|
||||
int
|
||||
Db::stat_print(u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::stat</b>
|
||||
<p>The Db::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_cxx/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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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_cxx/env_set_alloc.html">DbEnv::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::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::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::stat method may not be called before the <a href="../api_cxx/db_open.html">Db::open</a> method is called.</p>
|
||||
<p>The Db::stat method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/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_cxx/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::stat method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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::stat_print</b>
|
||||
<p>The Db::stat_print method displays the
|
||||
database statistical information, as described for the Db::stat method.
|
||||
The information is printed to a specified output channel (see the
|
||||
<a href="../api_cxx/env_set_msgfile.html">DbEnv::set_msgfile</a> method for more information), or passed to an
|
||||
application callback function (see the <a href="../api_cxx/env_set_msgcall.html">DbEnv::set_msgcall</a> method for
|
||||
more information).</p>
|
||||
<p>The Db::stat_print method may not be called before the <a href="../api_cxx/db_open.html">Db::open</a> method is called.</p>
|
||||
<p>The Db::stat_print method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/db_sync.html
Normal file
78
docs/api_cxx/db_sync.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!--$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::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::sync</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::sync(u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::sync</b>
|
||||
<p>The Db::sync method flushes any cached information to disk.</p>
|
||||
<p>If the database is in memory only, the Db::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_cxx/db_close.html">Db::close</a>, atomically replace the original database with the
|
||||
updated copy.</p>
|
||||
<p>The Db::sync method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::sync method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
88
docs/api_cxx/db_truncate.html
Normal file
88
docs/api_cxx/db_truncate.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!--$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::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::truncate</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::truncate(DbTxn *txnid, u_int32_t *countp, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::truncate</b>
|
||||
<p>The Db::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_cxx/db_associate.html">Db::associate</a> method, the Db::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::truncate method on a database with open
|
||||
cursors.</p>
|
||||
<p>The Db::truncate method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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::truncate method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or return one of
|
||||
the following non-zero errors:</p>
|
||||
<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>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Db::truncate method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Db::truncate method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
104
docs/api_cxx/db_upgrade.html
Normal file
104
docs/api_cxx/db_upgrade.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!--$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::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::upgrade</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::upgrade(const char *file, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::upgrade</b>
|
||||
<p>The Db::upgrade method upgrades all of the databases included in the
|
||||
file <b>file</b>, if necessary. If no upgrade is necessary,
|
||||
Db::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::upgrade may only be done
|
||||
on a system with the same byte-order as the database.</p>
|
||||
<p>The Db::upgrade method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</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::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::upgrade method upgrades a physical file
|
||||
(including all the databases it contains), it is not possible to use
|
||||
Db::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::upgrade will work correctly as long as the
|
||||
DB_DUPSORT flag is correctly specified. Otherwise, the file
|
||||
cannot be upgraded using Db::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::upgrade is affected by any database directory specified using
|
||||
the <a href="../api_cxx/env_set_data_dir.html">DbEnv::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::upgrade method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
147
docs/api_cxx/db_verify.html
Normal file
147
docs/api_cxx/db_verify.html
Normal file
@@ -0,0 +1,147 @@
|
||||
<!--$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::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::verify</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Db::verify(const char *file,
|
||||
const char *database, ostream *outfile, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Db::verify</b>
|
||||
<p>The Db::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::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::verify method may not be called after the <a href="../api_cxx/db_open.html">Db::open</a> method is called.
|
||||
</p>
|
||||
<p>The <a href="../api_cxx/db_class.html">Db</a> handle may not be accessed again after Db::verify is
|
||||
called, regardless of its return.</p>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The Db::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::verify method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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::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::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::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::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::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::verify is affected by any database directory specified using
|
||||
the <a href="../api_cxx/env_set_data_dir.html">DbEnv::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::verify method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or return one of
|
||||
the following non-zero errors:</p>
|
||||
<br>
|
||||
<b>EINVAL</b><ul compact><li>If Db::verify was called after <a href="../api_cxx/db_open.html">Db::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_cxx/db_class.html">Db</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/db_list.html">Databases and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/dbc_class.html
Normal file
42
docs/api_cxx/dbc_class.html
Normal 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_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
class 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_cxx/dbc_close.html">Dbc::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_cxx/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_cxx/dbc_close.html
Normal file
71
docs/api_cxx/dbc_close.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!--$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: Dbc::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>Dbc::close</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Dbc::close(void);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbc::close</b>
|
||||
<p>The Dbc::close method discards the cursor.</p>
|
||||
<p>It is possible for the Dbc::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 Dbc::close has been called, regardless of its return, the
|
||||
cursor handle may not be used again.</p>
|
||||
<p>The Dbc::close method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<br><b>Errors</b>
|
||||
<p>The Dbc::close method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or return one of
|
||||
the following non-zero errors:</p>
|
||||
<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>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Dbc::close method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Dbc::close method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/dbc_class.html">Dbc</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/dbc_list.html">Database Cursors and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
69
docs/api_cxx/dbc_count.html
Normal file
69
docs/api_cxx/dbc_count.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!--$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: Dbc::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>Dbc::count</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Dbc::count(db_recno_t *countp, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbc::count</b>
|
||||
<p>The Dbc::count method returns a count of the number of data items for
|
||||
the key to which the cursor refers.</p>
|
||||
<p>The Dbc::count method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 Dbc::count method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/dbc_class.html">Dbc</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/dbc_list.html">Database Cursors and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
93
docs/api_cxx/dbc_del.html
Normal file
93
docs/api_cxx/dbc_del.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!--$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: Dbc::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>Dbc::del</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Dbc::del(u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbc::del</b>
|
||||
<p>The Dbc::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_cxx/db_associate.html">Db::associate</a> method, the <a href="../api_cxx/db_del.html">Db::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 Dbc::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 Dbc::del method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 Dbc::del method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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>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_cxx/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a> flag was
|
||||
specified to <a href="../api_cxx/env_open.html">DbEnv::open</a>.</ul>
|
||||
<br>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Dbc::del method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Dbc::del method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/dbc_class.html">Dbc</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/dbc_list.html">Database Cursors and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/dbc_dup.html
Normal file
78
docs/api_cxx/dbc_dup.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!--$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: Dbc::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>Dbc::dup</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Dbc::dup(Dbc **cursorp, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbc::dup</b>
|
||||
<p>The Dbc::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 Dbc::dup method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/db_cursor.html">Db::cursor</a>.</ul>
|
||||
<br></ul>
|
||||
<br>
|
||||
<br><b>Errors</b>
|
||||
<p>The Dbc::dup method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/dbc_class.html">Dbc</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/dbc_list.html">Database Cursors and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
333
docs/api_cxx/dbc_get.html
Normal file
333
docs/api_cxx/dbc_get.html
Normal file
@@ -0,0 +1,333 @@
|
||||
<!--$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: Dbc::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>Dbc::get</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Dbc::get(Dbt *key, Dbt *data, u_int32_t flags);
|
||||
<p>
|
||||
int
|
||||
Dbc::pget(Dbt *key, Dbt *pkey, Dbt *data, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbc::get</b>
|
||||
<p>The Dbc::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_cxx/db_associate.html">Db::associate</a> method, the Dbc::get
|
||||
and Dbc::pget methods return the key from the secondary index and the
|
||||
data item from the primary database. In addition, the Dbc::pget method
|
||||
returns the key from the primary database. In databases that are not
|
||||
secondary indices, the Dbc::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 Dbc::get method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<p>If Dbc::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_cxx/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 Dbc::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, Dbc::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 Dbc::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 Dbc::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 Dbc::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_cxx/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_cxx/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 Dbc::get and Dbc::pget methods return the
|
||||
record number of the primary database in <b>data</b>. In addition, the
|
||||
Dbc::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_cxx/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_cxx/db_join.html">Db::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, Dbc::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 Dbc::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, Dbc::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 Dbc::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 Dbc::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, Dbc::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 Dbc::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, Dbc::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 Dbc::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 Dbc::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, Dbc::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 Dbc::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 Dbc::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 Dbc::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, Dbc::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_cxx/dbt_class.html#db_recno_t">db_recno_t</a> may be read, as described in <a href="../api_cxx/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_cxx/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_cxx/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_cxx/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_cxx/dbt_bulk_class.html">DbMultipleDataIterator</a> class.</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_cxx/db_associate.html">Db::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_cxx/dbt_bulk_class.html">DbMultipleKeyDataIterator</a> class.</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_cxx/dbt_bulk_class.html">DbMultipleRecnoDataIterator</a> class.</p>
|
||||
<p>The buffer to which the <b>data</b> parameter refers must be provided
|
||||
from user memory (see <a href="../api_cxx/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_cxx/db_associate.html">Db::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_cxx/dbt_class.html">Dbt</a> operated on.</ul>
|
||||
<b>pkey</b><ul compact><li>The secondary index key <a href="../api_cxx/dbt_class.html">Dbt</a> operated on.</ul>
|
||||
<br>
|
||||
<br><b>Errors</b>
|
||||
<p>The Dbc::get method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_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 Dbc::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>
|
||||
<p>If the requested item could not be returned due to undersized buffer, the Dbc::get method will fail and
|
||||
either return DB_BUFFER_SMALL or
|
||||
throw a <a href="../api_cxx/memp_class.html">DbMemoryException</a> exception.</p>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Dbc::get method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Dbc::get method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/dbc_class.html">Dbc</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/dbc_list.html">Database Cursors and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/dbc_list.html
Normal file
26
docs/api_cxx/dbc_list.html
Normal 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_cxx/db_cursor.html">Db::cursor</a></td><td>Create a cursor</td></tr>
|
||||
<!--DbCursor::close--><tr><td><a href="../api_cxx/dbc_close.html">Dbc::close</a></td><td>Close a cursor</td></tr>
|
||||
<!--DbCursor::count--><tr><td><a href="../api_cxx/dbc_count.html">Dbc::count</a></td><td>Return count of duplicates</td></tr>
|
||||
<!--DbCursor::del--><tr><td><a href="../api_cxx/dbc_del.html">Dbc::del</a></td><td>Delete by cursor</td></tr>
|
||||
<!--DbCursor::dup--><tr><td><a href="../api_cxx/dbc_dup.html">Dbc::dup</a></td><td>Duplicate a cursor</td></tr>
|
||||
<!--DbCursor::get--><tr><td><a href="../api_cxx/dbc_get.html">Dbc::get</a>, <a href="../api_cxx/dbc_get.html">Dbc::pget</a></td><td>Retrieve by cursor</td></tr>
|
||||
<!--DbCursor::put--><tr><td><a href="../api_cxx/dbc_put.html">Dbc::put</a></td><td>Store by cursor</td></tr>
|
||||
<!--DbCursor::set_priority--><tr><td><a href="../api_cxx/dbc_set_priority.html">Dbc::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>
|
||||
162
docs/api_cxx/dbc_put.html
Normal file
162
docs/api_cxx/dbc_put.html
Normal file
@@ -0,0 +1,162 @@
|
||||
<!--$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: Dbc::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>Dbc::put</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Dbc::put(Dbt *key, Dbt *data, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbc::put</b>
|
||||
<p>The Dbc::put method stores key/data pairs into the database.</p>
|
||||
<p>Unless otherwise specified, the Dbc::put method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<p>If Dbc::put fails for any reason, the state of the cursor will be
|
||||
unchanged. If Dbc::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_cxx/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_cxx/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a> flag. If the <a href="../api_cxx/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_cxx/db_open.html">Db::open</a>
|
||||
for more information.</p>
|
||||
<p>The DB_AFTER flag may not be specified to the Queue access method.</p>
|
||||
<p>The Dbc::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_cxx/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a> flag. If the <a href="../api_cxx/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_cxx/db_open.html">Db::open</a> for more information.</p>
|
||||
<p>The DB_BEFORE flag may not be specified to the Queue access method.</p>
|
||||
<p>The Dbc::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 Dbc::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_cxx/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_cxx/dbt_class.html">Dbt</a> operated on.</ul>
|
||||
<br>
|
||||
<br><b>Errors</b>
|
||||
<p>The Dbc::put method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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>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_cxx/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a> flag was
|
||||
specified to <a href="../api_cxx/env_open.html">DbEnv::open</a>.</ul>
|
||||
<br>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the Dbc::put method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the Dbc::put method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/dbc_class.html">Dbc</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/dbc_list.html">Database Cursors and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
69
docs/api_cxx/dbc_set_priority.html
Normal file
69
docs/api_cxx/dbc_set_priority.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!--$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: Dbc::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>Dbc::set_priority</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
Dbc::set_priority(DB_CACHE_PRIORITY priority);
|
||||
<p>
|
||||
int
|
||||
Dbc::get_priority(DB_CACHE_PRIORITY *priorityp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbc::set_priority</b>
|
||||
<p>Set the cache priority for pages referenced by the
|
||||
<a href="../api_cxx/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 Dbc::set_priority method is only advisory, and does
|
||||
not guarantee pages will be treated in a specific way.</p>
|
||||
<p>The Dbc::set_priority method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The Dbc::set_priority method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/dbc_class.html">Dbc</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/dbc_list.html">Database Cursors and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
156
docs/api_cxx/dbt_bulk_class.html
Normal file
156
docs/api_cxx/dbt_bulk_class.html
Normal file
@@ -0,0 +1,156 @@
|
||||
<!--$Id: dbt_bulk_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: Bulk Retrieval API</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>Bulk Retrieval API</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
class DbMultipleDataIterator
|
||||
{
|
||||
public:
|
||||
DbMultipleDataIterator(const Dbt &dbt);
|
||||
<p>
|
||||
bool next(Dbt &data);
|
||||
};
|
||||
<p>
|
||||
class DbMultipleKeyDataIterator
|
||||
{
|
||||
public:
|
||||
DbMultipleKeyDataIterator(const Dbt &dbt);
|
||||
<p>
|
||||
bool next(Dbt &key, Dbt &data);
|
||||
};
|
||||
<p>
|
||||
class DbMultipleRecnoDataIterator
|
||||
{
|
||||
public:
|
||||
DbMultipleRecnoDataIterator(const Dbt &dbt);
|
||||
<p>
|
||||
bool next(db_recno_t &key, Dbt &data);
|
||||
};
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Bulk Retrieval API</b>
|
||||
<p>If either of the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> or <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flags
|
||||
were specified to the <a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> method, the data
|
||||
<a href="../api_cxx/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
|
||||
classes.</p>
|
||||
<p>All instances of the bulk retrieval classes may be used only once, and
|
||||
to traverse the bulk retrieval buffer in the forward direction only.
|
||||
However, they are nondestructive, so multiple iterators can be
|
||||
instantiated and used on the same returned data <a href="../api_cxx/dbt_class.html">Dbt</a>.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbMultipleIterator</b>
|
||||
<p>The <a href="../api_cxx/dbt_bulk_class.html">DbMultipleIterator</a> is a shared package-private base class
|
||||
for the three types of bulk-return Iterator; it should never be
|
||||
instantiated directly, but it handles the functionality shared by its
|
||||
subclasses.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbMultipleDataIterator</b>
|
||||
<p>The DbMultipleDataIterator class is used to iterate through data
|
||||
returned using the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a> flag from a database belonging
|
||||
to any access method.</p>
|
||||
<p>The constructor takes the data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to
|
||||
<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a>
|
||||
flag.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>dbt</b><ul compact><li>The <b>dbt</b> parameter is a data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to
|
||||
<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE">DB_MULTIPLE</a>
|
||||
flag.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbMultipleDataIterator.next</b>
|
||||
<p>The DbMultipleDataIterator.next method takes a <a href="../api_cxx/dbt_class.html">Dbt</a> that will be
|
||||
filled in with a reference to a buffer, a size, and an offset that
|
||||
together yield the next data item in the original bulk retrieval buffer.</p>
|
||||
<p>The DbMultipleDataIterator.next method returns false if no more data are
|
||||
available, and true otherwise.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>data</b><ul compact><li>The <b>data</b> parameter is a <a href="../api_cxx/dbt_class.html">Dbt</a> that will be filled in with
|
||||
a reference to a buffer, a size, and an offset that together yield the
|
||||
next data item in the original bulk retrieval buffer.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbMultipleKeyDataIterator</b>
|
||||
<p>The DbMultipleKeyDataIterator class is used to iterate through
|
||||
data returned using the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag from a database
|
||||
belonging to the Btree or Hash access methods.</p>
|
||||
<p>The constructor takes the data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to
|
||||
<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a>
|
||||
flag.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>dbt</b><ul compact><li>The <b>dbt</b> parameter is a data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to
|
||||
<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a>
|
||||
flag.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbMultipleKeyDataIterator.next</b>
|
||||
<p>The DbMultipleKeyDataIterator.next method takes two <a href="../api_cxx/dbt_class.html">Dbt</a>s, one
|
||||
for a key and one for a data item, that will each be filled in with a
|
||||
reference to a buffer, a size, and an offset that together yield the
|
||||
next key and data item in the original bulk retrieval buffer. The
|
||||
DbMultipleKeyDataIterator.next method returns false if no more data are
|
||||
available, and true otherwise.</p>
|
||||
<p>The DbMultipleKeyDataIterator.next method returns false if no more data
|
||||
are available, and true otherwise.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>key</b><ul compact><li>The <b>key</b> parameter will be filled in with a reference to a buffer,
|
||||
a size, and an offset that yields the next key item in the original bulk
|
||||
retrieval buffer.</ul>
|
||||
<b>data</b><ul compact><li>The <b>data</b> parameter will be filled in with a reference to a buffer,
|
||||
a size, and an offset that yields the next data item in the original bulk
|
||||
retrieval buffer.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbMultipleRecnoDataIterator</b>
|
||||
<p>This class is used to iterate through data returned using the
|
||||
<a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a> flag from a database belonging to the Recno or
|
||||
Queue access methods.</p>
|
||||
<p>The constructor takes the data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to
|
||||
<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a>
|
||||
flag.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>dbt</b><ul compact><li>The <b>dbt</b> parameter is a data <a href="../api_cxx/dbt_class.html">Dbt</a> returned by the call to
|
||||
<a href="../api_cxx/db_get.html">Db::get</a> or <a href="../api_cxx/dbc_get.html">Dbc::get</a> that used the <a href="../api_cxx/dbc_get.html#DB_MULTIPLE_KEY">DB_MULTIPLE_KEY</a>
|
||||
flag.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbMultipleRecnoDataIterator.next</b>
|
||||
The DbMultipleRecnoDataIterator.next method takes a <b>db_recno_t</b>
|
||||
for the key and a <a href="../api_cxx/dbt_class.html">Dbt</a> for a data item, which will be filled in
|
||||
with a pointer to a buffer and a size. Together they yield the next key
|
||||
and data item in the original bulk retrieval buffer.
|
||||
<p>The DbMultipleRecnoDataIterator.next method returns false if no more
|
||||
data are available, and true otherwise.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>key</b><ul compact><li>The <b>key</b> parameter will be filled in with a reference to a
|
||||
buffer, a size, and an offset that yields the next key item in the
|
||||
original bulk retrieval buffer.</ul>
|
||||
<b>data</b><ul compact><li>The <b>data</b> parameter will be filled in with a reference to a
|
||||
buffer, a size, and an offset that yields the next data item in the
|
||||
original bulk retrieval buffer.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
290
docs/api_cxx/dbt_class.html
Normal file
290
docs/api_cxx/dbt_class.html
Normal file
@@ -0,0 +1,290 @@
|
||||
<!--$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</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
class Dbt {
|
||||
public:
|
||||
Dbt(void *data, size_t size);
|
||||
Dbt();
|
||||
Dbt(const Dbt &);
|
||||
Dbt &operator = (const Dbt &);
|
||||
~Dbt();
|
||||
<p>
|
||||
void *get_data() const;
|
||||
void set_data(void *);
|
||||
<p>
|
||||
u_int32_t get_size() const;
|
||||
void set_size(u_int32_t);
|
||||
<p>
|
||||
u_int32_t get_ulen() const;
|
||||
void set_ulen(u_int32_t);
|
||||
<p>
|
||||
u_int32_t get_dlen() const;
|
||||
void set_dlen(u_int32_t);
|
||||
<p>
|
||||
u_int32_t get_doff() const;
|
||||
void set_doff(u_int32_t);
|
||||
<p>
|
||||
u_int32_t get_flags() const;
|
||||
void set_flags(u_int32_t);
|
||||
<p>
|
||||
DBT *Dbt::get_DBT();
|
||||
const DBT *Dbt::get_const_DBT() const;
|
||||
static Dbt *Dbt::get_Dbt(DBT *dbt);
|
||||
static const Dbt *Dbt::get_const_Dbt(const DBT *dbt);
|
||||
};
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt</b>
|
||||
<p>This information describes the specific details of the Dbt class,
|
||||
used to encode keys and data items in a database.</p>
|
||||
<a name="2"><!--meow--></a>
|
||||
<b>Key/Data Pairs</b>
|
||||
<p>Storage and retrieval for the <a href="../api_cxx/db_class.html">Db</a> access methods are based on
|
||||
key/data pairs. Both key and data items are represented by Dbt
|
||||
objects. 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>
|
||||
<p>The Dbt class provides simple access to an underlying data
|
||||
structure, whose elements can be examined or changed using the usual
|
||||
<b>set</b> or <b>get</b> methods. Dbt can be subclassed,
|
||||
providing a way to associate with it additional data or references to
|
||||
other structures.</p>
|
||||
<p>The constructors set all elements of the underlying structure to zero.
|
||||
The constructor with two parameters has the effect of setting all elements
|
||||
to zero except for the <b>data</b> and <b>size</b> elements.</p>
|
||||
<p>In the case in which the <b>flags</b> structure element is set to 0, when
|
||||
the application is providing Berkeley DB a key or data item to store into the
|
||||
database, Berkeley DB expects the <b>data</b> object 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> object 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>Access to Dbt objects is not re-entrant. In particular, if
|
||||
multiple threads simultaneously access the same Dbt object using
|
||||
<a href="../api_cxx/db_class.html">Db</a> API calls, the results are undefined, and may result in a
|
||||
crash. One easy way to avoid problems is to use Dbt objects
|
||||
that are constructed as stack variables.</p>
|
||||
<p>Each Dbt object has an associated DBT struct, which is used by
|
||||
the underlying implementation of Berkeley DB and its C-language API. The
|
||||
Dbt::get_DBT method returns a pointer to this struct. Given a const
|
||||
Dbt object, Dbt::get_const_DBT returns a const pointer to the
|
||||
same struct.</p>
|
||||
<p>Given a DBT struct, the Dbt::get_Dbt method returns the corresponding
|
||||
Dbt object, if there is one. If the DBT object was not
|
||||
associated with a Dbt (that is, it was not returned from a call
|
||||
to Dbt::get_DBT), then the result of Dbt::get_Dbt is undefined. Given
|
||||
a const DBT struct, Dbt::get_const_Dbt returns the associated const
|
||||
Dbt object, if there is one.</p>
|
||||
<p>These methods may be useful for Berkeley DB applications including both C
|
||||
and C++ language software. It should not be necessary to use these
|
||||
calls in a purely C++ application.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::set_data</b>
|
||||
<p>Set the data array.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>data</b><ul compact><li>The <b>data</b> parameter is an array of bytes to be used to set the
|
||||
content for the Dbt.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::get_data</b>
|
||||
<p>Return the data array.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::set_recno_key_data</b>
|
||||
<p>Initialize the data array from a logical record number. Recno database
|
||||
records are ordered by integer keys starting at 1. When the
|
||||
Dbt::set_recno_key_data method is called, the data, size and offset
|
||||
fields in the Dbt are implicitly set to hold a byte array
|
||||
representation of the integer key.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>recno</b><ul compact><li>The <b>recno</b> parameter logical record number used to initialize the
|
||||
data array.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::get_recno_key_data</b>
|
||||
<p>Return an object from the data array, expecting that data to be a
|
||||
logical record number.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::set_offset</b>
|
||||
<p>Set the byte offset into the data array.</p>
|
||||
<p>The number of bytes offset into the <b>data</b> array determine the
|
||||
portion of the array actually used. This element is accessed using
|
||||
Dbt::get_offset and Dbt::set_offset.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>offset</b><ul compact><li>The <b>offset</b> parameter is the byte offset into the data array.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::get_offset</b>
|
||||
<p>Return the byte offset into the data array.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::set_size</b>
|
||||
<p>Set the byte size of the data array.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>size</b><ul compact><li>The <b>size</b> parameter is the size of the data array in bytes.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::get_size</b>
|
||||
<p>Return the data array size.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::set_ulen</b>
|
||||
<p>Set the byte size of the user-specified buffer.</p>
|
||||
<p>Note that applications can determine the length of a record by setting
|
||||
the <b>ulen</b> to 0 and checking the return value found in <b>size</b>.
|
||||
See the DB_DBT_USERMEM flag for more information.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>ulen</b><ul compact><li>The <b>ulen</b> parameter the size of the data array in bytes.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::get_ulen</b>
|
||||
<p>Return the length in bytes of the user-specified buffer.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::set_dlen</b>
|
||||
<p>Set the byte length of the partial record being read or written by the
|
||||
application, in bytes. See the DB_DBT_PARTIAL flag for more
|
||||
information.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>dlen</b><ul compact><li>The <b>dlen</b> parameter is the length of the partial record in bytes.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::get_dlen</b>
|
||||
<p>Return the length of the partial record, in bytes.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::set_doff</b>
|
||||
<p>Set the offset of the partial record being read or written by the
|
||||
application, in bytes. See the DB_DBT_PARTIAL flag for more
|
||||
information.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>doff</b><ul compact><li>The <b>doff</b> parameter is the offset of the partial record.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::get_doff</b>
|
||||
<p>Return the offset of the partial record, in bytes.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::set_flags</b>
|
||||
<p>Set the object flag value.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>flags</b><ul compact><li>The <b>flags</b> parameter is Dbt flag value.</ul>
|
||||
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
|
||||
method), and return a pointer to it in the <b>data</b> field of the key
|
||||
or data Dbt object. 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
|
||||
method), and return a pointer to it in the <b>data</b> field of the key
|
||||
or data Dbt object. 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>
|
||||
<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 object 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 referred to by the <b>data</b> field.
|
||||
Otherwise, the <b>size</b> fields of both the key and data Dbt
|
||||
objects are 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>
|
||||
<br>
|
||||
<p>If DB_DBT_MALLOC or DB_DBT_REALLOC is specified, Berkeley DB
|
||||
allocates a properly sized byte array to contain the data. This can be
|
||||
convenient if you know little about the nature of the data, specifically
|
||||
the size of data in the database. However, if your application makes
|
||||
repeated calls to retrieve keys or data, you may notice increased garbage
|
||||
collection due to this allocation. If you know the maximum size of data
|
||||
you are retrieving, you might decrease the memory burden and speed your
|
||||
application by allocating your own byte array and using
|
||||
DB_DBT_USERMEM. Even if you don't know the maximum size, you can
|
||||
use this option and reallocate your array whenever your retrieval API call
|
||||
returns an DB_BUFFER_SMALL error or throws an exception
|
||||
encapsulating an DB_BUFFER_SMALL.</p>
|
||||
<br>
|
||||
<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>
|
||||
objects.
|
||||
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_cxx/db_put.html">Db::put</a>
|
||||
method in a database that supports duplicate records.
|
||||
Partial puts in databases supporting duplicate records must be done
|
||||
using a <a href="../api_cxx/dbc_class.html">Dbc</a> method.</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_cxx/db_associate.html">Db::associate</a> or <a href="../api_cxx/db_set_append_recno.html">Db::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 DB_DBT_APPMALLOC 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_cxx/db_associate.html">Db::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 DB_DBT_APPMALLOC 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>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: Dbt::get_flags</b>
|
||||
<p>Return the object flag value.</p>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
21
docs/api_cxx/dbt_package.html
Normal file
21
docs/api_cxx/dbt_package.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!--$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_cxx/dbt_class.html">Dbt</a></td><td>Key/data pairs</td></tr>
|
||||
<tr><td><a href="../api_cxx/dbt_bulk_class.html">DbMultipleDataIterator</a></td><td>Next bulk get retrieval</td></tr>
|
||||
<tr><td><a href="../api_cxx/dbt_bulk_class.html">DbMultipleKeyDataIterator</a></td><td>Next bulk get retrieval</td></tr>
|
||||
<tr><td><a href="../api_cxx/dbt_bulk_class.html">DbMultipleRecnoDataIterator</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>
|
||||
42
docs/api_cxx/deadlock_class.html
Normal file
42
docs/api_cxx/deadlock_class.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!--$Id: deadlock_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: DbDeadlockException</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>DbDeadlockException</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
class DbDeadlockException : public DbException { ... };
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbDeadlockException</b>
|
||||
<p>This information describes the DbDeadlockException class and how
|
||||
it is used in the Berkeley DB library.</p>
|
||||
<p>A DbDeadlockException is thrown when multiple threads competing
|
||||
for a lock are deadlocked, when a lock request has timed out, or when a
|
||||
lock request would need to block and the transaction has been configured
|
||||
to not wait for locks. One of the threads' transactions is selected for
|
||||
termination, and a DbDeadlockException is thrown to that thread.</p>
|
||||
<p>The <a href="../api_cxx/except_class.html">DbException</a> errno value is set to DB_LOCK_DEADLOCK.</p>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
59
docs/api_cxx/env_cdsgroup_begin.html
Normal file
59
docs/api_cxx/env_cdsgroup_begin.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!--$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: DbEnv::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>DbEnv::cdsgroup_begin</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::cdsgroup_begin(DbTxn **tid);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::cdsgroup_begin</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The DbEnv::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_cxx/txn_class.html">DbTxn</a> that uniquely identifies the locker ID into the memory
|
||||
to which <b>tid</b> refers. Calling the <a href="../api_cxx/txn_commit.html">DbTxn::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 DbEnv::cdsgroup_begin method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::cdsgroup_begin method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<br><b>Errors</b>
|
||||
<p>If the maximum number of lockers has been reached, the DbEnv::cdsgroup_begin method will fail and
|
||||
either return ENOMEM or
|
||||
throw a DbMemoryException.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/txn_class.html">DbTxn</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/txn_list.html">Transaction Subsystem and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/env_class.html
Normal file
97
docs/api_cxx/env_class.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<!--$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: DbEnv</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>DbEnv</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
class DbEnv {
|
||||
public:
|
||||
DbEnv(u_int32 flags);
|
||||
~DbEnv();
|
||||
<p>
|
||||
DB_ENV *DbEnv::get_DB_ENV();
|
||||
const DB_ENV *DbEnv::get_const_DB_ENV() const;
|
||||
static DbEnv *DbEnv::get_DbEnv(DB_ENV *dbenv);
|
||||
static const DbEnv *DbEnv::get_const_DbEnv(const DB_ENV *dbenv);
|
||||
...
|
||||
};
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv</b>
|
||||
<p>The DbEnv 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 DbEnv handle are used to configure the
|
||||
environment as well as to operate on subsystems and databases in the
|
||||
environment.</p>
|
||||
<p>DbEnv handles are free-threaded if the <a href="../api_cxx/env_open.html#DB_THREAD">DB_THREAD</a> flag
|
||||
is specified to the <a href="../api_cxx/env_open.html">DbEnv::open</a> method when the environment is opened.
|
||||
The DbEnv handle should not be closed while any other handle
|
||||
remains open that is using it as a reference (for example, <a href="../api_cxx/db_class.html">Db</a>
|
||||
or <a href="../api_cxx/txn_class.html">DbTxn</a>). Once either the <a href="../api_cxx/env_close.html">DbEnv::close</a> or
|
||||
<a href="../api_cxx/env_remove.html">DbEnv::remove</a> methods are called, the handle may not be accessed again,
|
||||
regardless of the method's return.</p>
|
||||
<p>The constructor creates the DbEnv object. The constructor
|
||||
allocates memory internally; calling the <a href="../api_cxx/env_close.html">DbEnv::close</a> or
|
||||
<a href="../api_cxx/env_remove.html">DbEnv::remove</a> methods will free that memory.</p>
|
||||
<p>The following <b>flags</b> value may be specified:</p>
|
||||
<br>
|
||||
<b><a name="DB_CXX_NO_EXCEPTIONS">DB_CXX_NO_EXCEPTIONS</a></b><ul compact><li>The Berkeley DB C++ API supports two different error behaviors. By default,
|
||||
whenever an error occurs, an exception is thrown that encapsulates the
|
||||
error information. This generally allows for cleaner logic for
|
||||
transaction processing because a try block can surround a single
|
||||
transaction. However, if DB_CXX_NO_EXCEPTIONS is specified,
|
||||
exceptions are not thrown; instead, each individual function returns an
|
||||
error code.</ul>
|
||||
<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_cxx/env_set_rpc_server.html">DbEnv::set_rpc_server</a> function to establish the
|
||||
connection to the server.</p>
|
||||
<br>
|
||||
<p>Each DbEnv object has an associated DB_ENV structure,
|
||||
which is used by the underlying implementation of Berkeley DB and its
|
||||
C-language API. The DbEnv::get_DB_ENV method returns a pointer to this
|
||||
struct. Given a const DbEnv object, DbEnv::get_const_DB_ENV
|
||||
returns a const pointer to the same struct.</p>
|
||||
<p>Given a DB_ENV struct, the DbEnv::get_DbEnv method returns the
|
||||
corresponding DbEnv object, if there is one. If the
|
||||
DB_ENV object was not associated with a DbEnv (that is,
|
||||
it was not returned from a call to DbEnv::get_DB_ENV), then the result
|
||||
of DbEnv::get_DbEnv is undefined. Given a const DB_ENV struct,
|
||||
DbEnv::get_const_Db_Env returns the associated const DbEnv
|
||||
object, if there is one.</p>
|
||||
<p>These methods may be useful for Berkeley DB applications including both C
|
||||
and C++ language software. It should not be necessary to use these
|
||||
calls in a purely C++ application.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
DbEnv
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/env_close.html
Normal file
81
docs/api_cxx/env_close.html
Normal 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: DbEnv::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>DbEnv::close</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
DbEnv::close(u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::close</b>
|
||||
<p>The DbEnv::close method closes the Berkeley DB environment, freeing any
|
||||
allocated resources and closing any underlying subsystems.</p>
|
||||
<p>The <a href="../api_cxx/env_class.html">DbEnv</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_cxx/db_class.html">Db</a>, <a href="../api_cxx/dbc_class.html">Dbc</a>, <a href="../api_cxx/txn_class.html">DbTxn</a>,
|
||||
<a href="../api_cxx/logc_class.html">DbLogc</a> and <a href="../api_cxx/mempfile_class.html">DbMpoolFile</a> handles.</p>
|
||||
<p>Where the environment was initialized with the <a href="../api_cxx/env_open.html#DB_INIT_LOCK">DB_INIT_LOCK</a>
|
||||
flag, calling DbEnv::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_cxx/lock_vec.html">DbEnv::lock_vec</a> call.</p>
|
||||
<p>Where the environment was initialized with the <a href="../api_cxx/env_open.html#DB_INIT_MPOOL">DB_INIT_MPOOL</a>
|
||||
flag, calling DbEnv::close implies calls to <a href="../api_cxx/memp_fclose.html">DbMpoolFile::close</a> for
|
||||
any remaining open files in the memory pool that were returned to this
|
||||
process by calls to <a href="../api_cxx/memp_fopen.html">DbMpoolFile::open</a>. It does not imply a call to
|
||||
<a href="../api_cxx/memp_fsync.html">DbMpoolFile::sync</a> for those files.</p>
|
||||
<p>Where the environment was initialized with the <a href="../api_cxx/env_open.html#DB_INIT_TXN">DB_INIT_TXN</a> flag,
|
||||
calling DbEnv::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 DbEnv::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_cxx/log_cursor.html">DbEnv::log_cursor</a> method, calling
|
||||
DbEnv::close does not imply closing those cursors.</p>
|
||||
<p>In multithreaded applications, only a single thread may call
|
||||
DbEnv::close.</p>
|
||||
<p>After DbEnv::close has been called, regardless of its return, the
|
||||
Berkeley DB environment handle may not be accessed again.</p>
|
||||
<p>The DbEnv::close method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
109
docs/api_cxx/env_dbremove.html
Normal file
109
docs/api_cxx/env_dbremove.html
Normal file
@@ -0,0 +1,109 @@
|
||||
<!--$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: DbEnv::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>DbEnv::dbremove</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::dbremove(DbTxn *txnid,
|
||||
const char *file, const char *database, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::dbremove</b>
|
||||
<p>The DbEnv::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_cxx/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 DbEnv::dbremove method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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>DbEnv::dbremove is affected by any database directory specified using
|
||||
the <a href="../api_cxx/env_set_data_dir.html">DbEnv::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 DbEnv::dbremove method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or return one of
|
||||
the following non-zero errors:</p>
|
||||
<br>
|
||||
<b>EINVAL</b><ul compact><li>If DbEnv::dbremove called before <a href="../api_cxx/env_open.html">DbEnv::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>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the DbEnv::dbremove method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the DbEnv::dbremove method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
112
docs/api_cxx/env_dbrename.html
Normal file
112
docs/api_cxx/env_dbrename.html
Normal file
@@ -0,0 +1,112 @@
|
||||
<!--$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: DbEnv::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>DbEnv::dbrename</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::dbrename(DbTxn *txnid, const char *file,
|
||||
const char *database, const char *newname, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::dbrename</b>
|
||||
<p>The DbEnv::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
|
||||
DbEnv::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 DbEnv::dbrename method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::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_cxx/txn_begin.html">DbEnv::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_cxx/env_cdsgroup_begin.html">DbEnv::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>DbEnv::dbrename is affected by any database directory specified using
|
||||
the <a href="../api_cxx/env_set_data_dir.html">DbEnv::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 DbEnv::dbrename method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or return one of
|
||||
the following non-zero errors:</p>
|
||||
<br>
|
||||
<b>EINVAL</b><ul compact><li>If DbEnv::dbrename called before <a href="../api_cxx/env_open.html">DbEnv::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>
|
||||
<p>If a transactional database environment operation was selected to
|
||||
resolve a deadlock, the DbEnv::dbrename method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or
|
||||
throw a <a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception.</p>
|
||||
<p>If a Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable
|
||||
to grant a lock in the allowed time, the DbEnv::dbrename method will fail and
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception.</p>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/env_err.html
Normal file
82
docs/api_cxx/env_err.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!--$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: DbEnv::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>DbEnv::err</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
DbEnv::err(int error, const char *fmt, ...);
|
||||
<p>
|
||||
DbEnv::errx(const char *fmt, ...);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::err</b>
|
||||
<p>The DbEnv::err, DbEnv::errx, <a href="../api_cxx/db_err.html">Db::err</a> and
|
||||
<a href="../api_cxx/db_err.html">Db::errx</a> methods provide error-messaging functionality for
|
||||
applications written using the Berkeley DB library.</p>
|
||||
<p>The <a href="../api_cxx/db_err.html">Db::err</a> and DbEnv::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_cxx/env_set_errcall.html">DbEnv::set_errcall</a> method, any prefix string specified using the
|
||||
<a href="../api_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a> method, followed by two separating characters: a colon
|
||||
and a <space> 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 <space> 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_cxx/env_strerror.html">DbEnv::strerror</a> method.</ul>
|
||||
<br>
|
||||
</blockquote>
|
||||
<p>The <a href="../api_cxx/db_err.html">Db::errx</a> and DbEnv::errx methods are the same as the
|
||||
<a href="../api_cxx/db_err.html">Db::err</a> and DbEnv::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_cxx/db_set_errcall.html">Db::set_errcall</a>
|
||||
and <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a>), that function is called with two
|
||||
parameters: any prefix string specified (see <a href="../api_cxx/db_set_errpfx.html">Db::set_errpfx</a> and
|
||||
<a href="../api_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a>) and the error message.</p>
|
||||
<p>If a C library FILE * has been set (see <a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a> and
|
||||
<a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a>), the error message is written to that output
|
||||
stream.</p>
|
||||
<p>If a C++ ostream has been set
|
||||
(see <a href="../api_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> and <a href="../api_cxx/db_set_error_stream.html">Db::set_error_stream</a>),
|
||||
the error message is written to that 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
|
||||
DbEnv::err and <a href="../api_cxx/db_err.html">Db::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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
105
docs/api_cxx/env_event_notify.html
Normal file
105
docs/api_cxx/env_event_notify.html
Normal file
@@ -0,0 +1,105 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_event_notify</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_event_notify(void (*db_event_fcn)(DB_ENV *dbenv, u_int32_t event, void *event_info));
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::set_event_notify</b>
|
||||
<p>The DbEnv::set_event_notify method configures a callback function which
|
||||
is called to notify the process of specific Berkeley DB events.</p>
|
||||
<p>The DbEnv::set_event_notify method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::set_event_notify method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::set_event_notify method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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
|
||||
either return <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a> or throw a <a href="../api_cxx/runrec_class.html">DbRunRecoveryException</a>,
|
||||
depending on the API configuration.
|
||||
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_cxx/rep_start.html">DbEnv::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_cxx/rep_start.html">DbEnv::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_cxx/repmgr_ack_policy.html">DbEnv::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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
93
docs/api_cxx/env_failchk.html
Normal file
93
docs/api_cxx/env_failchk.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!--$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: DbEnv::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>DbEnv::failchk</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::failchk(u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::failchk</b>
|
||||
<p>The DbEnv::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 DbEnv::failchk method is based on the "thread_id" and "is_alive"
|
||||
functions specified to the <a href="../api_cxx/env_set_thread_id.html">DbEnv::set_thread_id</a> method. Applications
|
||||
calling the DbEnv::failchk method must have already called the
|
||||
<a href="../api_cxx/env_set_isalive.html">DbEnv::set_isalive</a> method, on the same <a href="../api_cxx/env_class.html">DbEnv</a>, and must have
|
||||
configured their database environment using the
|
||||
<a href="../api_cxx/env_set_thread_count.html">DbEnv::set_thread_count</a> method.</p>
|
||||
<p>If DbEnv::failchk determines a thread of control exited while
|
||||
holding database read locks, it will release those locks. If
|
||||
DbEnv::failchk determines a thread of control exited with an
|
||||
unresolved transaction, the transaction will be aborted. In either of
|
||||
these cases, DbEnv::failchk will return 0 and the application may
|
||||
continue to use the database environment.</p>
|
||||
<p>In either of these cases, the DbEnv::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_cxx/env_set_msgfile.html">DbEnv::set_msgfile</a> method for more information), or
|
||||
passed to an application callback function (see the
|
||||
<a href="../api_cxx/env_set_msgcall.html">DbEnv::set_msgcall</a> method for more information).</p>
|
||||
<p>If DbEnv::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 DbEnv::failchk method may not be called before the <a href="../api_cxx/env_open.html">DbEnv::open</a> method is called.</p>
|
||||
<p>The DbEnv::failchk method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::failchk method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/env_fileid_reset.html
Normal file
74
docs/api_cxx/env_fileid_reset.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!--$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: DbEnv::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>DbEnv::fileid_reset</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::fileid_reset(const char *file, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::fileid_reset</b>
|
||||
<p>The DbEnv::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 DbEnv::fileid_reset method creates new ID
|
||||
strings for all of the databases in the physical file.</p>
|
||||
<p>The DbEnv::fileid_reset method modifies the physical file, in-place.
|
||||
Applications should not reset IDs in files that are currently in use.</p>
|
||||
<p>The DbEnv::fileid_reset method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::fileid_reset method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::fileid_reset method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/env_list.html
Normal file
57
docs/api_cxx/env_list.html
Normal 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_cxx/env_class.html">DbEnv</a></td><td>Create an environment handle</td></tr>
|
||||
<!--Db::get_env--><tr><td><a href="../api_cxx/db_getenv.html">Db::getenv</a></td><td>Return <a href="../api_cxx/db_class.html">Db</a>'s underlying <a href="../api_cxx/env_class.html">DbEnv</a> handle</td></tr>
|
||||
<!--DbEnv::close--><tr><td><a href="../api_cxx/env_close.html">DbEnv::close</a></td><td>Close an environment</td></tr>
|
||||
<!--DbEnv::dbremove--><tr><td><a href="../api_cxx/env_dbremove.html">DbEnv::dbremove</a></td><td>Remove a database</td></tr>
|
||||
<!--DbEnv::dbrename--><tr><td><a href="../api_cxx/env_dbrename.html">DbEnv::dbrename</a></td><td>Rename a database</td></tr>
|
||||
<!--DbEnv::err--><tr><td><a href="../api_cxx/env_err.html">DbEnv::err</a>, <a href="../api_cxx/env_err.html">DbEnv::errx</a></td><td>Error message</td></tr>
|
||||
<!--DbEnv::failchk--><tr><td><a href="../api_cxx/env_failchk.html">DbEnv::failchk</a></td><td>Check for thread failure</td></tr>
|
||||
<!--DbEnv::fileid_reset--><tr><td><a href="../api_cxx/env_fileid_reset.html">DbEnv::fileid_reset</a></td><td>Reset database file IDs</td></tr>
|
||||
<!--DbEnv::get_home--><tr><td><a href="../api_cxx/env_open.html">DbEnv::get_home</a></td><td>Return environment's home directory</td></tr>
|
||||
<!--DbEnv::get_open_flags--><tr><td><a href="../api_cxx/env_open.html">DbEnv::get_open_flags</a></td><td>Return flags with which the environment was opened</td></tr>
|
||||
<!--DbEnv::lsn_reset--><tr><td><a href="../api_cxx/env_lsn_reset.html">DbEnv::lsn_reset</a></td><td>Reset database file LSNs</td></tr>
|
||||
<!--DbEnv::open--><tr><td><a href="../api_cxx/env_open.html">DbEnv::open</a></td><td>Open an environment</td></tr>
|
||||
<!--DbEnv::remove--><tr><td><a href="../api_cxx/env_remove.html">DbEnv::remove</a></td><td>Remove an environment</td></tr>
|
||||
<!--DbEnv::stat_print--><tr><td><a href="../api_cxx/env_stat.html">DbEnv::stat_print</a></td><td>Environment statistics</td></tr>
|
||||
<!--db_strerror--><tr><td><a href="../api_cxx/env_strerror.html">DbEnv::strerror</a></td><td>Error strings</td></tr>
|
||||
<!--db_version--><tr><td><a href="../api_cxx/env_version.html">DbEnv::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_cxx/env_set_alloc.html">DbEnv::set_alloc</a></td><td>Set local space allocation functions</td></tr>
|
||||
<!--DbEnv::set_app_dispatch--><tr><td><a href="../api_cxx/env_set_app_dispatch.html">DbEnv::set_app_dispatch</a></td><td>Configure application recovery</td></tr>
|
||||
<!--DbEnv::set_cachesize--><tr><td><a href="../api_cxx/env_set_cachesize.html">DbEnv::set_cachesize</a></td><td>Set the environment cache size</td></tr>
|
||||
<!--DbEnv::set_data_dir--><tr><td><a href="../api_cxx/env_set_data_dir.html">DbEnv::set_data_dir</a></td><td>Set the environment data directory</td></tr>
|
||||
<!--DbEnv::set_encrypt--><tr><td><a href="../api_cxx/env_set_encrypt.html">DbEnv::set_encrypt</a></td><td>Set the environment cryptographic key</td></tr>
|
||||
<!--DbEnv::set_errcall--><tr><td><a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a>, <a href="../api_cxx/env_set_msgcall.html">DbEnv::set_msgcall</a></td><td>Set error and informational message callbacks</td></tr>
|
||||
<!--DbEnv::set_errfile--><tr><td><a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a>, <a href="../api_cxx/env_set_msgfile.html">DbEnv::set_msgfile</a></td><td>Set error and informational message FILE</td></tr>
|
||||
<!--DbEnv::set_error_stream--><tr><td><a href="../api_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a>, <a href="../api_cxx/env_set_msg_stream.html">DbEnv::set_message_stream</a></td><td>Set error and informational message output stream</td></tr>
|
||||
<!--DbEnv::set_errpfx--><tr><td><a href="../api_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a></td><td>Set error message prefix</td></tr>
|
||||
<!--DbEnv::set_event_notify--><tr><td><a href="../api_cxx/env_event_notify.html">DbEnv::set_event_notify</a></td><td>Set event notification callback</td></tr>
|
||||
<!--DbEnv::set_feedback--><tr><td><a href="../api_cxx/env_set_feedback.html">DbEnv::set_feedback</a></td><td>Set feedback callback</td></tr>
|
||||
<!--DbEnv::set_flags--><tr><td><a href="../api_cxx/env_set_flags.html">DbEnv::set_flags</a></td><td>Environment configuration</td></tr>
|
||||
<!--DbEnv::set_isalive--><tr><td><a href="../api_cxx/env_set_isalive.html">DbEnv::set_isalive</a></td><td>Set thread is-alive callback</td></tr>
|
||||
<!--DbEnv::set_intermediate_dir_mode--><tr><td><a href="../api_cxx/env_set_intermediate_dir_mode.html">DbEnv::set_intermediate_dir_mode</a></td><td>Set intermediate directory creation mode</td></tr>
|
||||
<!--DbEnv::set_rpc_server--><tr><td><a href="../api_cxx/env_set_rpc_server.html">DbEnv::set_rpc_server</a></td><td>Establish an RPC server connection</td></tr>
|
||||
<!--DbEnv::set_shm_key--><tr><td><a href="../api_cxx/env_set_shm_key.html">DbEnv::set_shm_key</a></td><td>Set system memory shared segment ID</td></tr>
|
||||
<!--DbEnv::set_thread_id--><tr><td><a href="../api_cxx/env_set_thread_id.html">DbEnv::set_thread_id</a></td><td>Set thread of control ID function</td></tr>
|
||||
<!--DbEnv::set_thread_count--><tr><td><a href="../api_cxx/env_set_thread_count.html">DbEnv::set_thread_count</a></td><td>Set approximate thread count</td></tr>
|
||||
<!--DbEnv::set_thread_id_string--><tr><td><a href="../api_cxx/env_set_thread_id_string.html">DbEnv::set_thread_id_string</a></td><td>Set thread of control ID format function</td></tr>
|
||||
<!--DbEnv::set_timeout--><tr><td><a href="../api_cxx/env_set_timeout.html">DbEnv::set_timeout</a></td><td>Set lock and transaction timeout</td></tr>
|
||||
<!--DbEnv::set_tmp_dir--><tr><td><a href="../api_cxx/env_set_tmp_dir.html">DbEnv::set_tmp_dir</a></td><td>Set the environment temporary file directory</td></tr>
|
||||
<!--DbEnv::set_verbose--><tr><td><a href="../api_cxx/env_set_verbose.html">DbEnv::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>
|
||||
164
docs/api_cxx/env_log_set_config.html
Normal file
164
docs/api_cxx/env_log_set_config.html
Normal file
@@ -0,0 +1,164 @@
|
||||
<!--$Id-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: DbEnv::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>DbEnv::log_set_config</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::log_set_config(u_int32_t flags, int onoff);
|
||||
<p>
|
||||
int
|
||||
DbEnv::log_get_config(u_int32_t which, int *onoffp)
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::log_set_config</b>
|
||||
<p>The DbEnv::log_set_config method configures the Berkeley DB logging
|
||||
subsystem.</p>
|
||||
<p>The DbEnv::log_set_config method configures a database environment, not only operations
|
||||
performed using the specified <a href="../api_cxx/env_class.html">DbEnv</a> handle.</p>
|
||||
<p>The DbEnv::log_set_config method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::log_set_config method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::log_set_config with the DB_LOG_DIRECT flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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 DbEnv::log_set_config with the DB_LOG_DSYNC flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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 DbEnv::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 DbEnv::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_cxx/env_open.html">DbEnv::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 DbEnv::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_cxx/env_open.html">DbEnv::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 DbEnv::log_set_config method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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: DbEnv::log_get_config</b>
|
||||
<p>The DbEnv::log_get_config method returns whether the specified <b>which</b>
|
||||
parameter is currently set or not.</p>
|
||||
<p>The DbEnv::log_get_config method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::log_get_config method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
80
docs/api_cxx/env_lsn_reset.html
Normal file
80
docs/api_cxx/env_lsn_reset.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<!--$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: DbEnv::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>DbEnv::lsn_reset</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::lsn_reset(const char *file, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::lsn_reset</b>
|
||||
<p>The DbEnv::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 DbEnv::lsn_reset
|
||||
on a database in a new environment when the database LSNs still reflect
|
||||
the old environment.</p>
|
||||
<p>The DbEnv::lsn_reset method modifies the physical file, in-place.
|
||||
Applications should not reset LSNs in files that are currently in use.</p>
|
||||
<p>The DbEnv::lsn_reset method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::lsn_reset method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::lsn_reset method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
277
docs/api_cxx/env_open.html
Normal file
277
docs/api_cxx/env_open.html
Normal file
@@ -0,0 +1,277 @@
|
||||
<!--$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: DbEnv::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>DbEnv::open</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::open(const char *db_home, u_int32_t flags, int mode);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_home(const char **homep);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_open_flags(u_int32_t *flagsp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::open</b>
|
||||
<p>The DbEnv::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 DbEnv::open method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
If DbEnv::open fails, the <a href="../api_cxx/env_close.html">DbEnv::close</a> method must be called
|
||||
to discard the <a href="../api_cxx/env_class.html">DbEnv</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_cxx/lock_detect.html">DbEnv::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 DbEnv::open method; or it
|
||||
should remove the environment after recovery is completed, leaving
|
||||
creation of the correctly sized environment to a subsequent call to
|
||||
DbEnv::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 DbEnv::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_cxx/env_class.html">DbEnv</a> handle returned by DbEnv::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_cxx/env_class.html">DbEnv</a> handle will be concurrently used by more than one
|
||||
thread in the process, or if any <a href="../api_cxx/db_class.html">Db</a> handles opened in the scope
|
||||
of the <a href="../api_cxx/env_class.html">DbEnv</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 DbEnv::open method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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 DbEnv::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: DbEnv::get_home</b>
|
||||
<p>The DbEnv::get_home method returns the database environment home directory.</p>
|
||||
<p>The DbEnv::get_home method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::get_open_flags</b>
|
||||
<p>The DbEnv::get_open_flags method returns the open method flags originally used to create the database environment.</p>
|
||||
<p>The DbEnv::get_open_flags method may not be called before the DbEnv::open method is called.</p>
|
||||
<p>The DbEnv::get_open_flags method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>flagsp</b><ul compact><li>The DbEnv::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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
120
docs/api_cxx/env_remove.html
Normal file
120
docs/api_cxx/env_remove.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!--$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: DbEnv::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>DbEnv::remove</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::remove(const char *db_home, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::remove</b>
|
||||
<p>The DbEnv::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_cxx/env_open.html">DbEnv::open</a> without
|
||||
calling <a href="../api_cxx/env_close.html">DbEnv::close</a> (that is, there are processes currently
|
||||
using the environment), DbEnv::remove will fail without further
|
||||
action unless the <a href="../api_cxx/env_remove.html#DB_FORCE">DB_FORCE</a> flag is set, in which case
|
||||
DbEnv::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 DbEnv::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
|
||||
DbEnv::remove as part of application shut down to free up system
|
||||
resources. For example, if the <a href="../api_cxx/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag was specified
|
||||
to <a href="../api_cxx/env_open.html">DbEnv::open</a>, it may be useful to call DbEnv::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 DbEnv::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
|
||||
DbEnv::remove.</p>
|
||||
<p>A <a href="../api_cxx/env_class.html">DbEnv</a> handle that has already been used to open an environment
|
||||
should not be used to call the DbEnv::remove method; a new
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle should be created for that purpose.</p>
|
||||
<p>After DbEnv::remove has been called, regardless of its return,
|
||||
the Berkeley DB environment handle may not be accessed again.</p>
|
||||
<p>The DbEnv::remove method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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_cxx/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 DbEnv::remove method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
102
docs/api_cxx/env_set_alloc.html
Normal file
102
docs/api_cxx/env_set_alloc.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_alloc</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
extern "C" {
|
||||
typedef void *(*db_malloc_fcn_type)(size_t);
|
||||
typedef void *(*db_realloc_fcn_type)(void *, size_t);
|
||||
typedef void *(*db_free_fcn_type)(void *);
|
||||
};
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_alloc(db_malloc_fcn_type app_malloc,
|
||||
db_realloc_fcn_type app_realloc,
|
||||
db_free_fcn_type app_free);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::set_alloc</b>
|
||||
<p>Set the allocation functions used by the <a href="../api_cxx/env_class.html">DbEnv</a> and <a href="../api_cxx/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_cxx/dbt_class.html#DB_DBT_MALLOC">DB_DBT_MALLOC</a> flag, when specified in the <a href="../api_cxx/dbt_class.html">Dbt</a> object,
|
||||
will cause the <a href="../api_cxx/db_class.html">Db</a> methods to allocate and reallocate memory
|
||||
which then becomes the responsibility of the calling application. (See
|
||||
<a href="../api_cxx/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_cxx/db_stat.html">Db::stat</a>, <a href="../api_cxx/lock_stat.html">DbEnv::lock_stat</a>, <a href="../api_cxx/log_archive.html">DbEnv::log_archive</a>,
|
||||
<a href="../api_cxx/log_stat.html">DbEnv::log_stat</a>, <a href="../api_cxx/memp_stat.html">DbEnv::memp_stat</a>, and <a href="../api_cxx/txn_stat.html">DbEnv::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_cxx/db_associate.html">Db::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 DbEnv::set_alloc and
|
||||
<a href="../api_cxx/db_set_alloc.html">Db::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 DbEnv::set_alloc method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::set_alloc method may not be called after the <a href="../api_cxx/env_open.html">DbEnv::open</a> method is
|
||||
called.
|
||||
</p>
|
||||
<p>The DbEnv::set_alloc method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::set_alloc method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_open.html">DbEnv::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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/env_set_app_dispatch.html
Normal file
103
docs/api_cxx/env_set_app_dispatch.html
Normal file
@@ -0,0 +1,103 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_app_dispatch</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_app_dispatch(int (*tx_recover)(DbEnv *dbenv,
|
||||
Dbt *log_rec, DbLsn *lsn, db_recops op));
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::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 DbEnv::set_app_dispatch method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::set_app_dispatch method may not be called after the <a href="../api_cxx/env_open.html">DbEnv::open</a> method is
|
||||
called.
|
||||
If the database environment already exists when
|
||||
<a href="../api_cxx/env_open.html">DbEnv::open</a> is called, the information specified to DbEnv::set_app_dispatch
|
||||
must be consistent with the existing environment or corruption can
|
||||
occur.</p>
|
||||
<p>The DbEnv::set_app_dispatch method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::set_app_dispatch method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_open.html">DbEnv::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_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/txn_class.html">DbTxn</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/txn_list.html">Transaction Subsystem and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/env_set_cache_max.html
Normal file
94
docs/api_cxx/env_set_cache_max.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_cache_max</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_cache_max(u_int32_t gbytes, u_int32_t bytes);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_cache_max(u_int32_t *gbytesp, u_int32_t *bytesp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::set_cache_max</b>
|
||||
<p>The DbEnv::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_cxx/env_set_cachesize.html">DbEnv::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 DbEnv::set_cache_max method configures a database environment, not only operations
|
||||
performed using the specified <a href="../api_cxx/env_class.html">DbEnv</a> handle.</p>
|
||||
<p>The DbEnv::set_cache_max method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::set_cache_max method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::set_cache_max method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_open.html">DbEnv::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::get_cache_max</b>
|
||||
<p>The DbEnv::get_cache_max method returns the maximum size of the cache.</p>
|
||||
<p>The DbEnv::get_cache_max method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_cache_max method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
124
docs/api_cxx/env_set_cachesize.html
Normal file
124
docs/api_cxx/env_set_cachesize.html
Normal file
@@ -0,0 +1,124 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_cachesize</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_cachesize(u_int32_t gbytes, u_int32_t bytes, int ncache);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_cachesize(u_int32_t *gbytesp, u_int32_t *bytesp, int *ncachep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::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 DbEnv::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_cxx/env_set_cache_max.html">DbEnv::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 DbEnv::set_cachesize method configures a database environment, not only operations
|
||||
performed using the specified <a href="../api_cxx/env_class.html">DbEnv</a> handle.</p>
|
||||
<p>The DbEnv::set_cachesize method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::set_cachesize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::set_cachesize method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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: DbEnv::get_cachesize</b>
|
||||
<p>The DbEnv::get_cachesize method returns the current size and composition of the
|
||||
cache.</p>
|
||||
<p>The DbEnv::get_cachesize method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_cachesize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
104
docs/api_cxx/env_set_data_dir.html
Normal file
104
docs/api_cxx/env_set_data_dir.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_data_dir</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_data_dir(const char *dir);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_data_dirs(const char ***dirpp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::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_cxx/db_open.html">Db::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 DbEnv::set_data_dir method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::set_data_dir method may not be called after the <a href="../api_cxx/env_open.html">DbEnv::open</a> method is
|
||||
called.
|
||||
If the database environment already exists when
|
||||
<a href="../api_cxx/env_open.html">DbEnv::open</a> is called, the information specified to DbEnv::set_data_dir
|
||||
must be consistent with the existing environment or corruption can
|
||||
occur.</p>
|
||||
<p>The DbEnv::set_data_dir method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::set_data_dir method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_open.html">DbEnv::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::get_data_dirs</b>
|
||||
<p>The DbEnv::get_data_dirs method returns the NULL-terminated array of directories.</p>
|
||||
<p>The DbEnv::get_data_dirs method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_data_dirs method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>dirpp</b><ul compact><li>The DbEnv::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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
99
docs/api_cxx/env_set_encrypt.html
Normal file
99
docs/api_cxx/env_set_encrypt.html
Normal file
@@ -0,0 +1,99 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_encrypt</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_encrypt(const char *passwd, u_int32_t flags);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_encrypt_flags(u_int32_t *flagsp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::set_encrypt</b>
|
||||
<p>Set the password used by the Berkeley DB library to perform encryption and
|
||||
decryption.</p>
|
||||
<p>The DbEnv::set_encrypt method configures a database environment, not only operations
|
||||
performed using the specified <a href="../api_cxx/env_class.html">DbEnv</a> handle.</p>
|
||||
<p>The DbEnv::set_encrypt method may not be called after the <a href="../api_cxx/env_open.html">DbEnv::open</a> method is
|
||||
called.
|
||||
If the database environment already exists when
|
||||
<a href="../api_cxx/env_open.html">DbEnv::open</a> is called, the information specified to DbEnv::set_encrypt
|
||||
must be consistent with the existing environment or an error will be
|
||||
returned.
|
||||
</p>
|
||||
<p>The DbEnv::set_encrypt method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::set_encrypt method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_open.html">DbEnv::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: DbEnv::get_encrypt_flags</b>
|
||||
<p>The DbEnv::get_encrypt_flags method returns the encryption flags.</p>
|
||||
<p>The DbEnv::get_encrypt_flags method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_encrypt_flags method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>flagsp</b><ul compact><li>The DbEnv::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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
79
docs/api_cxx/env_set_errcall.html
Normal file
79
docs/api_cxx/env_set_errcall.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_errcall</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void DbEnv::set_errcall(void (*db_errcall_fcn)
|
||||
(const Dbenv *dbenv, const char *errpfx, const char *msg));
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::set_errcall</b>
|
||||
When an error occurs in the Berkeley DB library, an exception is thrown 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>The DbEnv::set_errcall and <a href="../api_cxx/db_set_errcall.html">Db::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_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> and
|
||||
<a href="../api_cxx/db_set_error_stream.html">Db::set_error_stream</a> methods to display the additional information via
|
||||
an output stream, or the <a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a> or
|
||||
<a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a> methods to display the additional information via a C
|
||||
library FILE *. You should not mix these approaches.</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 DbEnv::set_errcall method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::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_cxx/db_set_errpfx.html">Db::set_errpfx</a> or <a href="../api_cxx/env_set_errpfx.html">DbEnv::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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
100
docs/api_cxx/env_set_errfile.html
Normal file
100
docs/api_cxx/env_set_errfile.html
Normal file
@@ -0,0 +1,100 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_errfile</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void
|
||||
DbEnv::set_errfile(FILE *errfile);
|
||||
<p>
|
||||
void
|
||||
DbEnv::get_errfile(FILE **errfilep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::set_errfile</b>
|
||||
When an error occurs in the Berkeley DB library, an exception is thrown or an
|
||||
error return value is returned by the interface. In some cases,
|
||||
however, the exception or returned value may be insufficient to
|
||||
completely describe the cause of the error, especially during initial
|
||||
application debugging.
|
||||
<p>The <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a> and <a href="../api_cxx/db_set_errcall.html">Db::set_errcall</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>Alternatively, you can use the <a href="../api_cxx/env_set_error_stream.html">DbEnv::set_error_stream</a> method to display
|
||||
the additional information via an output stream, or the
|
||||
<a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a> method to capture the additional error information in
|
||||
a way that does not use either output streams or C library FILE *'s. You
|
||||
should not mix these approaches.</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_cxx/db_set_errpfx.html">Db::set_errpfx</a> or <a href="../api_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a>), an error string, and
|
||||
a trailing <newline> character.</p>
|
||||
<p>The default configuration when applications first create <a href="../api_cxx/db_class.html">Db</a> or
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handles is as if the DbEnv::set_errfile or
|
||||
<a href="../api_cxx/db_set_errfile.html">Db::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
|
||||
DbEnv::set_errfile or <a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a> methods with NULL as the
|
||||
FILE * argument. Additionally, explicitly configuring the error output
|
||||
channel using any of the DbEnv::set_errfile,
|
||||
<a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a>, <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a>,
|
||||
<a href="../api_cxx/db_set_errcall.html">Db::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 DbEnv::set_errfile method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::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: DbEnv::get_errfile</b>
|
||||
<p>The DbEnv::get_errfile method returns the FILE *.</p>
|
||||
<p>The DbEnv::get_errfile method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_errfile method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>errfilep</b><ul compact><li>The DbEnv::get_errfile method returns the
|
||||
FILE * in <b>errfilep</b>.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
72
docs/api_cxx/env_set_error_stream.html
Normal file
72
docs/api_cxx/env_set_error_stream.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!--$Id: env_set_error_stream.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: DbEnv::set_error_stream</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>DbEnv::set_error_stream</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void DbEnv::set_error_stream(class ostream*);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::set_error_stream</b>
|
||||
<p>When an error occurs in the Berkeley DB library, an exception is thrown or an
|
||||
<b>errno</b> 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 DbEnv::set_error_stream and <a href="../api_cxx/db_set_error_stream.html">Db::set_error_stream</a> methods
|
||||
are used to enhance the mechanism for reporting error messages to the
|
||||
application by setting the C++ ostream 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 stream.</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_cxx/env_set_errpfx.html">DbEnv::set_errpfx</a>), an error string, and a trailing
|
||||
<newline> character.</p>
|
||||
<p>Setting <b>stream</b> to NULL unconfigures the interface.</p>
|
||||
<p>Alternatively, you can use the <a href="../api_cxx/env_set_errfile.html">DbEnv::set_errfile</a> and
|
||||
<a href="../api_cxx/db_set_errfile.html">Db::set_errfile</a> methods to display the additional information via a C
|
||||
library FILE *, or the <a href="../api_cxx/env_set_errcall.html">DbEnv::set_errcall</a> and
|
||||
<a href="../api_cxx/db_set_errcall.html">Db::set_errcall</a> methods to capture the additional error information
|
||||
in a way that does not use either output streams or C library FILE *'s.
|
||||
You should not mix these approaches.</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 DbEnv::set_error_stream method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::set_error_stream method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>stream</b><ul compact><li>The <b>stream</b> parameter is the application-specified output stream to
|
||||
be used for additional error information.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
73
docs/api_cxx/env_set_errpfx.html
Normal file
73
docs/api_cxx/env_set_errpfx.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_errpfx</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
void
|
||||
DbEnv::set_errpfx(const char *errpfx);
|
||||
<p>
|
||||
void
|
||||
DbEnv::get_errpfx(const char **errpfxp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::set_errpfx</b>
|
||||
<p>Set the prefix string that appears before error messages issued by Berkeley DB.</p>
|
||||
<p>The <a href="../api_cxx/db_set_errpfx.html">Db::set_errpfx</a> and DbEnv::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 DbEnv::set_errpfx method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::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: DbEnv::get_errpfx</b>
|
||||
<p>The DbEnv::get_errpfx method returns the error prefix.</p>
|
||||
<p>The DbEnv::get_errpfx method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_errpfx method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>errpfxp</b><ul compact><li>The DbEnv::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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
76
docs/api_cxx/env_set_feedback.html
Normal file
76
docs/api_cxx/env_set_feedback.html
Normal 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: DbEnv::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>DbEnv::set_feedback</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_feedback(void (*db_feedback_fcn)(DbEnv *dbenv, int opcode, int percent));
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::set_feedback</b>
|
||||
<p>Some operations performed by the Berkeley DB library can take non-trivial
|
||||
amounts of time. The DbEnv::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 DbEnv::set_feedback method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle
|
||||
<p>The DbEnv::set_feedback method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::set_feedback method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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_cxx/env_set_flags.html
Normal file
329
docs/api_cxx/env_set_flags.html
Normal file
@@ -0,0 +1,329 @@
|
||||
<!--$Id-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: DbEnv::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>DbEnv::set_flags</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_flags(u_int32_t flags, int onoff);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_flags(u_int32_t *flagsp)
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::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 DbEnv::set_flags method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/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 DbEnv::set_flags with the <a href="../api_cxx/env_set_flags.html#DB_AUTO_COMMIT">DB_AUTO_COMMIT</a> flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</a>
|
||||
handles opened in the environment must either set the <a href="../api_cxx/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_cxx/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 DbEnv::set_flags with the DB_CDB_ALLDB flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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_cxx/env_open.html">DbEnv::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 DbEnv::set_flags with the DB_DIRECT_DB flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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 DbEnv::set_flags with the DB_DSYNC_DB flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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_cxx/db_open.html">Db::open</a>. This flag will
|
||||
be ignored for queue databases for which DB_MULTIVERSION is not
|
||||
supported.
|
||||
<p>Calling DbEnv::set_flags with the DB_MULTIVERSION flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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 DbEnv::set_flags with the DB_NOLOCKING flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_set_mp_mmapsize.html">DbEnv::set_mp_mmapsize</a> method for further
|
||||
information).
|
||||
<p>Calling DbEnv::set_flags with the DB_NOMMAP flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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 DbEnv::set_flags with the DB_NOPANIC flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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 DbEnv::set_flags with the DB_OVERWRITE flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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 DbEnv::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_cxx/env_open.html">DbEnv::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 DbEnv::set_flags with the DB_REGION_INIT flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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
|
||||
throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a> exception instead of
|
||||
<a href="../api_cxx/deadlock_class.html">DbDeadlockException</a>.
|
||||
This allows applications to distinguish between operations which have
|
||||
deadlocked and operations which have exceeded their time limits.
|
||||
<p>Calling DbEnv::set_flags with the DB_TIME_NOTGRANTED flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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 DbEnv::set_flags with the DB_TXN_NOSYNC flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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
|
||||
either return <a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a> or throw a
|
||||
<a href="../api_cxx/deadlock_class.html">DbDeadlockException</a> exception (or return
|
||||
<a href="../ref/program/errorret.html#DB_LOCK_NOTGRANTED">DB_LOCK_NOTGRANTED</a> or throw a <a href="../api_cxx/lockng_class.html">DbLockNotGrantedException</a>
|
||||
exception if configured using the DB_TIME_NOTGRANTED flag).
|
||||
<p>Calling DbEnv::set_flags with the DB_TXN_NOWAIT flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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_cxx/txn_begin.html">DbEnv::txn_begin</a>, and all
|
||||
non-transactional cursors will be opened as if DB_TXN_SNAPSHOT
|
||||
were passed to <a href="../api_cxx/db_cursor.html">Db::cursor</a>.
|
||||
<p>Calling DbEnv::set_flags with the DB_TXN_SNAPSHOT flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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 DbEnv::set_flags with the DB_TXN_WRITE_NOSYNC flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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 DbEnv::set_flags with the DB_YIELDCPU flag only affects
|
||||
the specified <a href="../api_cxx/env_class.html">DbEnv</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_cxx/env_class.html">DbEnv</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 DbEnv::set_flags method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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: DbEnv::get_flags</b>
|
||||
<p>The DbEnv::get_flags method returns the configuration flags.</p>
|
||||
<p>The DbEnv::get_flags method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_flags method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>flagsp</b><ul compact><li>The DbEnv::get_flags method returns the
|
||||
configuration flags in <b>flagsp</b>.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
118
docs/api_cxx/env_set_intermediate_dir_mode.html
Normal file
118
docs/api_cxx/env_set_intermediate_dir_mode.html
Normal file
@@ -0,0 +1,118 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_intermediate_dir_mode</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_intermediate_dir_mode(u_int32_t mode);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_intermediate_dir_mode(u_int32_t *modep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::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 DbEnv::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 DbEnv::set_intermediate_dir_mode method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::set_intermediate_dir_mode method may not be called after the <a href="../api_cxx/env_open.html">DbEnv::open</a> method is
|
||||
called.
|
||||
</p>
|
||||
<p>The DbEnv::set_intermediate_dir_mode method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::set_intermediate_dir_mode method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_open.html">DbEnv::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::get_intermediate_dir_mode</b>
|
||||
<p>The DbEnv::get_intermediate_dir_mode method returns the intermediate directory permissions.</p>
|
||||
<p>The DbEnv::get_intermediate_dir_mode method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_intermediate_dir_mode method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>modep</b><ul compact><li>The DbEnv::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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
84
docs/api_cxx/env_set_isalive.html
Normal file
84
docs/api_cxx/env_set_isalive.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_isalive</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_isalive(int (*is_alive)(DbEnv *dbenv, pid_t pid, db_threadid_t tid, u_int32_t flags));
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::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 DbEnv::set_isalive method
|
||||
supports the <a href="../api_cxx/env_failchk.html">DbEnv::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 DbEnv::set_isalive method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::set_isalive method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::set_isalive method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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_cxx/env_set_thread_id.html">DbEnv::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_cxx/env_set_thread_id.html">DbEnv::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 DbEnv::set_isalive method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
111
docs/api_cxx/env_set_lg_bsize.html
Normal file
111
docs/api_cxx/env_set_lg_bsize.html
Normal file
@@ -0,0 +1,111 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_lg_bsize</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_lg_bsize(u_int32_t lg_bsize);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_lg_bsize(u_int32_t *lg_bsizep);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::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 DbEnv::set_lg_bsize method configures a database environment, not only operations
|
||||
performed using the specified <a href="../api_cxx/env_class.html">DbEnv</a> handle.</p>
|
||||
<p>The DbEnv::set_lg_bsize method may not be called after the <a href="../api_cxx/env_open.html">DbEnv::open</a> method is
|
||||
called.
|
||||
If the database environment already exists when
|
||||
<a href="../api_cxx/env_open.html">DbEnv::open</a> is called, the information specified to DbEnv::set_lg_bsize
|
||||
will be ignored.
|
||||
</p>
|
||||
<p>The DbEnv::set_lg_bsize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::set_lg_bsize method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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: DbEnv::get_lg_bsize</b>
|
||||
<p>The DbEnv::get_lg_bsize method returns the size of the log buffer, in bytes.</p>
|
||||
<p>The DbEnv::get_lg_bsize method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_lg_bsize method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>lg_bsizep</b><ul compact><li>The DbEnv::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_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/logc_class.html">DbLogc</a>, <a href="../api_cxx/lsn_class.html">DbLsn</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/log_list.html">Logging Subsystem and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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>
|
||||
102
docs/api_cxx/env_set_lg_dir.html
Normal file
102
docs/api_cxx/env_set_lg_dir.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<!--$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: DbEnv::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>DbEnv::set_lg_dir</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<a href="../api_cxx/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 <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::set_lg_dir(const char *dir);
|
||||
<p>
|
||||
int
|
||||
DbEnv::get_lg_dir(const char **dirp);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::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 DbEnv::set_lg_dir method configures operations performed using the specified
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
|
||||
database environment.</p>
|
||||
<p>The DbEnv::set_lg_dir method may not be called after the <a href="../api_cxx/env_open.html">DbEnv::open</a> method is
|
||||
called.
|
||||
If the database environment already exists when
|
||||
<a href="../api_cxx/env_open.html">DbEnv::open</a> is called, the information specified to DbEnv::set_lg_dir
|
||||
must be consistent with the existing environment or corruption can
|
||||
occur.</p>
|
||||
<p>The DbEnv::set_lg_dir method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 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 DbEnv::set_lg_dir method
|
||||
may fail and throw
|
||||
<a href="../api_cxx/except_class.html">DbException</a>,
|
||||
encapsulating one of the following non-zero errors, or 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_cxx/env_open.html">DbEnv::open</a> was called; or if an
|
||||
invalid flag value or parameter was specified.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::get_lg_dir</b>
|
||||
<p>The DbEnv::get_lg_dir method returns the log directory.</p>
|
||||
<p>The DbEnv::get_lg_dir method may be called at any time during the life of the
|
||||
application.</p>
|
||||
<p>The DbEnv::get_lg_dir method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>dirp</b><ul compact><li>The DbEnv::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_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/logc_class.html">DbLogc</a>, <a href="../api_cxx/lsn_class.html">DbLsn</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/log_list.html">Logging Subsystem and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<a href="../api_cxx/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
Reference in New Issue
Block a user