--- parser3/src/include/pa_sql_connection.h 2001/04/05 13:19:41 1.4 +++ parser3/src/include/pa_sql_connection.h 2001/05/17 12:51:05 1.8 @@ -5,12 +5,13 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_sql_connection.h,v 1.4 2001/04/05 13:19:41 paf Exp $ + $Id: pa_sql_connection.h,v 1.8 2001/05/17 12:51:05 parser Exp $ */ #ifndef PA_SQL_CONNECTION_H #define PA_SQL_CONNECTION_H +#include "pa_config_includes.h" #include "pa_pool.h" #include "pa_sql_driver.h" #include "pa_sql_driver_manager.h" @@ -20,24 +21,21 @@ class SQL_Connection : public Pooled { public: - void set_services(Services_for_SQL_driver *services) { + void set_services(SQL_Driver_services *services) { fdriver.set_services(services); } SQL_Connection(Pool& pool, const String& aurl, - SQL_Driver& adriver, Services_for_SQL_driver& services, - char *url_cstr) : Pooled(pool), + SQL_Driver& adriver, + char *used_only_in_constructor_url_cstr) : Pooled(pool), furl(aurl), fdriver(adriver) { - - set_services(&services); // associate with services[request] - fdriver.connect(url_cstr, &connection); + fdriver.connect(used_only_in_constructor_url_cstr, &connection); } - void close() { - set_services(0); // deassociate from services[request] - SQL_driver_manager->close_connection(furl, *this); + void close(Pool& pool) { + SQL_driver_manager->close_connection(furl, *this, pool); } void disconnect() { fdriver.disconnect(connection); }