apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r321121 - in /apr/apr-util/trunk: dbd/apr_dbd.c dbd/apr_dbd_pgsql.c dbd/apr_dbd_sqlite2.c dbd/apr_dbd_sqlite3.c include/apr_dbd.h include/private/apr_dbd_internal.h
Date Fri, 14 Oct 2005 13:57:47 GMT
Author: niq
Date: Fri Oct 14 06:57:41 2005
New Revision: 321121

URL: http://svn.apache.org/viewcvs?rev=321121&view=rev
Log:
Add reset function (TBImpl) to apr_dbd API

Modified:
    apr/apr-util/trunk/dbd/apr_dbd.c
    apr/apr-util/trunk/dbd/apr_dbd_pgsql.c
    apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c
    apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c
    apr/apr-util/trunk/include/apr_dbd.h
    apr/apr-util/trunk/include/private/apr_dbd_internal.h

Modified: apr/apr-util/trunk/dbd/apr_dbd.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/dbd/apr_dbd.c?rev=321121&r1=321120&r2=321121&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd.c Fri Oct 14 06:57:41 2005
@@ -189,6 +189,11 @@
     return driver->end_transaction(trans);
 }
 
+APU_DECLARE(apr_status_t) apr_dbd_reset(const apr_dbd_driver_t *driver,
+                                        apr_dbd_t *handle)
+{
+    return driver->reset(handle);
+}
 APU_DECLARE(apr_status_t) apr_dbd_close(const apr_dbd_driver_t *driver,
                                         apr_dbd_t *handle)
 {

Modified: apr/apr-util/trunk/dbd/apr_dbd_pgsql.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/dbd/apr_dbd_pgsql.c?rev=321121&r1=321120&r2=321121&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_pgsql.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_pgsql.c Fri Oct 14 06:57:41 2005
@@ -611,6 +611,10 @@
         return -1;
     }
 }
+static apr_status_t dbd_pgsql_reset(apr_dbd_t *handle)
+{
+    return APR_ENOTIMPL;
+}
 
 APU_DECLARE_DATA const apr_dbd_driver_t apr_dbd_pgsql_driver = {
     "pgsql",
@@ -635,5 +639,6 @@
     dbd_pgsql_pvselect,
     dbd_pgsql_pquery,
     dbd_pgsql_pselect,
+    dbd_pgsql_reset,
 };
 #endif

Modified: apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c?rev=321121&r1=321120&r2=321121&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c Fri Oct 14 06:57:41 2005
@@ -359,6 +359,10 @@
 {
     return res->ntuples;
 }
+static apr_status_t dbd_sqlite_reset(apr_dbd_t *handle)
+{
+    return APR_ENOTIMPL;
+}
 
 APU_DECLARE_DATA const apr_dbd_driver_t apr_dbd_sqlite2_driver = {
     "sqlite2",
@@ -383,5 +387,6 @@
     dbd_sqlite_pvselect,
     dbd_sqlite_pquery,
     dbd_sqlite_pselect,
+    dbd_sqlite_reset,
 };
 #endif

Modified: apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c?rev=321121&r1=321120&r2=321121&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c Fri Oct 14 06:57:41 2005
@@ -400,6 +400,10 @@
 {
     return res->tuples;
 }
+static apr_status_t dbd_sqlite3_reset(apr_dbd_t *handle)
+{
+    return APR_ENOTIMPL;
+}
 
 APU_DECLARE_DATA const apr_dbd_driver_t apr_dbd_sqlite3_driver = {
     "sqlite3",
@@ -424,5 +428,6 @@
     dbd_sqlite3_pvselect,
     dbd_sqlite3_pquery,
     dbd_sqlite3_pselect,
+    dbd_sqlite3_reset,
 };
 #endif

Modified: apr/apr-util/trunk/include/apr_dbd.h
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/include/apr_dbd.h?rev=321121&r1=321120&r2=321121&view=diff
==============================================================================
--- apr/apr-util/trunk/include/apr_dbd.h (original)
+++ apr/apr-util/trunk/include/apr_dbd.h Fri Oct 14 06:57:41 2005
@@ -65,6 +65,16 @@
                                        apr_pool_t *ptmp, const char *params,
                                        apr_dbd_t **handle);
 
+/** apr_dbd_reset: reset a connection to a backend.
+ *  Clear a persistent connection for re-use
+ *
+ *  @param handle - handle to close
+ *  @param driver - driver struct.
+ *  @return APR_SUCCESS for success or error status
+ */
+APU_DECLARE(apr_status_t) apr_dbd_reset(const apr_dbd_driver_t *driver,
+                                        apr_dbd_t *handle);
+
 /** apr_dbd_close: close a connection to a backend.
  *  Only required for explicit close or
  *

Modified: apr/apr-util/trunk/include/private/apr_dbd_internal.h
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/include/private/apr_dbd_internal.h?rev=321121&r1=321120&r2=321121&view=diff
==============================================================================
--- apr/apr-util/trunk/include/private/apr_dbd_internal.h (original)
+++ apr/apr-util/trunk/include/private/apr_dbd_internal.h Fri Oct 14 06:57:41 2005
@@ -246,6 +246,12 @@
                    apr_dbd_results_t **res, apr_dbd_prepared_t *statement,
                    int random, int nargs, const char **args);
 
+    /** reset: reset a persistent connection for re-use
+     *
+     *  @param handle - the connection to reset
+     *  @return APR_SUCCESS or error
+     */
+    apr_status_t (*reset)(apr_dbd_t *handle);
 
 };
 



Mime
View raw message