1<!--$Id: db_set_bt_minkey.so,v 10.38 2004/09/28 15:04:19 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB: Db::set_bt_minkey</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td> 13<b>Db::set_bt_minkey</b> 14</td> 15<td align=right> 16<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a> 17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db_cxx.h> 23<p> 24int 25Db::set_bt_minkey(u_int32_t bt_minkey); 26<p> 27int 28Db::get_bt_minkey(u_int32_t *bt_minkeyp); 29</pre></b> 30<hr size=1 noshade> 31<b>Description: Db::set_bt_minkey</b> 32<p>Set the minimum number of key/data pairs intended to be stored on any 33single Btree leaf page.</p> 34<p>This value is used to determine if key or data items will be stored on 35overflow pages instead of Btree leaf pages. For more information on 36the 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 37be at least 2; if <b>bt_minkey</b> is not explicitly set, a value of 382 is used.</p> 39<p>The Db::set_bt_minkey method configures a database, not only operations performed 40using the specified <a href="../api_cxx/db_class.html">Db</a> handle.</p> 41<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. 42If the database already exists when 43<a href="../api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_bt_minkey will 44be ignored. 45</p> 46<p>The Db::set_bt_minkey method 47either returns a non-zero error value 48or throws an exception that encapsulates a non-zero error value on 49failure, and returns 0 on success. 50</p> 51<b>Parameters</b> <br> 52 <b>bt_minkey</b><ul compact><li>The <b>bt_minkey</b> parameter is the minimum number of key/data pairs 53intended to be stored on any single Btree leaf page.</ul> 54<br> 55<br><b>Errors</b> 56<p>The Db::set_bt_minkey method 57may fail and throw 58<a href="../api_cxx/except_class.html">DbException</a>, 59encapsulating one of the following non-zero errors, or return one of 60the following non-zero errors:</p> 61<br> 62<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 63invalid flag value or parameter was specified.</ul> 64<br> 65<hr size=1 noshade> 66<b>Description: Db::get_bt_minkey</b> 67<p>The Db::get_bt_minkey method returns the minimum number of key/data pairs intended to be stored on any single Btree 68leaf page.</p> 69<p>The Db::get_bt_minkey method may be called at any time during the life of the 70application.</p> 71<p>The Db::get_bt_minkey method 72either returns a non-zero error value 73or throws an exception that encapsulates a non-zero error value on 74failure, and returns 0 on success. 75</p> 76<b>Parameters</b> <br> 77 <b>bt_minkeyp</b><ul compact><li>The Db::get_bt_minkey method returns the 78minimum number of key/data pairs intended to be stored on any single Btree 79leaf page in <b>bt_minkeyp</b>.</ul> 80<br> 81<hr size=1 noshade> 82<br><b>Class</b> 83<a href="../api_cxx/db_class.html">Db</a> 84<br><b>See Also</b> 85<a href="../api_cxx/db_list.html">Databases and Related Methods</a> 86</tt> 87<table width="100%"><tr><td><br></td><td align=right> 88<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> 89</td></tr></table> 90<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 91</body> 92</html> 93