You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2004/02/25 13:56:49 UTC
cvs commit: tcl-rivet/src make.tcl mod_rivet.h rivetParser.c rivetParser.h
davidw 2004/02/25 04:56:49
Modified: . ChangeLog
doc rivet.xml
src make.tcl mod_rivet.h rivetParser.c rivetParser.h
Added: doc/html dio.en.html
Log:
* src/rivetParser.h: start/end tags removed from here.
* src/make.tcl: START_TAG and END_TAG are now defined here, so that
they are easier to configure at build time.
Revision Changes Path
1.170 +5 -0 tcl-rivet/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /home/cvs/tcl-rivet/ChangeLog,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -r1.169 -r1.170
--- ChangeLog 24 Feb 2004 23:47:49 -0000 1.169
+++ ChangeLog 25 Feb 2004 12:56:48 -0000 1.170
@@ -1,5 +1,10 @@
2004-02-25 David N. Welton <da...@dedasys.com>
+ * src/rivetParser.h: start/end tags removed from here.
+
+ * src/make.tcl: START_TAG and END_TAG are now defined here, so
+ that they are easier to configure at build time.
+
* doc/rivet.xml: Initial cut at including DIO docs in the main set
of docs.
1.44 +7 -6 tcl-rivet/doc/rivet.xml
Index: rivet.xml
===================================================================
RCS file: /home/cvs/tcl-rivet/doc/rivet.xml,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- rivet.xml 24 Feb 2004 23:47:49 -0000 1.43
+++ rivet.xml 25 Feb 2004 12:56:48 -0000 1.44
@@ -1518,7 +1518,7 @@
<refsynopsisdiv>
<cmdsynopsis>
<command>::DIO::handle</command>
- <arg><replaceable>interface</replaceable></arg>
+ <arg choice="plain"><replaceable>interface</replaceable></arg>
<arg choice="opt"><replaceable>objectName</replaceable></arg>
<group choice="opt">
<arg>-option</arg>
@@ -1545,9 +1545,10 @@
interface. Currently supported interfaces are
<option>Postgresql</option> and <option>Mysql</option>.
</para>
- <para>If <option>objectName</option> is specified, DIO creates
- an object of that name. If there is no
- <option><replaceable>objectName</replaceable></option>
+ <para>
+ If <option><replaceable>objectName</replaceable></option> is
+ specified, DIO creates an object of that name. If there is
+ no <option><replaceable>objectName</replaceable></option>
given, DIO will automatically generate a unique object ID
</para>
</refsect1>
1.1 tcl-rivet/doc/html/dio.en.html
Index: dio.en.html
===================================================================
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>DIO - Database Interface Objects</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.64.1"><link rel="home" href="index.en.html" title="Apache Rivet"><link rel="up" href="index.en.html" title="Apache Rivet"><link rel="previous" href="tcl_packages.en.html" title="Rivet Tcl Packages"><link rel="next" href="session_package.en.html" title="Session Package"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">DIO - Database Interface Objects</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="tcl_packages.en.html"><img src="images/prev.png" alt="Prev"></a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="session_package.en.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><hr><h2 class="title" style="clear: both"><a name="dio"></a>DIO - Database Interface Objects</h2></div></div><div></div></div><div class="toc"><dl><dt><a href="dio.en.html#id4757425">DIO</a> - Database Interface Objects</dt></dl></div><div class="refentry" lang="en"><a name="id4757425"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h3>Name</h3><p><h3 style="text-indent: 3em">DIO — Database Interface Objects</h3></p></div><div class="refsynopsisdiv"><h3>Synopsis</h3><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::DIO::handle</span> ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>interface</tt></i></span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span>? (<span style="font-family:monospace; font-weight: bold;">-option</span> | <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>option</tt></i></span> | <span style="font-family:monospace; font-weight: bold;">-option</span> | <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>option</tt></i></span> | <span style="font-family:monospace; font-weight: bold;">...</span>)</div></div></div><div class="refsect1" lang="en"><h3>Description</h3><p style="width:90%">
<span style="font-family:monospace"><span><b class="command">DIO</b></span></span> is designed to be a generic,
object-oriented interface to SQL databases. Its main goal
is to be as generic as possible, but since not all SQL
databases support the exact same syntaxes, keeping code
generic between databases is left to the abilities of the
programmer. DIO simply provides a way to keep the Tcl
interface generic.
</p><p style="width:90%">
interface - The name of the database
interface. Currently supported interfaces are
Postgresql and Mysql.
</p><p style="width:90%">If objectName is specified, DIO creates
an object of that name. If there is no
<i class="replaceable"><tt>objectName</tt></i>
given, DIO will automatically generate a unique object ID
</p></div><div class="refsect1" lang="en"><h3>Options</h3><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-host</span> ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>hostname</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
The hostname of the computer to connect to. If none
is given, DIO assumes the local host.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-port</span> ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>portNumber</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">The port number to connect to on hostname.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-user</span> ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>username</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">The username you wish to login to the server as.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-pass</span> ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>password</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">The password to login to the server with.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-db</span> ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>database</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
The name of the database to connect to.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-table</span> ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>tableName</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
The default table to use when using built-in commands
for storing and fetching.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-keyfield</span> ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>keyFieldname</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
The default field to use as the primary key when using
built-in commands for storing and fetching.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-autokey</span> (<span style="font-family:monospace; font-weight: bold;">1</span> | <span style="font-family:monospace; font-weight: bold;">0</span>)</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
If this option is set to 1, DIO will attempt to
determine an automatic key for
keyField when storing and fetching.
In most databases, this requires that the
sequence also be specified. In the
case of MySQL, where sequences do not exist, autokey
must be used in conjunction with a table which has a
field specified as AUTO.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-sequence</span> ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>sequenceName</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
If DIO is automatically generating keys, it will use
this sequence as a means to gain a unique number for
the stored key.</div></div></dd></dl></div></div><div class="refsect1" lang="en"><h3>DIO Object Commands</h3><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">array</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>request</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Execute request as a SQL query and
create an array from the first record found. The
array is set with the fields of the table and the
values of the record found.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">autokey</span>? (<span style="font-family:monospace; font-weight: bold;">value</span> | <span style="font-family:monospace; font-weight: bold;">boolean</span>)</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current autokey value. If
value is specified, it sets a new
value for the autokey option.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">close</span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex"> Close the current database connection. This command is
automatically called when the DIO object is destroyed.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">db</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current database. If
value is specified, it sets a new
value for the database. In most cases, the DIO object
will automatically connect to the new database when
this option is changed.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">delete</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>key</tt></i></span>? (<span style="font-family:monospace; font-weight: bold;">-option</span> | <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>option</tt></i></span> | <span style="font-family:monospace; font-weight: bold;">...</span>)</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Delete a record from the database where the primary
key matches key.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">destroy</span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Destroy the DIO object.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">errorinfo</span>? ?<span style="font-family:monospace; font-weight: bold;">value</span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">errorinfo contains the value of
the last error, if any, to occur while executing a
request. When a request fails for any reason, this
variable is filled with the error message from the SQL
interface package.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">exec</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>request</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Execute request as an SQL query.
When the exec command is called, the query is
executed, and a DIO result object is returned. From
there, the result object can be used to obtain
information about the query status and records in a
generic way. See <a href="dio.en.html#resultobj" title="Result Object Commands">Result
Object Commands</a>
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">fetch</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>key</tt></i></span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>arrayName</tt></i></span>? (<span style="font-family:monospace; font-weight: bold;">-option</span> | <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>option</tt></i></span> | <span style="font-family:monospace; font-weight: bold;">...</span>)</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Fetch a record from the database where the primary key
matches key and store the result in
an array called arrayName.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">host</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current host value. If
value is specified, it sets a new
value for the host.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">keyfield</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current keyfield. If
value is specified, it sets a new
value for the keyfield.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">keys</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>pattern</tt></i></span>? (<span style="font-family:monospace; font-weight: bold;">-option</span> | <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>option</tt></i></span> | <span style="font-family:monospace; font-weight: bold;">...</span>)</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return a list of keys in the database. If
pattern is specified, only the keys
matching will be returned.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">lastkey</span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the last key that was used from
sequence. If sequence has not been
specified, this command returns an empty string.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">list</span>? ?<span style="font-family:monospace; font-weight: bold;">request</span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Execute request as a SQL query and
return a list of the first column of each record
found.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">nextkey</span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">Increment sequence and return the
next key to be used. If sequence has not been
specified, this command returns an empty
string.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">open</span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">Open the connection to the current database. This
command is automatically called from any command which
accesses the database.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">pass</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current pass value. If
value is specified, it sets a new
value for the password.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">port</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">Return the current port value. If value is
specified, it sets a new value for the port.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">sequence</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current sequence value. If value is
specified, it sets a new value for the sequence.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">store</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>arrayName</tt></i></span>? (<span style="font-family:monospace; font-weight: bold;">-option</span> | <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>option</tt></i></span> | <span style="font-family:monospace; font-weight: bold;">...</span>)</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Store arrayName in the database.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">string</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>request</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Execute request as a SQL query and
return a string containing the first record
found.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">table</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">Return the current table. If
value is specified, it sets a new
value for the table.</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>objectName</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">user</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current user value. If
value is specified, it sets a new
value for the user.
</div></div></dd></dl></div></div><div class="refsect1" lang="en"><a name="resultobj"></a><h3>Result Object Commands</h3><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">autocache</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current autocache value. If
value is specified, it sets a new
value for autocache.
</div><div style="margin-bottom:1.5ex ; padding .5ex">
If autocache is true, the result object will
automatically cache rows as you use them. This means
that the first time you execute a forall command, each
row is being cached in the result object itself and
will no longer need to access the SQL result.
<span class="emphasis"><em>Default is true</em></span>.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">cache</span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Cache the results of the current SQL result in the
result object itself. This means that even if the
database connection is closed and all the results of
the DIO object are lost, this result object will still
maintain a cached copy of its records.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">errorcode</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current errorcode value. If value
is specified, it sets a new value for errorcode.
</div><div style="margin-bottom:1.5ex ; padding .5ex">
errorcode contains the current code from the
SQL database which specifies the result of the query
statement which created this object. This variable
can be used to determine the success or failure of a
query.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">errorinfo</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current errorinfo value. If value
is specified, it sets a new value for errorinfo.
</div><div style="margin-bottom:1.5ex ; padding .5ex">
If an error occurred during the SQL query, DIO
attempts to set the value of errorinfo to the
resulting error message.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">fields</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current fields value. If
value is specified, it sets a new
value for fields.
</div><div style="margin-bottom:1.5ex ; padding .5ex">
fields contains the list of fields
used in this query. The fields are in order of the
fields retrieved for each row.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">forall</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>-type</tt></i></span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>varName</tt></i></span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>body</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Execute body over each record in the
result object.
</div><div style="margin-bottom:1.5ex ; padding .5ex">Types:</div><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-array</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Create
<i class="replaceable"><tt>varName</tt></i>
as an array where the indexes are the names of
the fields in the table and the values are the
values of the current row.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-keyvalue</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Set
<i class="replaceable"><tt>varName</tt></i>
to a list containing key-value pairs of fields
and values from the current row. (-field value
-field value)
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-list</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Set
<i class="replaceable"><tt>varName</tt></i>
to a list that contains the values of the
current row.
</div></div></dd></dl></div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">next</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>-type</tt></i></span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>varName</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Retrieve the next record in the result object.
</div><div style="margin-bottom:1.5ex ; padding .5ex">Types:</div><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-array</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Create
<i class="replaceable"><tt>varName</tt></i>
as an array where the indexes are the names of
the fields in the table and the values are the
values of the current row.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-keyvalue</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Set
<i class="replaceable"><tt>varName</tt></i>
to a list containing key-value pairs of fields
and values from the current row. (-field value
-field value)
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;">-list</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Set
<i class="replaceable"><tt>varName</tt></i>
to a list that contains the values of the
current row.
</div></div></dd></dl></div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">numrows</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current numrows value. If value is
specified, it sets a new value for numrows.
</div><div style="margin-bottom:1.5ex ; padding .5ex">
numrows is the number of rows in this result.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">resultid</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current resultid value. If value is
specified, it sets a new value for resultid.
</div><div style="margin-bottom:1.5ex ; padding .5ex">
resultid in most databases is the result
pointer which was given us by the database. This
variable is not generic and should not really be used,
but it's there if you want it.
</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#bbbbff ; margin:1ex ; padding:.4ex ; word-spacing:1ex "> <span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>resultObj</tt></i></span> ?<span style="font-family:monospace; font-weight: bold;">rowid</span>? ?<span style="font-family:monospace; font-weight: bold;"><i class="replaceable"><tt>value</tt></i></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Return the current rowid value. If value is
specified, it sets a new value for rowid.
</div><div style="margin-bottom:1.5ex ; padding .5ex">
rowid contains the number of the
current result record in the result object. This
variable should not really be accessed outside of the
result object, but it's there if you want it.
</div></div></dd></dl></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="tcl_packages.en.html"><img src="images/prev.png" alt="Prev"></a>�</td><td width="20%" align="center"><a accesskey="u" href="index.en.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right">�<a accesskey="n" href="session_package.en.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Rivet Tcl Packages�</td><td width="20%" align="center"><a accesskey="h" href="index.en.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top">�Session Package</td></tr></table></div></body></html>
1.56 +22 -4 tcl-rivet/src/make.tcl
Index: make.tcl
===================================================================
RCS file: /home/cvs/tcl-rivet/src/make.tcl,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- make.tcl 17 Feb 2004 17:45:06 -0000 1.55
+++ make.tcl 25 Feb 2004 12:56:49 -0000 1.56
@@ -2,20 +2,38 @@
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
-# $Id$
-#
# This file is responsible for the top-level "make" style processing.
# It uses the 'aardvark' make-like system, located in the buildscripts
# directory.
+# Copyright 2002-2004 The Apache Software Foundation
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# $Id$
+
# Source the other scripts we need.
source [file join [file dirname [info script]] buildscripts buildscripts.tcl]
-
namespace import ::aardvark::*
# Get the configuration options generated by ./configure.tcl
getconfigs configs.tcl
+# Configurable options.
+#set START_TAG {"<?tcl"}
+set START_TAG {"<?"}
+set END_TAG {"?>"}
+
# These are build targets.
set MOD_STLIB mod_rivet.a
set MOD_SHLIB mod_rivet[info sharedlibextension]
@@ -68,7 +86,7 @@
AddNode rivetParser.o {
depends rivetParser.c rivetParser.h mod_rivet.h
- sh {$COMPILE rivetParser.c}
+ sh {$COMPILE -DSTART_TAG=$START_TAG -DEND_TAG=$END_TAG rivetParser.c}
}
AddNode rivetCore.o {
1.30 +0 -3 tcl-rivet/src/mod_rivet.h
Index: mod_rivet.h
===================================================================
RCS file: /home/cvs/tcl-rivet/src/mod_rivet.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- mod_rivet.h 29 Sep 2003 13:09:36 -0000 1.29
+++ mod_rivet.h 25 Feb 2004 12:56:49 -0000 1.30
@@ -40,9 +40,6 @@
# define CONST84
#endif
-/* Note: STARTING_SEQUENCE and ENDING_SEQUENCE (<? and ?>,
- respectively) are now defined in rivetParser.h. */
-
#define VAR_SRC_QUERYSTRING 1
#define VAR_SRC_POST 2
#define VAR_SRC_ALL 3
1.14 +5 -5 tcl-rivet/src/rivetParser.c
Index: rivetParser.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/rivetParser.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- rivetParser.c 24 Feb 2004 10:24:34 -0000 1.13
+++ rivetParser.c 25 Feb 2004 12:56:49 -0000 1.14
@@ -158,12 +158,12 @@
{
char *next;
char *cur;
- const char *strstart = STARTING_SEQUENCE;
- const char *strend = ENDING_SEQUENCE;
+ const char *strstart = START_TAG;
+ const char *strend = END_TAG;
- int endseqlen = strlen(ENDING_SEQUENCE);
- int startseqlen = strlen(STARTING_SEQUENCE);
+ int endseqlen = strlen(END_TAG);
+ int startseqlen = strlen(START_TAG);
int inside = 0, p = 0;
int inLen = 0;
1.4 +15 -3 tcl-rivet/src/rivetParser.h
Index: rivetParser.h
===================================================================
RCS file: /home/cvs/tcl-rivet/src/rivetParser.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- rivetParser.h 5 Jul 2003 14:23:18 -0000 1.3
+++ rivetParser.h 25 Feb 2004 12:56:49 -0000 1.4
@@ -1,3 +1,18 @@
+/* Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
#ifndef RIVETPARSER_H
#define RIVETPARSER_H 1
@@ -6,9 +21,6 @@
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT
#endif /* BUILD_rivet */
-
-#define STARTING_SEQUENCE "<?"
-#define ENDING_SEQUENCE "?>"
EXTERN int Rivet_GetRivetFile(char *filename, int toplevel,
Tcl_Obj *outbuf, Tcl_Interp *interp);
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org