--- parser3/src/include/pa_sql_connection.h 2003/01/31 14:03:53 1.30.2.7 +++ parser3/src/include/pa_sql_connection.h 2003/03/20 08:11:13 1.30.2.7.2.2 @@ -8,9 +8,9 @@ #ifndef PA_SQL_CONNECTION_H #define PA_SQL_CONNECTION_H -static const char* IDENT_SQL_CONNECTION_H="$Date: 2003/01/31 14:03:53 $"; +static const char* IDENT_SQL_CONNECTION_H="$Date: 2003/03/20 08:11:13 $"; + -#include "pa_pool.h" #include "pa_sql_driver.h" #include "pa_sql_driver_manager.h" @@ -30,11 +30,11 @@ static const char* IDENT_SQL_CONNECTION_ /// SQL_Driver_services Pooled implementation class SQL_Driver_services_impl: public SQL_Driver_services { Pool *fpool; - StringPtr furl; + const String& furl; Exception fexception; public: SQL_Driver_services_impl(): fpool(0), furl(0) {} - void set_pool_and_url(Pool *apool, StringPtr aurl) { fpool=apool; furl=aurl;} + void set_pool_and_url(Pool *const String& aurl) { fpool=apool; furl=aurl;} override void *malloc(size_t size) { return fpool->malloc(size); } override void *calloc(size_t size) { return fpool->calloc(size); } @@ -73,12 +73,12 @@ public: } private: - StringPtr url_without_login() const; + const String& url_without_login() const; }; /// SQL connection. handy wrapper around low level SQL_Driver class SQL_Connection: public PA_Object { - StringPtr furl; + const String& furl; SQL_Driver& fdriver; SQL_Driver_services_impl fservices; void *fconnection; @@ -87,7 +87,7 @@ class SQL_Connection: public PA_Object { public: - SQL_Connection(StringPtr aurl, SQL_Driver& adriver): + SQL_Connection(const String& aurl, SQL_Driver& adriver): furl(aurl), fdriver(adriver), fconnection(0), @@ -95,10 +95,10 @@ public: marked_to_rollback(false) { } - StringPtr get_url() { return furl; } + const String& get_url() { return furl; } - void set_pool(Pool *pool) { - fservices.set_pool_and_url(pool, pool?furl:StringPtr(0)); + void set_pool() { + fservices.set_pool_and_url(pool?furl:0); } bool expired(time_t older_dies) { return /*!freferences && */time_used