xhtml validated
This commit is contained in:
parent
e8b5e394df
commit
9a0e6317cc
@ -1,38 +1,36 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
"http://www.w3.org/TR/html4/strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>LuaSQL: Database connectivity for the Lua programming language</title>
|
<title>LuaSQL: Database connectivity for the Lua programming language</title>
|
||||||
<link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css">
|
<link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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">
|
<a href="http://www.keplerproject.org/luasql">
|
||||||
<img alt="LuaSQL logo" src="luasql.png">
|
<img alt="LuaSQL logo" src="luasql.png"/>
|
||||||
</a><br>
|
</a><br/>
|
||||||
<big><b>LuaSQL</b></big><br>
|
<big><b>LuaSQL</b></big><br/>
|
||||||
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<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;">
|
<div id="main">
|
||||||
<a href="index.html">home</a> ·
|
|
||||||
<a href="manual.html">manual</a> ·
|
|
||||||
<strong>examples</strong> ·
|
|
||||||
<a href="license.html">license</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr>
|
<div id="navigation">
|
||||||
|
<h1>LuaSQL</h1>
|
||||||
<h2>Contents</h2>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="index.html">Home</a></li>
|
<li><a href="index.html">Home</a></li>
|
||||||
<li><a href="manual.html">Manual</a></li>
|
<li><a href="manual.html">Manual</a></li>
|
||||||
<li><strong>Examples</strong></li>
|
<li><strong>Examples</strong></li>
|
||||||
<li><a href="license.html">License</a></li>
|
<li><a href="license.html">License</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div> <!-- id="navigation" -->
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
<h2><a name="examples"></a>Examples</h2>
|
<h2><a name="examples"></a>Examples</h2>
|
||||||
|
|
||||||
@ -117,11 +115,18 @@ for id, name, address in rows (con, "select * from contacts") do
|
|||||||
end
|
end
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<hr>
|
</div> <!-- id="content" -->
|
||||||
<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>
|
</div> <!-- id="main" -->
|
||||||
$Id: examples.html,v 1.1 2005/03/11 20:10:49 tuler Exp $
|
|
||||||
</small></p>
|
<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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
"http://www.w3.org/TR/html4/strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>LuaSQL: Database connectivity for the Lua programming language</title>
|
<title>LuaSQL: Database connectivity for the Lua programming language</title>
|
||||||
<link rel="stylesheet" href="doc.css" type="text/css">
|
<link rel="stylesheet" href="doc.css" type="text/css"/>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
<div id="product" style="text-align: center;">
|
<div id="product" style="text-align: center;">
|
||||||
<a href="http://www.keplerproject.org/luasql">
|
<a href="http://www.keplerproject.org/luasql">
|
||||||
<img alt="LuaSQL logo" src="luasql.png">
|
<img alt="LuaSQL logo" src="luasql.png"/>
|
||||||
</a><br>
|
</a><br/>
|
||||||
<big><b>LuaSQL</b></big><br>
|
<big><b>LuaSQL</b></big><br/>
|
||||||
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br>
|
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br/>
|
||||||
|
|
||||||
<!-- <div id="navigation" style="font-size: small;">
|
<!-- <div id="navigation" style="font-size: small;">
|
||||||
<strong>home</strong> ·
|
<strong>home</strong> ·
|
||||||
@ -25,20 +25,20 @@
|
|||||||
</div>--><!-- id="navigation" -->
|
</div>--><!-- id="navigation" -->
|
||||||
</div> <!-- id="product" -->
|
</div> <!-- id="product" -->
|
||||||
|
|
||||||
<!--<hr>-->
|
<div id="main">
|
||||||
|
|
||||||
<div id="navigation">
|
<div id="navigation">
|
||||||
<!--<h2>Contents</h2>-->
|
<h1>LuaSQL</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a nohref>Home</a>
|
<li><strong>Home</strong>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#overview">Overview</a></li>
|
<li><a href="index.html#overview">Overview</a></li>
|
||||||
<li><a href="#version">Current Version</a></li>
|
<li><a href="index.html#version">Current Version</a></li>
|
||||||
<li><a href="#download">Download</a></li>
|
<li><a href="index.html#download">Download</a></li>
|
||||||
<li><a href="#new">What's new</a></li>
|
<li><a href="index.html#new">What's new</a></li>
|
||||||
<li><a href="#installation">Installation</a></li>
|
<li><a href="index.html#installation">Installation</a></li>
|
||||||
<li><a href="#credits">Credits</a></li>
|
<li><a href="index.html#credits">Credits</a></li>
|
||||||
<li><a href="#contact">Contact us</a></li>
|
<li><a href="index.html#contact">Contact us</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="manual.html">Manual</a>
|
<li><a href="manual.html">Manual</a>
|
||||||
@ -62,6 +62,7 @@
|
|||||||
<h2><a name="overview"></a>Overview</h2>
|
<h2><a name="overview"></a>Overview</h2>
|
||||||
<p>
|
<p>
|
||||||
LuaSQL is a simple interface from Lua to a DBMS. It enables a Lua program to:
|
LuaSQL is a simple interface from Lua to a DBMS. It enables a Lua program to:
|
||||||
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li> Connect to ODBC, ADO, Oracle, MySQL, SQLite, JDBC, and PostgreSQL databases;</li>
|
<li> Connect to ODBC, ADO, Oracle, MySQL, SQLite, JDBC, and PostgreSQL databases;</li>
|
||||||
<li> Execute arbitrary SQL statements;</li>
|
<li> Execute arbitrary SQL statements;</li>
|
||||||
@ -75,7 +76,7 @@ as Lua 5.0.
|
|||||||
|
|
||||||
<h2><a name="version"></a>Current Version</h2>
|
<h2><a name="version"></a>Current Version</h2>
|
||||||
<p>LuaSQL version 2.0.0 (for Lua 5.0) is now available for
|
<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>
|
||||||
<p>
|
<p>
|
||||||
The PostgreSQL driver has been tested on Linux and MacOS X and is compatible
|
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
|
Version 2.0 has some design modifications and implementation improvements
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>New <tt>fetch</tt> method: more eficient and more flexible
|
<li>New <tt>fetch</tt> method: more eficient and more flexible</li>
|
||||||
<li>New <tt>setautocommit</tt> method
|
<li>New <tt>setautocommit</tt> method</li>
|
||||||
<li>Lua 5.0 and 5.1 compatible
|
<li>Lua 5.0 and 5.1 compatible</li>
|
||||||
<li>Dynamically loadable or statically linked
|
<li>Dynamically loadable or statically linked</li>
|
||||||
<li>New drivers for Oracle and MySQL databases
|
<li>New drivers for Oracle and MySQL databases</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a name="installation"></a>Installation</h2>
|
<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:
|
In order to use LuaSQL over JDBC, make sure that:
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li> Lua is running with <a href="http://www.keplerproject.org/luajava">LuaJava</a>
|
<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> 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> JDBC driver of the desired database is also in the virtual machine classpath</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
@ -178,6 +179,7 @@ The implementation is compatible with Lua 5.0 and was coded by
|
|||||||
Tomás Guisasola, Eduardo Quintão, Thiago Ponte, Fabio Mascarenhas,
|
Tomás Guisasola, Eduardo Quintão, Thiago Ponte, Fabio Mascarenhas,
|
||||||
with many invaluable contributions by Michael Roth, Tiago Dionisio,
|
with many invaluable contributions by Michael Roth, Tiago Dionisio,
|
||||||
Leonardo Godinho and Danilo Tuler.
|
Leonardo Godinho and Danilo Tuler.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h4>LuaSQL 1.0</h4>
|
<h4>LuaSQL 1.0</h4>
|
||||||
<p>
|
<p>
|
||||||
@ -186,10 +188,11 @@ Ierusalimschy.
|
|||||||
The first implementation was compatible with Lua 4.0a.
|
The first implementation was compatible with Lua 4.0a.
|
||||||
Many modifications were made but not distributed by Diego Nehab (ODBC),
|
Many modifications were made but not distributed by Diego Nehab (ODBC),
|
||||||
Carlos Cassino, Tomás Guisasola and Eduardo Quintão (PostgreSQL).
|
Carlos Cassino, Tomás Guisasola and Eduardo Quintão (PostgreSQL).
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
LuaSQL development was sponsored by
|
LuaSQL development was sponsored by
|
||||||
<a href="http://www.fabricadigital.com.br">Fábrica Digital</a>.
|
<a href="http://www.fabricadigital.com.br">Fábrica Digital</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2><a name="contact"></a>Contact us</h2>
|
<h2><a name="contact"></a>Contact us</h2>
|
||||||
|
|
||||||
@ -201,12 +204,12 @@ Comments are welcome!
|
|||||||
|
|
||||||
</div> <!-- id="content" -->
|
</div> <!-- id="content" -->
|
||||||
|
|
||||||
<!--<hr>-->
|
</div> <!-- id="main" -->
|
||||||
|
|
||||||
<div id="about">
|
<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>
|
<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>
|
</small></p>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
"http://www.w3.org/TR/html4/strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>LuaSQL License</title>
|
<title>LuaSQL License</title>
|
||||||
<link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css">
|
<link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="header" style="text-align: center;">
|
<div class="header" style="text-align: center;">
|
||||||
<a href="http://www.keplerproject.org/luasql">
|
<a href="http://www.keplerproject.org/luasql">
|
||||||
<img alt="LuaSQL logo" src="luasql.png">
|
<img alt="LuaSQL logo" src="luasql.png"/>
|
||||||
</a><br>
|
</a><br/>
|
||||||
<big><b>LuaSQL</b></big><br>
|
<big><b>LuaSQL</b></big><br/>
|
||||||
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br>
|
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br/>
|
||||||
|
|
||||||
<div class="menu" style="font-size: small;">
|
<div class="menu" style="font-size: small;">
|
||||||
<a href="index.html">home</a> ·
|
<a href="index.html">home</a> ·
|
||||||
@ -23,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr/>
|
||||||
|
|
||||||
<h2>License</h2>
|
<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.
|
<a href="http://www.keplerproject.org">Kepler Project</a> team.
|
||||||
The implementation is not derived from licensed software.</p>
|
The implementation is not derived from licensed software.</p>
|
||||||
|
|
||||||
<hr>
|
<hr/>
|
||||||
<p>Copyright © 2003-2005 The Kepler Project.</p>
|
<p>Copyright © 2003-2005 The Kepler Project.</p>
|
||||||
|
|
||||||
<p>Permission is hereby granted, free of charge, to any person obtaining a copy
|
<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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.</p>
|
THE SOFTWARE.</p>
|
||||||
|
|
||||||
<hr>
|
<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><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>
|
<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>
|
</small></p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
"http://www.w3.org/TR/html4/strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>LuaSQL: Database connectivity for the Lua programming language</title>
|
<title>LuaSQL: Database connectivity for the Lua programming language</title>
|
||||||
<link rel="stylesheet" href="doc.css" type="text/css">
|
<link rel="stylesheet" href="doc.css" type="text/css"/>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -13,10 +13,10 @@
|
|||||||
|
|
||||||
<div id="product" style="text-align: center;">
|
<div id="product" style="text-align: center;">
|
||||||
<a href="http://www.keplerproject.org/luasql">
|
<a href="http://www.keplerproject.org/luasql">
|
||||||
<img alt="LuaSQL logo" src="luasql.png">
|
<img alt="LuaSQL logo" src="luasql.png"/>
|
||||||
</a><br>
|
</a><br/>
|
||||||
<big><b>LuaSQL</b></big><br>
|
<big><b>LuaSQL</b></big><br/>
|
||||||
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br>
|
Database connectivity for the <a href="http://www.lua.org">Lua</a> programming language<br/>
|
||||||
|
|
||||||
<!-- <div class="menu" style="font-size: small;">
|
<!-- <div class="menu" style="font-size: small;">
|
||||||
<a href="index.html">home</a> ·
|
<a href="index.html">home</a> ·
|
||||||
@ -26,10 +26,10 @@
|
|||||||
</div>--><!-- id="navigation" -->
|
</div>--><!-- id="navigation" -->
|
||||||
</div> <!-- id="product" -->
|
</div> <!-- id="product" -->
|
||||||
|
|
||||||
<!--<hr>-->
|
<div id="main">
|
||||||
|
|
||||||
<div id="navigation">
|
<div id="navigation">
|
||||||
<!--<h2>Contents</h2>-->
|
<h1>LuaSQL</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="index.html">Home</a>
|
<li><a href="index.html">Home</a>
|
||||||
<ul>
|
<ul>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<li><a href="#contact">Contact us</a></li>
|
<li><a href="#contact">Contact us</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a nohref>Manual</a>
|
<li><strong>Manual</strong>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#introduction">Introduction</a></li>
|
<li><a href="#introduction">Introduction</a></li>
|
||||||
<li><a href="#errors">Errors</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.
|
and a database system.
|
||||||
Therefore errors can occur on both levels, that is,
|
Therefore errors can occur on both levels, that is,
|
||||||
inside the database client or inside LuaSQL driver.
|
inside the database client or inside LuaSQL driver.
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Errors like mal-formed SQL statement, unknown table name etc.
|
Errors like mal-formed SQL statement, unknown table name etc.
|
||||||
are called <em>database errors</em> and
|
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
|
<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
|
function that is stored into the table <code>luasql</code> with the same
|
||||||
name of the driver (odbc, postgres etc). For example,
|
name of the driver (odbc, postgres etc). For example,
|
||||||
|
</p>
|
||||||
<pre class="example">
|
<pre class="example">
|
||||||
env = luasql.odbc()
|
env = luasql.odbc()
|
||||||
</pre>
|
</pre>
|
||||||
@ -130,22 +132,22 @@ env = luasql.jdbc ("com.mysql.jdbc.Driver")
|
|||||||
|
|
||||||
<ul>
|
<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>.
|
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
|
Returns: <code>true</code> in case of success; <code>false</code> when
|
||||||
the object is already closed.</li>
|
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
|
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.
|
The <code>sourcename</code> may vary according to each driver.
|
||||||
Some use a simple database name, like PostgreSQL, MySQL and SQLite;
|
Some use a simple database name, like PostgreSQL, MySQL and SQLite;
|
||||||
the ODBC driver expects the name of the DSN;
|
the ODBC driver expects the name of the DSN;
|
||||||
the Oracle driver expects the service name;
|
the Oracle driver expects the service name;
|
||||||
the JDBC driver expects a string like <code>"jdbc:<database system>://<database name>"</code>, which is specific for each driver.<br>
|
the JDBC driver expects a string like <code>"jdbc:<database system>://<database name>"</code>, which is specific for each driver.<br/>
|
||||||
See also: <a href="#postgres_extensions">PostgreSQL</a>,
|
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>
|
Returns: a <a href="#connection_object">connection object</a>.</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@ -163,42 +165,42 @@ method.</p>
|
|||||||
|
|
||||||
<ul>
|
<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>.
|
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
|
Returns: <code>true</code> in case of success and <code>false</code> when
|
||||||
the object is already closed.</li>
|
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.
|
Commits the current transaction.
|
||||||
This feature might not work on database systems that do not implement
|
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
|
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>
|
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>
|
<li><a name="conn_execute"></a><b><code>conn:execute(statement)</code></b><br/>
|
||||||
Executes the given SQL <code>statement</code>.<br>
|
Executes the given SQL <code>statement</code>.<br/>
|
||||||
Returns: a <a href="#cursor_object">cursor object</a>
|
Returns: a <a href="#cursor_object">cursor object</a>
|
||||||
if there are results, or the number of rows affected by the command otherwise.</li>
|
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.
|
Rolls back the current transaction.
|
||||||
This feature might not work on database systems that do not implement
|
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
|
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>
|
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.
|
Turns on or off the "auto commit" mode.
|
||||||
This feature might not work on database systems that do not implement
|
This feature might not work on database systems that do not implement
|
||||||
transactions.
|
transactions.
|
||||||
On database systems that do not have the concept of "auto commit mode",
|
On database systems that do not have the concept of "auto commit mode",
|
||||||
but do implement transactions, this mechanism is implemented by the driver.
|
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
|
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>
|
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>
|
<ul>
|
||||||
|
|
||||||
<li><a name="cur_close"></a><b><code>cur:close()</code></b> <br>
|
<li><a name="cur_close"></a><b><code>cur:close()</code></b> <br/>
|
||||||
Closes this cursor.<br>
|
Closes this cursor.<br/>
|
||||||
Returns: <code>true</code> in case of success and <code>false</code> when
|
Returns: <code>true</code> in case of success and <code>false</code> when
|
||||||
the object is already closed.</li>
|
the object is already closed.</li>
|
||||||
|
|
||||||
|
|
||||||
<li><a name="cur_fetch"></a><b><code>cur:fetch([table[,modestring]])</code></b> <br>
|
<li><a name="cur_fetch"></a><b><code>cur:fetch([table[,modestring]])</code></b> <br/>
|
||||||
Retrieves the next row of results.<br>
|
Retrieves the next row of results.<br/>
|
||||||
If <code>fetch</code> is called without parameters,
|
If <code>fetch</code> is called without parameters,
|
||||||
the results will be returned to the caller directly.
|
the results will be returned to the caller directly.
|
||||||
If <code>fetch</code> is called with a table, the results will be copied
|
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.
|
It is just a string indicating how the result table should be made.
|
||||||
The mode string can contain:
|
The mode string can contain:
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>"n"</b> the resulting table will have numerical indices (default)
|
<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><b>"a"</b> the resulting table will have alphanumerical indices</li>
|
||||||
</ul>
|
</ul>
|
||||||
The <em>numerical indices</em> are the positions of the fields in the select
|
The <em>numerical indices</em> are the positions of the fields in the select
|
||||||
statement;
|
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
|
The optional <code>table</code> parameter is a table that should be
|
||||||
used to store the next row.
|
used to store the next row.
|
||||||
This allows the use of a unique table for many fetches which
|
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.
|
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,
|
In the current implementation,
|
||||||
the PostgreSQL and MySQL drivers returns all values as strings
|
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.
|
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>
|
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>
|
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>
|
Returns: a list (table) of column types.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -268,18 +270,18 @@ Returns: a list (table) of column types.</li>
|
|||||||
the Postgres driver also offers these extra features:</p>
|
the Postgres driver also offers these extra features:</p>
|
||||||
|
|
||||||
<ul>
|
<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
|
In the PostgreSQL driver, this method has two other optional parameters
|
||||||
that indicate the hostname and port to connect.
|
that indicate the hostname and port to connect.
|
||||||
Also, the first parameter can contain all connection information,
|
Also, the first parameter can contain all connection information,
|
||||||
as stated in the documentation for <code>PQconnectdb</code> function
|
as stated in the documentation for <code>PQconnectdb</code> function
|
||||||
in the PostgreSQL manual
|
in the PostgreSQL manual
|
||||||
(e.g. <small><code>environment:connect("dbname=<<em>name</em>> user=<<em>username</em>>")</code></small>) <br>
|
(e.g. <small><code>environment:connect("dbname=<<em>name</em>> user=<<em>username</em>>")</code></small>) <br/>
|
||||||
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>
|
Returns: a <a href="#connection_object">connection object</a></li>
|
||||||
|
|
||||||
<li><b><code>cur:numrows()</code></b> <br>
|
<li><b><code>cur:numrows()</code></b> <br/>
|
||||||
See also: <a href="#cursor_object">cursor objects</a><br>
|
See also: <a href="#cursor_object">cursor objects</a><br/>
|
||||||
Returns: the number of rows in the query result.</li>
|
Returns: the number of rows in the query result.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -290,10 +292,10 @@ the Postgres driver also offers these extra features:</p>
|
|||||||
the MySQL driver also offers these extra features:</p>
|
the MySQL driver also offers these extra features:</p>
|
||||||
|
|
||||||
<ul>
|
<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
|
In the MySQL driver, this method has two other optional parameters
|
||||||
that indicate the hostname and port to connect.
|
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>
|
Returns: a <a href="#connection_object">connection object</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -311,19 +313,19 @@ methods <code>commit</code>, <code>rollback</code> and
|
|||||||
the Oracle driver also offers this extra feature:</p>
|
the Oracle driver also offers this extra feature:</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><b><code>cur:numrows()</code></b> <br>
|
<li><b><code>cur:numrows()</code></b> <br/>
|
||||||
See also: <a href="#cursor_object">cursor objects</a><br>
|
See also: <a href="#cursor_object">cursor objects</a><br/>
|
||||||
Returns: the number of rows in the query result.</li>
|
Returns: the number of rows in the query result.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div> <!-- id="content" -->
|
</div> <!-- id="content" -->
|
||||||
|
|
||||||
<!--<hr>-->
|
</div> <!-- id="main" -->
|
||||||
|
|
||||||
<div id="about">
|
<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>
|
<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>
|
</small></p>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user