Documentation update.

This commit is contained in:
Tomás Guisasola 2018-10-30 18:58:11 -03:00
parent dd91e26303
commit 328cfb8db6
3 changed files with 27 additions and 3 deletions

View File

@ -340,13 +340,20 @@ o driver Postgres oferece as seguintes funcionalidades adicionais:</p>
o driver MySQL ainda oferece as seguintes funcionalidades adicionais:</p>
<dl class="reference">
<dt><strong><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></strong></dt>
<dt><strong><code>env:connect(sourcename[,username[,password[,hostname[,port[,socket[,client_flag]]]]]])</code></strong></dt>
<dd>No driver MySQL, esse m&eacute;todo tem mais dois par&acirc;metros opcionais que indicam o
<code>hostname</code> e a <code>port</code> a serem utilizados na conex&atilde;o.
Ela também aceita dois outros parâmetros que indicam um Unix socket de onde abrir a conexão e um flag do cliente.<br/>
Veja tamb&eacute;m: <a href="#environment_object">ambiente</a><br/>
Retorna: uma <a href="#connection_object">conex&atilde;o</a>
</dd>
<dt><strong><code>conn:ping()</code></strong></dt>
<dd>Verifica se uma conexão está fechada (retorna false) ou aberta (retorna true).
Irá retornar nil seguido de uma mensagem no caso de erro.<br/>
Retorna: true, se a conexão estiver aberta, ou false, se estiver fechada.
</dd>
<dt><strong><code>cur:numrows()</code></strong></dt>
<dd>Veja tamb&eacute;m: <a href="#cursor_object">cursores</a><br/>
Retorna: o n&uacute;mero de registros no resultado da busca.

View File

@ -44,6 +44,14 @@
<h2><a name="history"></a>History</h2>
<dl class="history">
<dt><strong>LuaSQL 2.4.0</strong> [??/??/2018]</dt>
<dd>
<ul>
<li>Added support in MySQL driver for opening a connection based on a Unix socket (thanks to rafis)</li>
<li>Added connection ping method (thanks to rafis)</li>
</ul>
</dd>
<dt><strong>LuaSQL 2.3.5</strong> [23/Feb/2017]</dt>
<dd>
<ul>

View File

@ -342,9 +342,11 @@ the Postgres driver also offers these extra features:</p>
the MySQL driver also offers these extra features:</p>
<dl class="reference">
<dt><strong><code>env:connect(sourcename[,username[,password[,hostname[,port]]]])</code></strong></dt>
<dt><strong><code>env:connect(sourcename[,username[,password[,hostname[,port[,socket[,client_flag]]]]]])</code></strong></dt>
<dd>In the MySQL driver, this method adds two optional parameters
that indicate the hostname and port to connect.<br/>
that indicate the hostname and port to connect.
It also accepts two optional parameters that indicate a unix socket and the
client flag.<br/>
See also: <a href="#environment_object">environment objects</a><br/>
Returns: a <a href="#connection_object">connection object</a></dd>
@ -363,6 +365,13 @@ the MySQL driver also offers these extra features:</p>
Returns: the number of the last value generated for an AUTO_INCREMENT column.
</dd>
<a name="mysql_ping"></a>
<dt><strong><code>conn:ping()</code></strong></dt>
<dd>Check whether the connection is closed (returns false) or opened (returns true).
It will return nil followed by an error message in case of error.<br/>
Returns: true, if the connection is opened, or false, if it is closed.
</dd>
<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>