Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 204ec3a8a895ae5700811efd516cad83 > files > 14

libzdb-devel-2.8.1-1.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libzdb: Connection.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<style type="text/css" media="screen">
    body,div,p,dl{font: normal normal normal 14px/18px Helvetica,Arial,sans-serif;}
</style>
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="contents">
<h1>Connection.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
A <b>Connection</b> represent a connection to a SQL database system. 
<p>
Use a Connection to execute SQL statements. There are three ways to execute a SQL statement: <a class="el" href="Connection_8h.html#d7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement...">Connection_execute()</a> is used to execute SQL statements that does not return a result set. Such statements are INSERT, UPDATE or DELETE. <a class="el" href="Connection_8h.html#3d1e39204654573ccac3d8ba3a2eae58" title="Executes the given SQL statement, which returns a single ResultSet object.">Connection_executeQuery()</a> is used to execute a SQL SELECT statement and return a result set. These methods can only handle values which can be expressed as C-strings. If you need to handle binary data, such as inserting a blob value into the database, use a PreparedStatement object to execute the SQL statement. The factory method <a class="el" href="Connection_8h.html#16dfbbe273d9a872462bed182dec3bb5" title="Creates a PreparedStatement object for sending parameterized SQL statements to the...">Connection_prepareStatement()</a> is used to obtain a PreparedStatement object.<p>
The method <a class="el" href="Connection_8h.html#3d1e39204654573ccac3d8ba3a2eae58" title="Executes the given SQL statement, which returns a single ResultSet object.">Connection_executeQuery()</a> will return an empty ResultSet (not null) if the SQL statement did not return any values. A ResultSet lives until the next call to Connection execute or until the Connection is returned to the Connection Pool. If an error occur during execution, an SQLException is thrown.<p>
Any SQL statement that changes the database (basically, any SQL command other than SELECT) will automatically start a transaction if one is not already in effect. Automatically started transactions are committed at the conclusion of the command.<p>
Transactions can also be started manually using <a class="el" href="Connection_8h.html#c0ce66b1335330efc625c2b93ca7178a" title="Start a transaction.">Connection_beginTransaction()</a>. Such transactions usually persist until the next call to <a class="el" href="Connection_8h.html#c3672ae2a12da6901e53702decb10139" title="Makes all changes made since the previous commit/rollback permanent and releases...">Connection_commit()</a> or <a class="el" href="Connection_8h.html#4bdab7bb14c43834ba231aa511919a79" title="Undoes all changes made in the current transaction and releases any database locks...">Connection_rollback()</a>. A transaction will also rollback if the database is closed or if an error occurs. Nested transactions are not allowed.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set.">ResultSet.h</a> <a class="el" href="PreparedStatement_8h.html" title="A PreparedStatement represent a single SQL statement pre-compiled into byte code...">PreparedStatement.h</a> <a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#0acb682b8260ab1c60b918599864e2e5">T</a>&nbsp;&nbsp;&nbsp;Connection_T</td></tr>

