--- parser3/src/include/pa_sql_connection.h 2003/11/20 15:35:30 1.32 +++ parser3/src/include/pa_sql_connection.h 2003/12/10 14:54:53 1.35 @@ -8,7 +8,7 @@ #ifndef PA_SQL_CONNECTION_H #define PA_SQL_CONNECTION_H -static const char* IDENT_SQL_CONNECTION_H="$Date: 2003/11/20 15:35:30 $"; +static const char * const IDENT_SQL_CONNECTION_H="$Date: 2003/12/10 14:54:53 $"; #include "pa_sql_driver.h" @@ -18,9 +18,12 @@ static const char* IDENT_SQL_CONNECTION_ /// @see SQL_Driver_services_impl::_throw #ifdef PA_WITH_SJLJ_EXCEPTIONS - #define SQL_CONNECTION_SERVICED_FUNC_GUARDED(actions) actions + #define SQL_CONNECTION_SERVICED_FUNC_GUARDED(actions) \ + use(); \ + actions #else #define SQL_CONNECTION_SERVICED_FUNC_GUARDED(actions) \ + use(); \ if(!setjmp(fservices.mark)) { \ actions; \ } else \ @@ -34,6 +37,7 @@ class SQL_Driver_services_impl: public S public: SQL_Driver_services_impl(): furl(0) {} void set_url(const String& aurl) { furl=&aurl;} + const String& url_without_login() const; override void *malloc(size_t size) { return pa_malloc(size); } override void *malloc_atomic(size_t size) { return pa_malloc_atomic(size); } @@ -70,9 +74,6 @@ public: throw fexception; #endif } - -private: - const String& url_without_login() const; }; /// SQL connection. handy wrapper around low level SQL_Driver @@ -93,6 +94,8 @@ public: time_used(0), marked_to_rollback(false) { } + + SQL_Driver_services_impl& services() { return fservices; } const String& get_url() { return furl; } @@ -103,7 +106,7 @@ public: time_used=time(0); // they started to use at this time } bool expired(time_t older_dies) { - return /*!freferences && */time_used