--- parser3/src/include/pa_sql_connection.h 2003/01/27 17:17:06 1.30.2.3 +++ parser3/src/include/pa_sql_connection.h 2003/01/31 12:34:31 1.30.2.6 @@ -1,14 +1,14 @@ /** @file Parser: sql fconnection decl. - Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_SQL_CONNECTION_H #define PA_SQL_CONNECTION_H -static const char* IDENT_SQL_CONNECTION_H="$Date: 2003/01/27 17:17:06 $"; +static const char* IDENT_SQL_CONNECTION_H="$Date: 2003/01/31 12:34:31 $"; #include "pa_pool.h" #include "pa_sql_driver.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; - ConstStringPtr furl; + StringPtr furl; Exception fexception; public: SQL_Driver_services_impl(): fpool(0), furl(0) {} - void set_pool_and_url(Pool *apool, ConstStringPtr aurl) { fpool=apool; furl=aurl;} + void set_pool_and_url(Pool *apool, StringPtr 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: - ConstStringPtr url_without_login() const; + StringPtr url_without_login() const; }; /// SQL connection. handy wrapper around low level SQL_Driver class SQL_Connection: public PA_Object { - ConstStringPtr furl; + StringPtr furl; SQL_Driver& fdriver; SQL_Driver_services_impl fservices; void *fconnection; @@ -87,7 +87,7 @@ class SQL_Connection: public PA_Object { public: - SQL_Connection(ConstStringPtr aurl, SQL_Driver& adriver): + SQL_Connection(StringPtr aurl, SQL_Driver& adriver): furl(aurl), fdriver(adriver), fconnection(0), @@ -95,10 +95,10 @@ public: marked_to_rollback(false) { } - ConstStringPtr get_url() { return furl; } + StringPtr get_url() { return furl; } void set_pool(Pool *pool) { - fservices.set_pool_and_url(pool, pool?furl:ConstStringPtrZero); + fservices.set_pool_and_url(pool, pool?furl:StringPtr(0)); } bool expired(time_t older_dies) { return /*!freferences && */time_used