xhtml validated

This commit is contained in:
tuler 2005-03-14 14:38:40 +00:00
parent e8b5e394df
commit 9a0e6317cc
4 changed files with 132 additions and 122 deletions

View File

@ -1,38 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>LuaSQL: Database connectivity for the Lua programming language</title>
<link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<div class="header" style="text-align: center;">
<div id="container">
<div id="product" style="text-align: center;">
<a href="http://www.keplerproject.org/luasql">
<img alt="LuaSQL logo" src="luasql.png">
</a><br>
<big><b>LuaSQL</b></big><br>
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br>
<img alt="LuaSQL logo" src="luasql.png"/>
</a><br/>
<big><b>LuaSQL</b></big><br/>
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br/>
</div> <!-- id="product" -->
<div class="menu" style="font-size: small;">
<a href="index.html">home</a> &middot;
<a href="manual.html">manual</a> &middot;
<strong>examples</strong> &middot;
<a href="license.html">license</a>
</div>
</div>
<div id="main">
<hr>
<h2>Contents</h2>
<div id="navigation">
<h1>LuaSQL</h1>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="manual.html">Manual</a></li>
<li><strong>Examples</strong></li>
<li><a href="license.html">License</a></li>
</ul>
</div> <!-- id="navigation" -->
<div id="content">
<h2><a name="examples"></a>Examples</h2>
@ -117,11 +115,18 @@ for id, name, address in rows (con, "select * from contacts") do
end
</pre>
<hr>
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" height="31" width="88"></a></p>
<p><small>
$Id: examples.html,v 1.1 2005/03/11 20:10:49 tuler Exp $
</small></p>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
<p><small>
$Id: examples.html,v 1.2 2005/03/14 14:38:40 tuler Exp $
</small></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -1,10 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>LuaSQL: Database connectivity for the Lua programming language</title>
<link rel="stylesheet" href="doc.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="doc.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
@ -12,10 +12,10 @@
<div id="product" style="text-align: center;">
<a href="http://www.keplerproject.org/luasql">
<img alt="LuaSQL logo" src="luasql.png">
</a><br>
<big><b>LuaSQL</b></big><br>
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br>
<img alt="LuaSQL logo" src="luasql.png"/>
</a><br/>
<big><b>LuaSQL</b></big><br/>
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br/>
<!-- <div id="navigation" style="font-size: small;">
<strong>home</strong> &middot;
@ -25,20 +25,20 @@
</div>--><!-- id="navigation" -->
</div> <!-- id="product" -->
<!--<hr>-->
<div id="main">
<div id="navigation">
<!--<h2>Contents</h2>-->
<h1>LuaSQL</h1>
<ul>
<li><a nohref>Home</a>
<li><strong>Home</strong>
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#version">Current Version</a></li>
<li><a href="#download">Download</a></li>
<li><a href="#new">What's new</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#credits">Credits</a></li>
<li><a href="#contact">Contact us</a></li>
<li><a href="index.html#overview">Overview</a></li>
<li><a href="index.html#version">Current Version</a></li>
<li><a href="index.html#download">Download</a></li>
<li><a href="index.html#new">What's new</a></li>
<li><a href="index.html#installation">Installation</a></li>
<li><a href="index.html#credits">Credits</a></li>
<li><a href="index.html#contact">Contact us</a></li>
</ul>
</li>
<li><a href="manual.html">Manual</a>
@ -62,6 +62,7 @@
<h2><a name="overview"></a>Overview</h2>
<p>
LuaSQL is a simple interface from Lua to a DBMS. It enables a Lua program to:
</p>
<ul>
<li> Connect to ODBC, ADO, Oracle, MySQL, SQLite, JDBC, and PostgreSQL databases;</li>
<li> Execute arbitrary SQL statements;</li>
@ -75,7 +76,7 @@ as Lua 5.0.
<h2><a name="version"></a>Current Version</h2>
<p>LuaSQL version 2.0.0 (for Lua 5.0) is now available for
<a href="#download">download</a>.<br>
<a href="#download">download</a>.
</p>
<p>
The PostgreSQL driver has been tested on Linux and MacOS X and is compatible
@ -123,11 +124,11 @@ for Lua 5.1
Version 2.0 has some design modifications and implementation improvements
</p>
<ul>
<li>New <tt>fetch</tt> method: more eficient and more flexible
<li>New <tt>setautocommit</tt> method
<li>Lua 5.0 and 5.1 compatible
<li>Dynamically loadable or statically linked
<li>New drivers for Oracle and MySQL databases
<li>New <tt>fetch</tt> method: more eficient and more flexible</li>
<li>New <tt>setautocommit</tt> method</li>
<li>Lua 5.0 and 5.1 compatible</li>
<li>Dynamically loadable or statically linked</li>
<li>New drivers for Oracle and MySQL databases</li>
</ul>
<h2><a name="installation"></a>Installation</h2>
@ -157,9 +158,9 @@ in the <tt>LUA_PATH</tt>. If you are using Lua 5.1, nothing should be done.
In order to use LuaSQL over JDBC, make sure that:
</p>
<ul>
<li> Lua is running with <a href="http://www.keplerproject.org/luajava">LuaJava</a>
<li> LuaSQL jar is in the Java's virtual machine classpath
<li> JDBC driver of the desired database is also in the virtual machine classpath
<li> Lua is running with <a href="http://www.keplerproject.org/luajava">LuaJava</a></li>
<li> LuaSQL jar is in the Java's virtual machine classpath</li>
<li> JDBC driver of the desired database is also in the virtual machine classpath</li>
</ul>
@ -178,6 +179,7 @@ The implementation is compatible with Lua 5.0 and was coded by
Tom&aacute;s Guisasola, Eduardo Quint&atilde;o, Thiago Ponte, Fabio Mascarenhas,
with many invaluable contributions by Michael Roth, Tiago Dionisio,
Leonardo Godinho and Danilo Tuler.
</p>
<h4>LuaSQL 1.0</h4>
<p>
@ -186,10 +188,11 @@ Ierusalimschy.
The first implementation was compatible with Lua 4.0a.
Many modifications were made but not distributed by Diego Nehab (ODBC),
Carlos Cassino, Tom&aacute;s Guisasola and Eduardo Quint&atilde;o (PostgreSQL).
</p>
<p>
LuaSQL development was sponsored by
<a href="http://www.fabricadigital.com.br">F&aacute;brica Digital</a>.
</p>
<h2><a name="contact"></a>Contact us</h2>
@ -201,12 +204,12 @@ Comments are welcome!
</div> <!-- id="content" -->
<!--<hr>-->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" height="31" width="88"></a></p>
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
<p><small>
$Id: index.html,v 1.4 2005/03/12 00:26:45 tuler Exp $
$Id: index.html,v 1.5 2005/03/14 14:38:40 tuler Exp $
</small></p>
</div> <!-- id="about" -->