<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#24514489b0962fafe8414bfae95aa268">T</a></td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#c90958295ec1728f6b990d28fe052ac8">Connection_ping</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ping the database server and returns true if this Connection is alive, otherwise false in which case the Connection should be closed.  <a href="#c90958295ec1728f6b990d28fe052ac8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#e0cd7b68e0e3cfd6a1a458af31db25d3">Connection_clear</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close any ResultSet and PreparedStatements in the Connection.  <a href="#e0cd7b68e0e3cfd6a1a458af31db25d3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#ac4c939875fb240528435d486b484a7f">Connection_close</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return connection to the connection pool.  <a href="#ac4c939875fb240528435d486b484a7f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#c0ce66b1335330efc625c2b93ca7178a">Connection_beginTransaction</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start a transaction.  <a href="#c0ce66b1335330efc625c2b93ca7178a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#c3672ae2a12da6901e53702decb10139">Connection_commit</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object.  <a href="#c3672ae2a12da6901e53702decb10139"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#4bdab7bb14c43834ba231aa511919a79">Connection_rollback</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object.  <a href="#4bdab7bb14c43834ba231aa511919a79"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">long long int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#2a12f4185ceb920b6a478a4e844b6cf6">Connection_lastRowId</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the value for the most recent INSERT statement into a table with an AUTO_INCREMENT or INTEGER PRIMARY KEY column.  <a href="#2a12f4185ceb920b6a478a4e844b6cf6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">long long int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#406cb4abd362e332253180620b2088ba">Connection_rowsChanged</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of rows that was inserted, deleted or modified by the last <a class="el" href="Connection_8h.html#d7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement...">Connection_execute()</a> statement.  <a href="#406cb4abd362e332253180620b2088ba"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#d7029336959701d33bb921b89bc5b7ef">Connection_execute</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C, const char *sql,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.  <a href="#d7029336959701d33bb921b89bc5b7ef"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ResultSet_T&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#3d1e39204654573ccac3d8ba3a2eae58">Connection_executeQuery</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C, const char *sql,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Executes the given SQL statement, which returns a single ResultSet object.  <a href="#3d1e39204654573ccac3d8ba3a2eae58"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">PreparedStatement_T&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#16dfbbe273d9a872462bed182dec3bb5">Connection_prepareStatement</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C, const char *sql,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a PreparedStatement object for sending parameterized SQL statements to the database.  <a href="#16dfbbe273d9a872462bed182dec3bb5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#f5287b68722604015d3e7f82b0b139ee">Connection_getLastError</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method can be used to obtain a string describing the last error that occurred.  <a href="#f5287b68722604015d3e7f82b0b139ee"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Properties</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#94361c8781129aaeb809a65b66f92608">Connection_setQueryTimeout</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C, int ms)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the number of milliseconds the Connection should wait for a SQL statement to finish if the database is busy.  <a href="#94361c8781129aaeb809a65b66f92608"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#3c8570c9bd969efe7f91c516ce0d76f9">Connection_getQueryTimeout</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the number of milliseconds the Connection will wait for a SQL statement object to execute.  <a href="#3c8570c9bd969efe7f91c516ce0d76f9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#1e4b15139c4cd0917ad028284c1b0bc2">Connection_setMaxRows</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C, int max)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the limit for the maximum number of rows that any ResultSet object can contain.  <a href="#1e4b15139c4cd0917ad028284c1b0bc2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#2686525f6d3374631f4385e03708088d">Connection_getMaxRows</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the maximum number of rows that a ResultSet object produced by this Connection object can contain.  <a href="#2686525f6d3374631f4385e03708088d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">URL_T&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#d4823fe7dfe946573919138f6d708f9e">Connection_getURL</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns this Connection URL.  <a href="#d4823fe7dfe946573919138f6d708f9e"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">class methods</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#518c866ed09a2520fd43d153bebc2e8d">Connection_isSupported</a> (const char *url)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><b>Class method</b>, test if the specified database system is supported by this library.  <a href="#518c866ed09a2520fd43d153bebc2e8d"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="0acb682b8260ab1c60b918599864e2e5"></a><!-- doxytag: member="Connection.h::T" ref="0acb682b8260ab1c60b918599864e2e5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;&nbsp;&nbsp;Connection_T          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="24514489b0962fafe8414bfae95aa268"></a><!-- doxytag: member="Connection.h::T" ref="24514489b0962fafe8414bfae95aa268" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>* <a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="94361c8781129aaeb809a65b66f92608"></a><!-- doxytag: member="Connection.h::Connection_setQueryTimeout" ref="94361c8781129aaeb809a65b66f92608" args="(T C, int ms)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_setQueryTimeout           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>ms</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the number of milliseconds the Connection should wait for a SQL statement to finish if the database is busy. 
<p>
If the limit is exceeded, then the <code>execute</code> methods will return immediately with an error. The default timeout is <code>3 seconds</code>. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ms</em>&nbsp;</td><td>The query timeout limit in milliseconds; zero means there is no limit </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="3c8570c9bd969efe7f91c516ce0d76f9"></a><!-- doxytag: member="Connection.h::Connection_getQueryTimeout" ref="3c8570c9bd969efe7f91c516ce0d76f9" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Connection_getQueryTimeout           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieves the number of milliseconds the Connection will wait for a SQL statement object to execute. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The query timeout limit in milliseconds; zero means there is no limit </dd></dl>

