*** empty log message ***

This commit is contained in:
tuler 2005-05-22 18:51:52 +00:00
parent 976b557f44
commit bc2bfed3a3
2 changed files with 186 additions and 183 deletions

View File

@ -14,7 +14,7 @@
<div id="product_logo"><a href="http://www.keplerproject.org">
<img alt="LuaSQL logo" src="luasql.png"/>
</a></div>
<div id="product_name"><big><b>LuaSQL</b></big></div>
<div id="product_name"><big><strong>LuaSQL</strong></big></div>
<div id="product_description">Conectividade de banco de dados para a linguagem de programa&ccedil;&atilde;o Lua</div>
</div> <!-- id="product" -->
@ -139,16 +139,16 @@ env = luasql.jdbc ("com.mysql.jdbc.Driver")
<h4>M&eacute;todos</h4>
<ul>
<li><a name="env_close"></a><b><code>env:close()</code></b><br/>
Fecha o ambiente <code>env</code>. S&oacute; &eacute; bem sucedido se todas as suas
<dl class="reference">
<dt><a name="env_close"></a><strong><code>env:close()</code></strong></dt>
<dd>Fecha o ambiente <code>env</code>. S&oacute; &eacute; bem sucedido se todas as suas
conex&otilde;es j&aacute; tiverem sido fechadas anteriormente.<br/>
Retorna: <code>true</code>, em caso de sucesso; <code>false</code>, quando o ambiente
j&aacute; estiver fechado.
</li>
</dd>
<li><a name="env_connect"></a><b><code>env:connect(sourcename[,username[,password]])</code></b><br/>
Conecta &agrave; fonte de dados especificada em <code>sourcename</code> usando
<dt><a name="env_connect"></a><strong><code>env:connect(sourcename[,username[,password]])</code></strong></dt>
<dd>Conecta &agrave; fonte de dados especificada em <code>sourcename</code> usando
<code>username</code> e <code>password</code> se eles s&atilde;o fornecidos.<br/>
O <code>sourcename</code> pode variar de acordo com cada driver.
Alguns usam simplesmente o nome do banco de dados, como PostgreSQL, MySQL e SQLite;
@ -159,8 +159,8 @@ env = luasql.jdbc ("com.mysql.jdbc.Driver")
Veja tamb&eacute;m: <a href="#postgres_extensions">PostgreSQL</a> e
<a href="#mysql_extensions">MySQL</a>.<br/>
Retorna: uma <a href="#connection_object">conex&atilde;o</a>.
</li>
</ul>
</dd>
</dl>
<h2><a name="connection_object"></a>Conex&atilde;o</h2>
@ -171,43 +171,43 @@ o m&eacute;todo <code><a href="#env_connect">environment:connect</a></code>.</p>
<h4>M&eacute;todos</h4>
<ul>
<li><a name="conn_close"></a><b><code>conn:close()</code></b><br/>
Fecha a conex&atilde;o <code>conn</code>. S&oacute; &eacute; bem sucedido se todos
<dl class="reference">
<dt><a name="conn_close"></a><strong><code>conn:close()</code></strong></dt>
<dd>Fecha a conex&atilde;o <code>conn</code>. S&oacute; &eacute; bem sucedido se todos
os seus cursores tiverem sido fechados anteriormente.<br/>
Retorna: <code>true</code>, em caso de sucesso; <code>false</code>, quando a
conex&atilde;o j&aacute; estiver fechada.
</li>
</dd>
<li><a name="conn_commit"></a><b><code>conn:commit()</code></b><br/>
Efetua a transa&ccedil;&atilde;o corrente. Esse atributo pode n&atilde;o funcionar
<dt><a name="conn_commit"></a><strong><code>conn:commit()</code></strong></dt>
<dd>Efetua a transa&ccedil;&atilde;o corrente. Esse atributo pode n&atilde;o funcionar
em sistemas de banco de dados que n&atilde;o implementam transa&ccedil;&otilde;es.<br/>
Retorna: <code>true</code>, em caso de sucesso; <code>false</code>, quando
a opera&ccedil;&atilde;o n&atilde;o pode ser realizada ou n&atilde;o est&aacute; implementada.
</li>
</dd>
<li><a name="conn_execute"></a><b><code>conn:execute(statement)</code></b><br/>
Executa o <code>statement</code> SQL dado.<br/>
<dt><a name="conn_execute"></a><strong><code>conn:execute(statement)</code></strong></dt>
<dd>Executa o <code>statement</code> SQL dado.<br/>
Retorna: o <a href="#cursor_object">cursor</a>, se houver resultados, ou o n&uacute;mero
de registros afetados de alguma forma pelo comando.
</li>
</dd>
<li><a name="conn_rollback"></a><b><code>conn:rollback()</code></b><br/>
Desfaz a transa&ccedil;&atilde;o corrente. Esse atributo pode n&atilde;o funcionar
<dt><a name="conn_rollback"></a><strong><code>conn:rollback()</code></strong></dt>
<dd>Desfaz a transa&ccedil;&atilde;o corrente. Esse atributo pode n&atilde;o funcionar
em sistemas de banco de dados que n&atilde;o implementam transa&ccedil;&otilde;es.<br/>
Retorna: <code>true</code>, em caso de sucesso; <code>false</code>, quando
a opera&ccedil;&atilde;o n&atilde;o pode ser realizada ou n&atilde;o est&aacute; implementada.
</li>
</dd>
<li><a name="conn_setautocommit"></a><b><code>conn:setautocommit(boolean)</code></b><br/>
Ativa ou desativa o modo "auto commit". Esse atributo pode n&atilde;o funcionar em sistemas
<dt><a name="conn_setautocommit"></a><strong><code>conn:setautocommit(boolean)</code></strong></dt>
<dd>Ativa ou desativa o modo "auto commit". Esse atributo pode n&atilde;o funcionar em sistemas
de banco de dados que n&atilde;o implementam transa&ccedil;&otilde;es. Em sistemas de banco
de dados que n&atilde;o trabalham com o conceito de " modo auto commit", mas que implementam
transa&ccedil;&otilde;es, esse mecanismo &eacute; implementado pelo driver.<br/>
Retorna: <code>true</code>, em caso de sucesso; <code>false</code>, quando
a opera&ccedil;&atilde;o n&atilde;o pode ser realizada ou n&atilde;o est&aacute; implementada.
</li>
</ul>
</dd>
</dl>
<h2><a name="cursor_object"></a>Cursor</h2>
@ -220,15 +220,15 @@ e <a href="#oracle_extensions">Oracle</a>.</p>
<h4>M&eacute;todos</h4>
<ul>
<li><a name="cur_close"></a><b><code>cur:close()</code></b><br/>
Fecha esse cursor.<br/>
<dl class="reference">
<dt><a name="cur_close"></a><strong><code>cur:close()</code></strong></dt>
<dd>Fecha esse cursor.<br/>
Retorna: <code>true</code>, em caso de sucesso; <code>false</code>, quando o cursor
j&aacute; est&aacute; fechado.
</li>
</dd>
<li><a name="cur_fetch"></a><b><code>cur:fetch([table[,modestring]])</code></b><br/>
Recupera o pr&oacute;ximo registro de resultados.<br/>
<dt><a name="cur_fetch"></a><strong><code>cur:fetch([table[,modestring]])</code></strong></dt>
<dd>Recupera o pr&oacute;ximo registro de resultados.<br/>
Se <code>fetch</code> &eacute; chamado sem par&acirc;metros, os resultados
consistem em uma lista de valores. Se <code>fetch</code> &eacute;
chamado com uma tabela, os resultados s&atilde;o copiados para a tabela e a tabela
@ -236,10 +236,11 @@ e <a href="#oracle_extensions">Oracle</a>.</p>
par&acirc;metro opcional de modo (<code>modestring</code>): uma seq&uuml;&ecirc;ncia
de caracteres indicando como deve ser constru&iacute;da a tabela de resultados.
A seq&uuml;&ecirc;ncia de caracteres do modo pode conter:
<ul>
<li><b>"n"</b>, a tabela resultante ter&aacute; &iacute;ndices num&eacute;ricos (padr&atilde;o)</li>
<li><b>"a"</b>, a tabela resultante ter&aacute; &iacute;ndices alfanum&eacute;ricos</li>
</ul>
<dl>
<dt><strong>"n"</strong></dt><dd>a tabela resultante ter&aacute; &iacute;ndices num&eacute;ricos (padr&atilde;o)</dd>
<dt><strong>"a"</strong></dt><dd>a tabela resultante ter&aacute; &iacute;ndices alfanum&eacute;ricos</dd>
</dl>
<br/>
Os <em>&iacute;ndices num&eacute;ricos</em> representam as posi&ccedil;&otilde;es dos
campos no comando selecionado; os <em>&iacute;ndices alfanum&eacute;ricos</em> representam
os nomes dos campos.<br/>
@ -253,16 +254,16 @@ e <a href="#oracle_extensions">Oracle</a>.</p>
Retorna: dados, como descrito acima, ou <code>nil</code> se n&atilde;o existem mais registros.
Note que esse m&eacute;todo pode retornar <code>nil</code> como um resultado v&aacute;lido
(equivalente a null).
</li>
</dd>
<li><a name="cur_colnames"></a><b><code>cur:getcolnames()</code></b><br/>
Retorna: uma tabela com os nomes das colunas.
</li>
<dt><a name="cur_colnames"></a><strong><code>cur:getcolnames()</code></strong></dt>
<dd>Retorna: uma tabela com os nomes das colunas.
</dd>
<li><a name="cur_coltypes"></a><b><code>cur:getcoltypes()</code></b><br/>
Retorna: uma tabela com os tipos das colunas.
</li>
</ul>
<dt><a name="cur_coltypes"></a><strong><code>cur:getcoltypes()</code></strong></dt>
<dd>Retorna: uma tabela com os tipos das colunas.
</dd>
</dl>
<p><a name="extensions"></a></p>
@ -271,9 +272,9 @@ e <a href="#oracle_extensions">Oracle</a>.</p>
<p>Al&eacute;m das funcionalidades b&aacute;sicas oferecidas por todos os drivers
(ver manual), o driver Postgres ainda oferece funcionalidades extras:</p>
<ul>
<li><b><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></b><br/>
No driver PostgreSQL, esse m&eacute;todo tem dois outros par&acirc;metros que indicam
<dl class="reference">
<dt><strong><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></strong></dt>
<dd>No driver PostgreSQL, esse m&eacute;todo tem dois outros par&acirc;metros que indicam
o <code>hostname</code> e a <code>port</code> a serem utilizados na conex&atilde;o.
O primeiro par&acirc;metro tamb&eacute;m pode conter todas as informa&ccedil;&otilde;es
de conex&atilde;o, como &eacute; dito na documenta&ccedil;&atilde;o
@ -281,13 +282,13 @@ e <a href="#oracle_extensions">Oracle</a>.</p>
(ex. <small><code>environment:connect("dbname=&lt;<em>name</em>&gt; user=&lt;<em>username</em>&gt;")</code></small>)<br/>
Veja tamb&eacute;m: <a href="#environment_object">ambiente</a><br/>
Retorna: uma <a href="#connection_object">conex&atilde;o</a>
</li>
</dd>
<li><b><code>cur:numrows()</code></b><br/>
Veja tamb&eacute;m: <a href="#cursor_object">cursor</a><br/>
<dt><strong><code>cur:numrows()</code></strong></dt>
<dd>Veja tamb&eacute;m: <a href="#cursor_object">cursor</a><br/>
Retorna: o n&uacute;mero de registros no resultado da busca.
</li>
</ul>
</dd>
</dl>
<h2><a name="mysql_extensions"></a>MySQL</h2>
@ -295,14 +296,14 @@ e <a href="#oracle_extensions">Oracle</a>.</p>
<p>Al&eacute;m das funcionalidades b&aacute;sicas oferecidas por todos os drivers
(ver manual), o driver MySQL ainda oferece uma funcionalidade extra:</p>
<ul>
<li><b><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></b> <br/>
No driver MySQL, esse m&eacute;todo tem dois outros par&acirc;metros que indicam o
<dl class="reference">
<dt><strong><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></strong></dt>
<dd>No driver MySQL, esse m&eacute;todo tem dois outros par&acirc;metros que indicam o
<code>hostname</code> e a <code>port</code> a serem utilizados na conex&atilde;o.
Veja tamb&eacute;m: <a href="#environment_object">ambiente</a><br/>
Retorna: uma <a href="#connection_object">conex&atilde;o</a>
</li>
</ul>
</dd>
</dl>
<p>Nota: Esse driver &eacute; compat&iacute;vel com a vers&atilde;o 4.0 e 4.1 (alpha) do
MySQL API. Apenas as vers&otilde;es 4.1 oferecem suporte para transa&ccedil;&otilde;es que usam tabelas
@ -314,12 +315,12 @@ BDB ou INNODB. Com a vers&atilde;o 4.0 ou sem um desses tipos de tabelas, os m&e
<p>Al&eacute;m das funcionalidades b&aacute;sicas oferecidas por todos os drivers
(ver manual), o driver Oracle ainda oferece uma funcionalidade extra:</p>
<ul>
<li><b><code>cur:numrows()</code></b> <br/>
Veja tamb&eacute;m: <a href="#cursor_object">cursor</a><br/>
<dl class="reference">
<dt><strong><code>cur:numrows()</code></strong></dt>
<dd>Veja tamb&eacute;m: <a href="#cursor_object">cursor</a><br/>
Retorna: o n&uacute;mero de registros no resultado da pesquisa.
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
@ -328,7 +329,7 @@ BDB ou INNODB. Com a vers&atilde;o 4.0 ou sem um desses tipos de tabelas, os m&e
<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: manual.html,v 1.2 2005/05/02 12:40:16 carregal Exp $
$Id: manual.html,v 1.3 2005/05/22 18:51:52 tuler Exp $
</small></p>
</div> <!-- id="about" -->