View File

@ -1,19 +1,19 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>LuaSQL License</title>
<link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<div class="header" style="text-align: center;">
<a href="http://www.keplerproject.org/luasql">
<img alt="LuaSQL logo" src="luasql.png">
</a><br>
<big><b>LuaSQL</b></big><br>
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br>
<img alt="LuaSQL logo" src="luasql.png"/>
</a><br/>
<big><b>LuaSQL</b></big><br/>
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br/>
<div class="menu" style="font-size: small;">
<a href="index.html">home</a> &middot;
@ -23,7 +23,7 @@
</div>
</div>
<hr>
<hr/>
<h2>License</h2>
@ -50,7 +50,7 @@ somewhere in your product or its documentation.</p>
<a href="http://www.keplerproject.org">Kepler Project</a> team.
The implementation is not derived from licensed software.</p>
<hr>
<hr/>
<p>Copyright &copy; 2003-2005 The Kepler Project.</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy
@ -72,10 +72,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.</p>
<hr>
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" height="31" width="88"></a></p>
<hr/>
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
<p><small>
$Id: license.html,v 1.3 2005/03/11 20:10:49 tuler Exp $
$Id: license.html,v 1.4 2005/03/14 14:38:40 tuler Exp $
</small></p>
</body>

View File

@ -1,10 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>LuaSQL: Database connectivity for the Lua programming language</title>
<link rel="stylesheet" href="doc.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="doc.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
@ -13,10 +13,10 @@
<div id="product" style="text-align: center;">
<a href="http://www.keplerproject.org/luasql">
<img alt="LuaSQL logo" src="luasql.png">
</a><br>
<big><b>LuaSQL</b></big><br>
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br>
<img alt="LuaSQL logo" src="luasql.png"/>
</a><br/>
<big><b>LuaSQL</b></big><br/>
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br/>
<!-- <div class="menu" style="font-size: small;">
<a href="index.html">home</a> &middot;
@ -26,10 +26,10 @@
</div>--><!-- id="navigation" -->
</div> <!-- id="product" -->
<!--<hr>-->
<div id="main">
<div id="navigation">
<!--<h2>Contents</h2>-->
<h1>LuaSQL</h1>
<ul>
<li><a href="index.html">Home</a>
<ul>
@ -42,7 +42,7 @@
<li><a href="#contact">Contact us</a></li>
</ul>
</li>
<li><a nohref>Manual</a>
<li><strong>Manual</strong>
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#errors">Errors</a></li>
@ -95,6 +95,7 @@ LuaSQL is just an abstraction layer that communicates between Lua
and a database system.
Therefore errors can occur on both levels, that is,
inside the database client or inside LuaSQL driver.
</p>
<p>
Errors like mal-formed SQL statement, unknown table name etc.
are called <em>database errors</em> and
@ -113,6 +114,7 @@ described in this document unless otherwise stated.
<p>An environment object is created by calling the driver's initialization
function that is stored into the table <code>luasql</code> with the same
name of the driver (odbc, postgres etc). For example,
</p>
<pre class="example">
env = luasql.odbc()
</pre>
@ -130,22 +132,22 @@ env = luasql.jdbc ("com.mysql.jdbc.Driver")
<ul>
<li><a name="env_close"></a><b><code>env:close()</code></b><br>
<li><a name="env_close"></a><b><code>env:close()</code></b><br/>
Closes the environment <code>env</code>.
Only successful if all connections pertaining to it were closed first.<br>
Only successful if all connections pertaining to it were closed first.<br/>
Returns: <code>true</code> in case of success; <code>false</code> when
the object is already closed.</li>
<li><a name="env_connect"></a><b><code>env:connect(sourcename[,username[,password]])</code></b><br>
<li><a name="env_connect"></a><b><code>env:connect(sourcename[,username[,password]])</code></b><br/>
Connects to a data source specified in <code>sourcename</code> using
<code>username</code> and <code>password</code> if they are supplied.<br>
<code>username</code> and <code>password</code> if they are supplied.<br/>
The <code>sourcename</code> may vary according to each driver.
Some use a simple database name, like PostgreSQL, MySQL and SQLite;
the ODBC driver expects the name of the DSN;
the Oracle driver expects the service name;
the JDBC driver expects a string like <code>"jdbc:&lt;database system&gt;://&lt;database name&gt;"</code>, which is specific for each driver.<br>
the JDBC driver expects a string like <code>"jdbc:&lt;database system&gt;://&lt;database name&gt;"</code>, which is specific for each driver.<br/>
See also: <a href="#postgres_extensions">PostgreSQL</a>,
and <a href="#mysql_extensions">MySQL</a> extensions.<br>
and <a href="#mysql_extensions">MySQL</a> extensions.<br/>
Returns: a <a href="#connection_object">connection object</a>.</li>
</ul>
@ -163,42 +165,42 @@ method.</p>
<ul>
<li><a name="conn_close"></a><b><code>conn:close()</code></b> <br>
<li><a name="conn_close"></a><b><code>conn:close()</code></b><br/>
Closes the connection <code>conn</code>.
Only successful if all cursors pertaining to it were closed first.<br>
Only successful if all cursors pertaining to it were closed first.<br/>
Returns: <code>true</code> in case of success and <code>false</code> when
the object is already closed.</li>
<li><a name="conn_commit"></a><b><code>conn:commit()</code></b> <br>
<li><a name="conn_commit"></a><b><code>conn:commit()</code></b><br/>
Commits the current transaction.
This feature might not work on database systems that do not implement
transactions.<br>
transactions.<br/>
Returns: <code>true</code> in case of success and <code>false</code> when
the operation could not be performed or when it is not implemented.</li>
<li><a name="conn_execute"></a><b><code>conn:execute(statement)</code></b> <br>
Executes the given SQL <code>statement</code>.<br>
<li><a name="conn_execute"></a><b><code>conn:execute(statement)</code></b><br/>
Executes the given SQL <code>statement</code>.<br/>
Returns: a <a href="#cursor_object">cursor object</a>
if there are results, or the number of rows affected by the command otherwise.</li>
<li><a name="conn_rollback"></a><b><code>conn:rollback()</code></b> <br>
<li><a name="conn_rollback"></a><b><code>conn:rollback()</code></b><br/>
Rolls back the current transaction.
This feature might not work on database systems that do not implement
transactions.<br>
transactions.<br/>
Returns: <code>true</code> in case of success and <code>false</code> when
the operation could not be performed or when it is not implemented.</li>
<li><a name="conn_setautocommit"></a><b><code>conn:setautocommit(boolean)</code></b> <br>
<li><a name="conn_setautocommit"></a><b><code>conn:setautocommit(boolean)</code></b> <br/>
Turns on or off the "auto commit" mode.
This feature might not work on database systems that do not implement
transactions.
On database systems that do not have the concept of "auto commit mode",
but do implement transactions, this mechanism is implemented by the driver.
<br>
<br/>
Returns: <code>true</code> in case of success and <code>false</code> when
the operation could not be performed or when it is not implemented.</li>
@ -218,14 +220,14 @@ and <a href="#oracle_extensions">Oracle</a> extensions.</p>
<ul>
<li><a name="cur_close"></a><b><code>cur:close()</code></b> <br>
Closes this cursor.<br>
<li><a name="cur_close"></a><b><code>cur:close()</code></b> <br/>
Closes this cursor.<br/>
Returns: <code>true</code> in case of success and <code>false</code> when
the object is already closed.</li>
<li><a name="cur_fetch"></a><b><code>cur:fetch([table[,modestring]])</code></b> <br>
Retrieves the next row of results.<br>
<li><a name="cur_fetch"></a><b><code>cur:fetch([table[,modestring]])</code></b> <br/>
Retrieves the next row of results.<br/>
If <code>fetch</code> is called without parameters,
the results will be returned to the caller directly.
If <code>fetch</code> is called with a table, the results will be copied
@ -234,29 +236,29 @@ In this case, an optional <code>mode</code> parameter can be used.
It is just a string indicating how the result table should be made.
The mode string can contain:
<ul>
<li><b>"n"</b> the resulting table will have numerical indices (default)
<li><b>"a"</b> the resulting table will have alphanumerical indices
<li><b>"n"</b> the resulting table will have numerical indices (default)</li>
<li><b>"a"</b> the resulting table will have alphanumerical indices</li>
</ul>
The <em>numerical indices</em> are the positions of the fields in the select
statement;
the <em>alphanumerical indices</em> are the names of the fields.<br>
the <em>alphanumerical indices</em> are the names of the fields.<br/>
The optional <code>table</code> parameter is a table that should be
used to store the next row.
This allows the use of a unique table for many fetches which
can improve the overall performance.<br>
can improve the overall performance.<br/>
There is no guarantee about the types of the results, they can be converted to adequate Lua types by the driver or not.
In the current implementation,
the PostgreSQL and MySQL drivers returns all values as strings
while the ODBC and Oracle drivers converts them to Lua types.<br>
while the ODBC and Oracle drivers converts them to Lua types.<br/>
Returns: data, as above, or <code>nil</code> if there are no more rows.
Note that this method could return <code>nil</code> as a valid result.</li>
<li><a name="cur_colnames"></a><b><code>cur:getcolnames()</code></b> <br>
<li><a name="cur_colnames"></a><b><code>cur:getcolnames()</code></b> <br/>
Returns: a list (table) of column names.</li>
<li><a name="cur_coltypes"></a><b><code>cur:getcoltypes()</code></b> <br>
<li><a name="cur_coltypes"></a><b><code>cur:getcoltypes()</code></b> <br/>
Returns: a list (table) of column types.</li>
</ul>
@ -268,18 +270,18 @@ Returns: a list (table) of column types.</li>
the Postgres driver also offers these extra features:</p>
<ul>
<li><b><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></b> <br>
<li><b><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></b> <br/>
In the PostgreSQL driver, this method has two other optional parameters
that indicate the hostname and port to connect.
Also, the first parameter can contain all connection information,
as stated in the documentation for <code>PQconnectdb</code> function
in the PostgreSQL manual
(e.g. <small><code>environment:connect("dbname=&lt;<em>name</em>&gt; user=&lt;<em>username</em>&gt;")</code></small>) <br>
See also: <a href="#environment_object">environment objects</a><br>
(e.g. <small><code>environment:connect("dbname=&lt;<em>name</em>&gt; user=&lt;<em>username</em>&gt;")</code></small>) <br/>
See also: <a href="#environment_object">environment objects</a><br/>
Returns: a <a href="#connection_object">connection object</a></li>
<li><b><code>cur:numrows()</code></b> <br>
See also: <a href="#cursor_object">cursor objects</a><br>
<li><b><code>cur:numrows()</code></b> <br/>
See also: <a href="#cursor_object">cursor objects</a><br/>
Returns: the number of rows in the query result.</li>
</ul>
@ -290,10 +292,10 @@ the Postgres driver also offers these extra features:</p>
the MySQL driver also offers these extra features:</p>
<ul>
<li><b><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></b> <br>
<li><b><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></b> <br/>
In the MySQL driver, this method has two other optional parameters
that indicate the hostname and port to connect.
See also: <a href="#environment_object">environment objects</a><br>
See also: <a href="#environment_object">environment objects</a><br/>
Returns: a <a href="#connection_object">connection object</a></li>
</ul>
@ -311,19 +313,19 @@ methods <code>commit</code>, <code>rollback</code> and
the Oracle driver also offers this extra feature:</p>
<ul>
<li><b><code>cur:numrows()</code></b> <br>
See also: <a href="#cursor_object">cursor objects</a><br>
<li><b><code>cur:numrows()</code></b> <br/>
See also: <a href="#cursor_object">cursor objects</a><br/>
Returns: the number of rows in the query result.</li>
</ul>
</div> <!-- id="content" -->
<!--<hr>-->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" height="31" width="88"></a></p>
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
<p><small>
$Id: manual.html,v 1.3 2005/03/12 00:26:45 tuler Exp $
$Id: manual.html,v 1.4 2005/03/14 14:38:40 tuler Exp $
</small></p>
</div> <!-- id="about" -->