diff options
Diffstat (limited to 'db/tcl/docs/txn.html')
-rw-r--r-- | db/tcl/docs/txn.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/db/tcl/docs/txn.html b/db/tcl/docs/txn.html new file mode 100644 index 000000000..863c9a875 --- /dev/null +++ b/db/tcl/docs/txn.html @@ -0,0 +1,56 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<HTML> +<HEAD> + <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> + <META NAME="GENERATOR" CONTENT="Mozilla/4.08 [en] (X11; I; FreeBSD 2.2.8-19990120-SNAP i386) [Netscape]"> +</HEAD> +<BODY> + +<H2> +<A NAME="Transaction Commands"></A>Transaction Commands</H2> +Transactions are used in a manner similar to the other subsystems. +We create a handle to the transaction and then use it for a variety +of operations. Some of the transaction commands use the environment +instead. Those are presented first. The transaction command +handle returned is the handle used by the various commands that can be +transaction protected, such as <A HREF="../../docs/api_tcl/db_cursor.html">cursors</A>.<BR> + +<HR WIDTH="100%"> +<P><B>> <env> txn_checkpoint [-kbyte <I>kb</I>] [-min <I>min</I>]</B> +<P>This command causes a checkpoint of the transaction region. It +is a direct translation of the <A HREF="../../docs/api_c/txn_checkpoint.html">txn_checkpoint +</A>function. +It returns either a 0 (for success), a DB error message or it throws a +Tcl error with a system message. The arguments are: +<UL> +<LI> +<B>-kbyte </B>causes the checkpoint to occur only if <B><I>kb</I></B> kilobytes +of log data has been written since the last checkpoint</LI> + +<LI> +<B>-min</B> causes the checkpoint to occur only if <B><I>min</I></B> minutes +have passed since the last checkpoint</LI> +</UL> + +<HR WIDTH="100%"> +<BR><B>> <env> txn_stat</B> +<P>This command returns transaction statistics. It is a direct translation +of the <A HREF="../../docs/api_c/txn_stat.html">txn_stat</A> function. +It will return a list of name/value pairs that correspond to the DB_TXN_STAT +structure. +<HR WIDTH="100%"> +<BR><B>> <txn> id</B> +<P>This command returns the transaction id. It is a direct call to +the <A HREF="../../docs/api_c/txn_id.html">txn_id</A> function. The +typical use of this identifier is as the <B><I>locker</I></B> value for +the <A HREF="lock.html">lock_get</A> and <A HREF="lock.html">lock_vec</A> +calls. +<HR WIDTH="100%"> +<BR><B>> <txn> prepare</B> +<P>This command initiates a two-phase commit. It is a direct call +to the <A HREF="../../docs/api_c/txn_prepare.html">txn_prepare</A> function. +It returns either a 0 (for success), a DB error message or it throws a +Tcl error with a system message. +<HR WIDTH="100%"> +</BODY> +</HTML> |