</div>
</div><p>
<a class="anchor" name="1e4b15139c4cd0917ad028284c1b0bc2"></a><!-- doxytag: member="Connection.h::Connection_setMaxRows" ref="1e4b15139c4cd0917ad028284c1b0bc2" args="(T C, int max)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_setMaxRows           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>max</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the limit for the maximum number of rows that any ResultSet object can contain. 
<p>
If the limit is exceeded, the excess rows are silently dropped. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>max</em>&nbsp;</td><td>The new max rows limit; 0 means there is no limit </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="2686525f6d3374631f4385e03708088d"></a><!-- doxytag: member="Connection.h::Connection_getMaxRows" ref="2686525f6d3374631f4385e03708088d" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Connection_getMaxRows           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieves the maximum number of rows that a ResultSet object produced by this Connection object can contain. 
<p>
If this limit is exceeded, the excess rows are silently dropped. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The new max rows limit; 0 means there is no limit </dd></dl>

</div>
</div><p>
<a class="anchor" name="d4823fe7dfe946573919138f6d708f9e"></a><!-- doxytag: member="Connection.h::Connection_getURL" ref="d4823fe7dfe946573919138f6d708f9e" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">URL_T Connection_getURL           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns this Connection URL. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>This Connection URL </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="URL_8h.html" title="URL represent an immutable Uniform Resource Locator.">URL.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="c90958295ec1728f6b990d28fe052ac8"></a><!-- doxytag: member="Connection.h::Connection_ping" ref="c90958295ec1728f6b990d28fe052ac8" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Connection_ping           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Ping the database server and returns true if this Connection is alive, otherwise false in which case the Connection should be closed. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if Connection is connected to a database server otherwise false </dd></dl>

</div>
</div><p>
<a class="anchor" name="e0cd7b68e0e3cfd6a1a458af31db25d3"></a><!-- doxytag: member="Connection.h::Connection_clear" ref="e0cd7b68e0e3cfd6a1a458af31db25d3" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_clear           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Close any ResultSet and PreparedStatements in the Connection. 
<p>
Normally it is not necessary to call this method, but for some implementation (SQLite) it <em>may, in some situations,</em> be necessary to call this method if a execution sequence error occurs. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="ac4c939875fb240528435d486b484a7f"></a><!-- doxytag: member="Connection.h::Connection_close" ref="ac4c939875fb240528435d486b484a7f" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_close           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return connection to the connection pool. 
<p>
The same as calling <a class="el" href="ConnectionPool_8h.html#5d1f04dc0ae5fc42707dfd934f681c4a" title="Returns a connection to the pool.">ConnectionPool_returnConnection()</a> on a connection. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="c0ce66b1335330efc625c2b93ca7178a"></a><!-- doxytag: member="Connection.h::Connection_beginTransaction" ref="c0ce66b1335330efc625c2b93ca7178a" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_beginTransaction           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Start a transaction. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database error occurs </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="c3672ae2a12da6901e53702decb10139"></a><!-- doxytag: member="Connection.h::Connection_commit" ref="c3672ae2a12da6901e53702decb10139" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_commit           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database error occurs </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="4bdab7bb14c43834ba231aa511919a79"></a><!-- doxytag: member="Connection.h::Connection_rollback" ref="4bdab7bb14c43834ba231aa511919a79" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_rollback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object. 
<p>
This method will first call <a class="el" href="Connection_8h.html#e0cd7b68e0e3cfd6a1a458af31db25d3" title="Close any ResultSet and PreparedStatements in the Connection.">Connection_clear()</a> before performing the rollback to clear any statements in progress such as selects. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database error occurs </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="2a12f4185ceb920b6a478a4e844b6cf6"></a><!-- doxytag: member="Connection.h::Connection_lastRowId" ref="2a12f4185ceb920b6a478a4e844b6cf6" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long long int Connection_lastRowId           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the value for the most recent INSERT statement into a table with an AUTO_INCREMENT or INTEGER PRIMARY KEY column. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The value of the rowid from the last insert statement </dd></dl>

</div>
</div><p>
<a class="anchor" name="406cb4abd362e332253180620b2088ba"></a><!-- doxytag: member="Connection.h::Connection_rowsChanged" ref="406cb4abd362e332253180620b2088ba" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long long int Connection_rowsChanged           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the number of rows that was inserted, deleted or modified by the last <a class="el" href="Connection_8h.html#d7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement...">Connection_execute()</a> statement. 
<p>
If used with a transaction, this method should be called <em>before</em> commit is executed, otherwise 0 is returned. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of rows changed by the last (DIM) SQL statement </dd></dl>

