--- parser3/src/main/pa_sql_driver_manager.C 2003/01/27 16:00:42 1.69.2.1 +++ parser3/src/main/pa_sql_driver_manager.C 2003/04/11 15:00:05 1.70 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_SQL_DRIVER_MANAGER_C="$Date: 2003/01/27 16:00:42 $"; +static const char* IDENT_SQL_DRIVER_MANAGER_C="$Date: 2003/04/11 15:00:05 $"; #include "pa_sql_driver_manager.h" #include "ltdl.h" @@ -19,7 +19,7 @@ static const char* IDENT_SQL_DRIVER_MANA // globals -SQL_Driver_manager SQL_driver_manager; +SQL_Driver_manager *SQL_driver_manager; // consts @@ -104,8 +104,10 @@ static void expire_connections(const Has // SQL_Driver_manager -SQL_Driver_manager::SQL_Driver_manager(): - prev_expiration_pass_time(0) { +SQL_Driver_manager::SQL_Driver_manager(Pool& apool) : Cache_manager(apool), + driver_cache(apool), + connection_cache(apool), + prev_expiration_pass_time(0) { } SQL_Driver_manager::~SQL_Driver_manager() { @@ -114,7 +116,7 @@ SQL_Driver_manager::~SQL_Driver_manager( } /// @param request_url protocol://[driver-dependent] -SQL_ConnectionPtr SQL_Driver_manager::get_connection(const String& request_url, +SQL_Connection_ptr SQL_Driver_manager::get_connection(const String& request_url, const String& request_origin, Table *protocol2driver_and_client) { Pool& pool=request_origin.pool(); // request pool @@ -172,7 +174,8 @@ SQL_ConnectionPtr SQL_Driver_manager::ge // no cached const String *library=0; const String *dlopen_file_spec=0; - if(protocol2driver_and_client->locate(0, global_protocol)) { + Table::Action_options options; + if(protocol2driver_and_client->locate(0, global_protocol, options)) { if(!(library=protocol2driver_and_client->item(1)) || library->size()==0) throw Exception("parser.runtime", protocol2driver_and_client->origin_string(), @@ -243,7 +246,7 @@ SQL_ConnectionPtr SQL_Driver_manager::ge if(!connection->connected()) connection->connect(request_url_cstr); // return autoclosing object for it - return SQL_ConnectionPtr(connection); + return SQL_Connection_ptr(connection); } void SQL_Driver_manager::close_connection(const String& url,