summaryrefslogtreecommitdiff
path: root/bdb/docs/ref/tcl
diff options
context:
space:
mode:
Diffstat (limited to 'bdb/docs/ref/tcl')
-rw-r--r--bdb/docs/ref/tcl/error.html69
-rw-r--r--bdb/docs/ref/tcl/faq.html60
-rw-r--r--bdb/docs/ref/tcl/intro.html70
-rw-r--r--bdb/docs/ref/tcl/program.html33
-rw-r--r--bdb/docs/ref/tcl/using.html53
5 files changed, 0 insertions, 285 deletions
diff --git a/bdb/docs/ref/tcl/error.html b/bdb/docs/ref/tcl/error.html
deleted file mode 100644
index 3d1de037d52..00000000000
--- a/bdb/docs/ref/tcl/error.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!--$Id: error.so,v 11.13 2001/01/09 18:48:06 bostic Exp $-->
-<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
-<!--All rights reserved.-->
-<html>
-<head>
-<title>Berkeley DB Reference Guide: Tcl error handling</title>
-<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
-<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
-</head>
-<body bgcolor=white>
-<table><tr valign=top>
-<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Tcl</dl></h3></td>
-<td width="1%"><a href="../../ref/tcl/program.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/faq.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p>
-<h1 align=center>Tcl error handling</h1>
-<p>The Tcl interfaces to Berkeley DB generally return TCL_OK on success and throw
-a Tcl error on failure, using the appropriate Tcl interfaces to provide
-the user with an informative error message. There are some "expected"
-failures, however, for which no Tcl error will be thrown and for which
-Tcl commands will return TCL_OK. These failures include when a
-searched-for key is not found, a requested key/data pair was previously
-deleted, or a key/data pair cannot be written because the key already
-exists.
-<p>These failures can be detected by searching the Berkeley DB error message that
-is returned. For example, to detect that an attempt to put a record into
-the database failed because the key already existed:
-<p><blockquote><pre>% berkdb open -create -btree a.db
-db0
-% db0 put dog cat
-0
-% set ret [db0 put -nooverwrite dog newcat]
-DB_KEYEXIST: Key/data pair already exists
-% if { [string first DB_KEYEXIST $ret] != -1 } {
- puts "This was an error; the key existed"
-}
-This was an error; the key existed
-% db0 close
-0
-% exit</pre></blockquote>
-<p>To simplify parsing, it is recommended that the initial Berkeley DB error name
-be checked, e.g., DB_KEYEXIST in the above example. These values will
-not change in future releases of Berkeley DB to ensure that Tcl scripts are not
-broken by upgrading to new releases of Berkeley DB. There are currently only
-three such "expected" error returns. They are:
-<p><blockquote><pre>DB_NOTFOUND: No matching key/data pair found
-DB_KEYEMPTY: Non-existent key/data pair
-DB_KEYEXIST: Key/data pair already exists</pre></blockquote>
-<p>Finally, in some cases, when a Berkeley DB error occurs Berkeley DB will output
-additional error information. By default, all Berkeley DB error messages will
-be prefixed with the created command in whose context the error occurred
-(e.g., "env0", "db2", etc.). There are several ways to capture and
-access this information.
-<p>First, if Berkeley DB invokes the error callback function, the additional
-information will be placed in the error result returned from the
-command and in the errorInfo backtrace variable in Tcl.
-<p>Also the two calls to open an environment and
-open a database take an option, <b>-errfile filename</b>, which sets an
-output file to which these additional error messages should be written.
-<p>Additionally the two calls to open an environment and
-open a database take an option, <b>-errpfx string</b>, which sets the
-error prefix to the given string. This option may be useful
-in circumstances where a more descriptive prefix is desired or
-where a constant prefix indicating an error is desired.
-<table><tr><td><br></td><td width="1%"><a href="../../ref/tcl/program.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/faq.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
-</body>
-</html>
diff --git a/bdb/docs/ref/tcl/faq.html b/bdb/docs/ref/tcl/faq.html
deleted file mode 100644
index 29f63b42385..00000000000
--- a/bdb/docs/ref/tcl/faq.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!--$Id: faq.so,v 11.2 2001/01/15 17:50:48 bostic Exp $-->
-<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
-<!--All rights reserved.-->
-<html>
-<head>
-<title>Berkeley DB Reference Guide: Frequently Asked Questions</title>
-<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
-<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
-</head>
-<body bgcolor=white>
- <a name="2"><!--meow--></a> <a name="3"><!--meow--></a>
-<table><tr valign=top>
-<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Tcl API</dl></h3></td>
-<td width="1%"><a href="../../ref/tcl/error.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/sendmail/intro.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p>
-<h1 align=center>Frequently Asked Questions</h1>
-<p><ol>
-<p><li><b>I have several versions of Tcl installed. How do I configure
-Berkeley DB to use a particular version?</b>
-<p>To compile the Tcl interface with a particular version of Tcl, use the
---with-tcl option to specify the Tcl installation directory that contains
-the tclConfig.sh file.
-<p>See <a href="../../ref/build_unix/flags.html">Changing compile or load options</a>
-for more information.
-<hr size=1 noshade>
-<p><li><b>Berkeley DB was configured using --enable-tcl or --with-tcl and fails
-to build.</b>
-<p>The Berkeley DB Tcl interface requires Tcl version 8.1 or greater. You can
-download a copy of Tcl from the
-<a href="http://www.ajubasolutions.com/home.html">Ajuba Solutions</a>
-corporate web site.
-<hr size=1 noshade>
-<p><li><b>Berkeley DB was configured using --enable-tcl or --with-tcl and fails
-to build.</b>
-<p>If the Tcl installation was moved after it was configured and installed,
-try re-configuring and re-installing Tcl.
-<p>Also, some systems do not search for shared libraries by default, or do
-not search for shared libraries named the way the Tcl installation names
-them, or are searching for a different kind of library than those in
-your Tcl installation. For example, Linux systems often require linking
-"libtcl.a" to "libtcl#.#.a", while AIX systems often require adding the
-"-brtl" flag to the linker. A simpler solution that almost always works
-on all systems is to create a link from "libtcl.#.#.a" or "libtcl.so"
-(or whatever you happen to have) to "libtcl.a" and reconfigure.
-<hr size=1 noshade>
-<p><li><b>Loading the Berkeley DB library into Tcl on AIX causes a core dump.</b>
-<p>In some versions of Tcl, the "tclConfig.sh" autoconfiguration script
-created by the Tcl installation does not work properly under AIX. To
-build a working Berkeley DB Tcl API when this happens, use the "--enable-tcl"
-flag to configure Berkeley DB (rather than "--with-tcl"). In addition, you
-will have to specify any necessary include and library paths and linker
-flags needed to build with Tcl by setting the CPPFLAGS, LIBS and LDFLAGS
-environment variables before running configure.
-</ol>
-<table><tr><td><br></td><td width="1%"><a href="../../ref/tcl/error.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/sendmail/intro.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
-</body>
-</html>
diff --git a/bdb/docs/ref/tcl/intro.html b/bdb/docs/ref/tcl/intro.html
deleted file mode 100644
index 6484eaac6b8..00000000000
--- a/bdb/docs/ref/tcl/intro.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!--$Id: intro.so,v 11.14 2000/12/04 20:49:18 bostic Exp $-->
-<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
-<!--All rights reserved.-->
-<html>
-<head>
-<title>Berkeley DB Reference Guide: Loading Berkeley DB with Tcl</title>
-<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
-<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
-</head>
-<body bgcolor=white>
- <a name="2"><!--meow--></a>
-<table><tr valign=top>
-<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Tcl</dl></h3></td>
-<td width="1%"><a href="../../ref/perl/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/using.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p>
-<h1 align=center>Loading Berkeley DB with Tcl</h1>
-<p>Berkeley DB includes a dynamically loadable Tcl API. The Tcl API requires that
-Tcl/Tk 8.1 or later already be installed on your system. We recommend
-that you install later releases of Tcl/Tk than 8.1, if possible,
-especially on Windows platforms, as we found that we had to make local
-fixes to the 8.1 release in a few cases. You can download a copy of
-Tcl from the <a href="http://www.ajubasolutions.com/home.html">Ajuba
-Solutions</a> corporate web site.
-<p>This document assumes that you have already configured Berkeley DB for Tcl
-support and you have built and installed everything where you want it
-to be. If you have not done so, see
-<a href="../../ref/build_unix/conf.html">Configuring Berkeley DB</a> or
-<a href="../../ref/build_win/intro.html">Building for Win32</a> for more
-information.
-<h3>Installing as a Tcl Package</h3>
-<p>Once enabled, the Berkeley DB shared library for Tcl is automatically installed
-as part of the standard installation process. However, if you wish to be
-able to dynamically load it as a Tcl package into your script there are
-several steps that must be performed:
-<p><ol>
-<p><li>Run the Tcl shell in the install directory
-<li>Append this directory to your auto_path variable
-<li>Run the pkg_mkIndex proc giving the name of the Berkeley DB Tcl library
-</ol>
-<p>For example:
-<p><blockquote><pre># tclsh8.1
-% lappend auto_path /usr/local/BerkeleyDB/lib
-% pkg_mkIndex /usr/local/BerkeleyDB/lib libdb_tcl-3.2.so libdb-3.2.so</pre></blockquote>
-<p>Note that your Tcl and Berkeley DB version numbers may differ from the example,
-and so your tclsh and and library names may be different.
-<h3>Loading Berkeley DB with Tcl</h3>
-<p>The Berkeley DB package may be loaded into the user's interactive Tcl script
-(or wish session) via the "load" command. For example:
-<p><blockquote><pre>load /usr/local/BerkeleyDB/lib/libdb_tcl-3.2.so</pre></blockquote>
-<p>Note that your Berkeley DB version numbers may differ from the example, and so
-the library name may be different.
-<p>If you installed your library to run as a Tcl package, Tcl application
-scripts should use the "package" command to indicate to the Tcl
-interpreter that it needs the Berkeley DB package and where to find it. For
-example:
-<p><blockquote><pre>lappend auto_path "/usr/local/BerkeleyDB/lib"
-package require Db_tcl</pre></blockquote>
-<p>No matter which way the library gets loaded, it creates a command named
-<b>berkdb</b>. All of the Berkeley DB functionality is accessed via this
-command and additional commands it creates on behalf of the application.
-A simple test to determine if everything is loaded and ready is to ask
-for the version:
-<p><blockquote><pre>berkdb version -string</pre></blockquote>
-<p>This should return you the Berkeley DB version in a string format.
-<table><tr><td><br></td><td width="1%"><a href="../../ref/perl/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/using.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
-</body>
-</html>
diff --git a/bdb/docs/ref/tcl/program.html b/bdb/docs/ref/tcl/program.html
deleted file mode 100644
index 881c8848bac..00000000000
--- a/bdb/docs/ref/tcl/program.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--$Id: program.so,v 11.9 2000/12/04 18:05:44 bostic Exp $-->
-<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
-<!--All rights reserved.-->
-<html>
-<head>
-<title>Berkeley DB Reference Guide: Tcl API programming notes</title>
-<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
-<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
-</head>
-<body bgcolor=white>
- <a name="2"><!--meow--></a>
-<table><tr valign=top>
-<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Tcl</dl></h3></td>
-<td width="1%"><a href="../../ref/tcl/using.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/error.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p>
-<h1 align=center>Tcl API programming notes</h1>
-<p>The Tcl API closely parallels the Berkeley DB programmatic interfaces. If you
-are already familiar with one of those interfaces there will not be many
-surprises in the Tcl API.
-<p>Several pieces of Berkeley DB functionality are not available in the Tcl API.
-Any of the functions that require a user-provided function are not
-supported via the Tcl API. For example, there is no equivalent to the
-<a href="../../api_c/db_set_dup_compare.html">DB-&gt;set_dup_compare</a> or the <a href="../../api_c/env_set_errcall.html">DBENV-&gt;set_errcall</a>
-methods.
-<p>The Berkeley DB Tcl API always turns on the DB_THREAD flag for environments and
-databases making no assumptions about the existence or lack thereof of
-threads support in current or future releases of Tcl.
-<table><tr><td><br></td><td width="1%"><a href="../../ref/tcl/using.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/error.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
-</body>
-</html>
diff --git a/bdb/docs/ref/tcl/using.html b/bdb/docs/ref/tcl/using.html
deleted file mode 100644
index 6c927477c2c..00000000000
--- a/bdb/docs/ref/tcl/using.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!--$Id: using.so,v 11.6 2000/03/18 21:43:17 bostic Exp $-->
-<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
-<!--All rights reserved.-->
-<html>
-<head>
-<title>Berkeley DB Reference Guide: Using Berkeley DB with Tcl</title>
-<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
-<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
-</head>
-<body bgcolor=white>
- <a name="2"><!--meow--></a>
-<table><tr valign=top>
-<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Tcl</dl></h3></td>
-<td width="1%"><a href="../../ref/tcl/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/program.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p>
-<h1 align=center>Using Berkeley DB with Tcl</h1>
-<p>All commands in the Berkeley DB Tcl interface are of the form:
-<p><blockquote><pre>command_handle operation options</pre></blockquote>
-<p>The <i>command handle</i> is <b>berkdb</b> or one of the additional
-commands that may be created. The <i>operation</i> is what you want
-to do to that handle and the <i>options</i> apply to the operation.
-Commands that get created on behalf of the application have their own sets
-of operations. Generally any calls in DB that result in new object
-handles will translate into a new command handle in Tcl. Then the user
-can access the operations of the handle via the new Tcl command handle.
-<p>Newly created commands are named with an abbreviated form of their objects
-followed by a number. Some created commands are subcommands of other
-created commands and will be the first command, followed by a period, '.'
-followed by the new subcommand. For example, suppose you have a database
-already existing called my_data.db. The following example shows the
-commands created when you open the database, and when you open a cursor:
-<p><blockquote><pre># First open the database and get a database command handle
-% berkdb open my_data.db
-db0
-#Get some data from that database
-% db0 get my_key
-{{my_key my_data0}{my_key my_data1}}
-#Open a cursor in this database, get a new cursor handle
-% db0 cursor
-db0.c0
-#Get the first data from the cursor
-% db0.c0 get -first
-{{first_key first_data}}</pre></blockquote>
-<p>All commands in the library support a special option <b>-?</b> that will
-list the correct operations for a command or the correct options.
-<p>A list of commands and operations can be found in the
-<a href="../../api_tcl/tcl_index.html">Tcl Interface</a> documentation.
-<table><tr><td><br></td><td width="1%"><a href="../../ref/tcl/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/program.html"><img src="../../images/next.gif" alt="Next"></a>
-</td></tr></table>
-<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
-</body>
-</html>