• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/db-4.7.25.NC/docs/ref/upgrade.3.0/
1<!--$Id: db.so,v 11.10 2006/04/24 17:26:34 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 Reference Guide: Release 3.0: the DB structure</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><b><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></b></td>
13<td align=right><a href="../upgrade.3.0/xa.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../upgrade.3.0/dbinfo.html"><img src="../../images/next.gif" alt="Next"></a>
14</td></tr></table>
15<p align=center><b>Release 3.0: the DB structure</b></p>
16<p>The <a href="../../api_c/db_class.html">DB</a> structure is now opaque for applications in the Berkeley DB 3.0
17release.  Accesses to any fields within that structure by the application
18should be replaced with method calls.  The following example illustrates
19this using the historic type structure field.  In the Berkeley DB 2.X releases,
20applications could find the type of an underlying database using code
21similar to the following:</p>
22<blockquote><pre>DB *db;
23DB_TYPE type;
24<p>
25	type = db-&gt;type;</pre></blockquote>
26<p>in the Berkeley DB 3.X releases, this should be done using the
27<a href="../../api_c/db_get_type.html">DB-&gt;get_type</a> method, as follows:</p>
28<blockquote><pre>DB *db;
29DB_TYPE type;
30<p>
31	type = db-&gt;get_type(db);</pre></blockquote>
32<p>The following table lists the <a href="../../api_c/db_class.html">DB</a> fields previously used by
33applications and the methods that should now be used to get or set them.</p>
34<table border=1 align=center>
35<tr><th><a href="../../api_c/db_class.html">DB</a> field</th><th>Berkeley DB 3.X method</th></tr>
36<tr><td>byteswapped</td><td><a href="../../api_c/db_get_byteswapped.html">DB-&gt;get_byteswapped</a></td></tr>
37<tr><td>db_errcall</td><td><a href="../../api_c/db_set_errcall.html">DB-&gt;set_errcall</a></td></tr>
38<tr><td>db_errfile</td><td><a href="../../api_c/db_set_errfile.html">DB-&gt;set_errfile</a></td></tr>
39<tr><td>db_errpfx</td><td><a href="../../api_c/db_set_errpfx.html">DB-&gt;set_errpfx</a></td></tr>
40<tr><td>db_paniccall</td><td>DB-&gt;set_paniccall</td></tr>
41<tr><td>type</td><td><a href="../../api_c/db_get_type.html">DB-&gt;get_type</a></td></tr>
42</table>
43<table width="100%"><tr><td><br></td><td align=right><a href="../upgrade.3.0/xa.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../upgrade.3.0/dbinfo.html"><img src="../../images/next.gif" alt="Next"></a>
44</td></tr></table>
45<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
46</body>
47</html>
48