View File

@ -14,7 +14,7 @@
<div id="product_logo"><a href="http://www.keplerproject.org">
<img alt="LuaSQL logo" src="luasql.png"/>
</a></div>
<div id="product_name"><big><b>LuaSQL</b></big></div>
<div id="product_name"><big><strong>LuaSQL</strong></big></div>
<div id="product_description">Database connectivity for the Lua programming language</div>
</div> <!-- id="product" -->
@ -159,27 +159,27 @@ env = luasql.jdbc ("com.mysql.jdbc.Driver")
<h4>Methods</h4>
<ul>
<dl class="reference">
<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/>
Returns: <code>true</code> in case of success; <code>false</code> when
the object is already closed.</li>
<dt><a name="env_close"></a><strong><code>env:close()</code></strong></dt>
<dd>Closes the environment <code>env</code>.
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.</dd>
<dt><a name="env_connect"></a><strong><code>env:connect(sourcename[,username[,password]])</code></strong></dt>
<dd>Connects to a data source specified in <code>sourcename</code> using
<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/>
See also: <a href="#postgres_extensions">PostgreSQL</a>,
and <a href="#mysql_extensions">MySQL</a> extensions.<br/>
Returns: a <a href="#connection_object">connection object</a>.</dd>
<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/>
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/>
See also: <a href="#postgres_extensions">PostgreSQL</a>,
and <a href="#mysql_extensions">MySQL</a> extensions.<br/>
Returns: a <a href="#connection_object">connection object</a>.</li>
</ul>
</dl>
<h2><a name="connection_object"></a>Connection Objects</h2>
@ -192,48 +192,48 @@ method.</p>
<h4>Methods</h4>
<ul>
<dl class="reference">
<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/>
Returns: <code>true</code> in case of success and <code>false</code> when
the object is already closed.</li>
<dt><a name="conn_close"></a><strong><code>conn:close()</code></strong></dt>
<dd>Closes the connection <code>conn</code>.
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.</dd>
<dt><a name="conn_commit"></a><strong><code>conn:commit()</code></strong></dt>
<dd>Commits the current transaction.
This feature might not work on database systems that do not implement
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.</dd>
<dt><a name="conn_execute"></a><strong><code>conn:execute(statement)</code></strong></dt>
<dd>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.</dd>
<dt><a name="conn_rollback"></a><strong><code>conn:rollback()</code></strong></dt>
<dd>Rolls back the current transaction.
This feature might not work on database systems that do not implement
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.</dd>
<dt><a name="conn_setautocommit"></a><strong><code>conn:setautocommit(boolean)</code></strong></dt>
<dd>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/>
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.</dd>
<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/>
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/>
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/>
Rolls back the current transaction.
This feature might not work on database systems that do not implement
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/>
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/>
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>
</ul>
</dl>
<h2><a name="cursor_object"></a>Cursor Objects</h2>
@ -247,49 +247,51 @@ and <a href="#oracle_extensions">Oracle</a> extensions.</p>
<h4>Methods</h4>
<ul>
<dl class="reference">
<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>
<dt><a name="cur_close"></a><strong><code>cur:close()</code></strong></dt>
<dd>Closes this cursor.<br/>
Returns: <code>true</code> in case of success and <code>false</code> when
the object is already closed.</dd>
<dt><a name="cur_fetch"></a><strong><code>cur:fetch([table[,modestring]])</code></strong></dt>
<dd>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
into the table and this table will be returned (for convenience).
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:
<dl>
<dt><strong>"n"</strong></dt><dd>the resulting table will have numerical indices (default)</dd>
<dt><strong>"a"</strong></dt><dd>the resulting table will have alphanumerical indices</dd>
</dl>
<br/>
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 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/>
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/>
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.</dd>
<dt><a name="cur_colnames"></a><strong><code>cur:getcolnames()</code></strong></dt>
<dd>Returns: a list (table) of column names.</dd>
<dt><a name="cur_coltypes"></a><strong><code>cur:getcoltypes()</code></strong></dt>
<dd>Returns: a list (table) of column types.</dd>
<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
into the table and this table will be returned (for convenience).
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>
<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 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/>
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/>
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/>
Returns: a list (table) of column names.</li>
<li><a name="cur_coltypes"></a><b><code>cur:getcoltypes()</code></b> <br/>
Returns: a list (table) of column types.</li>
</ul>
</dl>
<p><a name="extensions"></a></p>
@ -298,21 +300,21 @@ Returns: a list (table) of column types.</li>
<p>Besides the basic functionality provided by all drivers (see manual),
the Postgres driver also offers these extra features:</p>
<ul>
<li><b><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></b> <br/>
In the PostgreSQL driver, this method has two other optional parameters
<dl class="reference">
<dt><strong><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></strong></dt>
<dd>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/>
Returns: a <a href="#connection_object">connection object</a></li>
Returns: a <a href="#connection_object">connection object</a></dd>
<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>
<dt><strong><code>cur:numrows()</code></strong></dt>
<dd>See also: <a href="#cursor_object">cursor objects</a><br/>
Returns: the number of rows in the query result.</dd>
</dl>
<h2><a name="mysql_extensions"></a>MySQL Extensions</h2>
@ -320,13 +322,13 @@ the Postgres driver also offers these extra features:</p>
<p>Besides the basic functionality provided by all drivers (see manual),
the MySQL driver also offers these extra features:</p>
<ul>
<li><b><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></b> <br/>
In the MySQL driver, this method has two other optional parameters
<dl class="reference">
<dt><strong><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></strong></dt>
<dd>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/>
Returns: a <a href="#connection_object">connection object</a></li>
</ul>
Returns: a <a href="#connection_object">connection object</a></dd>
</dl>
<p>Note: This driver is compatible to version 4.0 and 4.1 (alpha) of
MySQL API. Only version 4.1 provides support for transactions by using
@ -341,11 +343,11 @@ methods <code>commit</code>, <code>rollback</code> and
<p>Besides the basic functionality provided by all drivers (see manual),
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/>
Returns: the number of rows in the query result.</li>
</ul>
<dl class="reference">
<dt><strong><code>cur:numrows()</code></strong></dt>
<dd>See also: <a href="#cursor_object">cursor objects</a><br/>
Returns: the number of rows in the query result.</dd>
</dl>
</div> <!-- id="content" -->
@ -354,7 +356,7 @@ the Oracle driver also offers this extra feature:</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: manual.html,v 1.10 2005/03/22 22:47:24 tuler Exp $
$Id: manual.html,v 1.11 2005/05/22 18:51:52 tuler Exp $
</small></p>
</div> <!-- id="about" -->