</div>
</div><p>
<a class="anchor" name="d7029336959701d33bb921b89bc5b7ef"></a><!-- doxytag: member="Connection.h::Connection_execute" ref="d7029336959701d33bb921b89bc5b7ef" args="(T C, const char *sql,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_execute           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement. 
<p>
Several SQL statements can be used in the sql parameter string, each separated with the <em>;</em> SQL statement separator character. <b>Note</b>, calling this method clears any previous ResultSets associated with the Connection. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sql</em>&nbsp;</td><td>A SQL statement </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database error occurs. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="3d1e39204654573ccac3d8ba3a2eae58"></a><!-- doxytag: member="Connection.h::Connection_executeQuery" ref="3d1e39204654573ccac3d8ba3a2eae58" args="(T C, const char *sql,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ResultSet_T Connection_executeQuery           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Executes the given SQL statement, which returns a single ResultSet object. 
<p>
You may <b>only</b> use one SQL statement with this method. This is different from the behavior of <a class="el" href="Connection_8h.html#d7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement...">Connection_execute()</a> which executes all SQL statements in its input string. If the sql parameter string contains more than one SQL statement, only the first statement is executed, the others are silently ignored. A ResultSet "lives" only until the next call to <a class="el" href="Connection_8h.html#3d1e39204654573ccac3d8ba3a2eae58" title="Executes the given SQL statement, which returns a single ResultSet object.">Connection_executeQuery()</a>, <a class="el" href="Connection_8h.html#d7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement...">Connection_execute()</a> or until the Connection is returned to the Connection Pool. <em>This means that Result Sets cannot be saved between queries</em>. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sql</em>&nbsp;</td><td>A SQL statement </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A ResultSet object that contains the data produced by the given query. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database error occurs. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set.">ResultSet.h</a> <p>
<a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="16dfbbe273d9a872462bed182dec3bb5"></a><!-- doxytag: member="Connection.h::Connection_prepareStatement" ref="16dfbbe273d9a872462bed182dec3bb5" args="(T C, const char *sql,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PreparedStatement_T Connection_prepareStatement           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a PreparedStatement object for sending parameterized SQL statements to the database. 
<p>
The <code>sql</code> parameter may contain IN parameter placeholders. An IN placeholder is specified with a '?' character in the sql string. The placeholders are then replaced with actual values by using the PreparedStatement's setXXX methods. Only <em>one</em> SQL statement may be used in the sql parameter, this in difference to <a class="el" href="Connection_8h.html#d7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement...">Connection_execute()</a> which may take several statements. A PreparedStatement "lives" until the Connection is returned to the Connection Pool. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sql</em>&nbsp;</td><td>A single SQL statement that may contain one or more '?' IN parameter placeholders </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A new PreparedStatement object containing the pre-compiled SQL statement. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database error occurs. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="PreparedStatement_8h.html" title="A PreparedStatement represent a single SQL statement pre-compiled into byte code...">PreparedStatement.h</a> <p>
<a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="f5287b68722604015d3e7f82b0b139ee"></a><!-- doxytag: member="Connection.h::Connection_getLastError" ref="f5287b68722604015d3e7f82b0b139ee" args="(T C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* Connection_getLastError           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>C</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method can be used to obtain a string describing the last error that occurred. 
<p>
Inside a CATCH-block you can also find the error message directly in the variable Exception_frame.message <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>A Connection object </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A string explaining the last error </dd></dl>

</div>
</div><p>
<a class="anchor" name="518c866ed09a2520fd43d153bebc2e8d"></a><!-- doxytag: member="Connection.h::Connection_isSupported" ref="518c866ed09a2520fd43d153bebc2e8d" args="(const char *url)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Connection_isSupported           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>url</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Class method</b>, test if the specified database system is supported by this library. 
<p>
Clients may pass a full Connection URL, for example using <a class="el" href="URL_8h.html#63f81fa482efdabd205cf78e4e98a2dc" title="Return a string representation of this URL object.">URL_toString()</a>, or for convenience only the protocol part of the URL. E.g. "mysql" or "sqlite". <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>url</em>&nbsp;</td><td>A database url string </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if supported otherwise false </dd></dl>

</div>
</div><p>
</div>
<p style="text-align:center;color:#808080;font-size:90%;margin:40px 0 20px 0;">
Copyright &copy; 2004-2011 <a href="http://tildeslash.com/">Tildeslash Ltd</a>. All
rights reserved.</p>
</body></html>