|
|
| version 1.18, 2001/11/08 14:47:31 | version 1.26, 2003/01/21 15:51:11 |
|---|---|
| Line 2 | Line 2 |
| Parser: sql driver manager decl. | Parser: sql driver manager decl. |
| global sql driver manager, must be thread-safe | global sql driver manager, must be thread-safe |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| $Id$ | |
| */ | */ |
| #ifndef PA_SQL_DRIVER_MANAGER_H | #ifndef PA_SQL_DRIVER_MANAGER_H |
| #define PA_SQL_DRIVER_MANAGER_H | #define PA_SQL_DRIVER_MANAGER_H |
| #include "pa_config_includes.h" | static const char* IDENT_SQL_DRIVER_MANAGER_H="$Date$"; |
| #include "pa_pool.h" | #include "pa_pool.h" |
| #include "pa_sql_driver.h" | #include "pa_sql_driver.h" |
| #include "pa_hash.h" | #include "pa_hash.h" |
| Line 27 | Line 26 |
| // forwards | // forwards |
| class SQL_Connection; | class SQL_Connection; |
| class SQL_Connection_ptr; | |
| /// sql driver manager | /// sql driver manager |
| class SQL_Driver_manager : public Cache_manager { | class SQL_Driver_manager : public Cache_manager { |
| Line 34 class SQL_Driver_manager : public Cache_ | Line 34 class SQL_Driver_manager : public Cache_ |
| public: | public: |
| SQL_Driver_manager(Pool& apool); | SQL_Driver_manager(Pool& apool); |
| ~SQL_Driver_manager(); | virtual ~SQL_Driver_manager(); |
| /** | /** |
| connect to specified url, | connect to specified url, |
| using driver dynamic library found in table, if not loaded yet | using driver dynamic library found in table, if not loaded yet |
| checks driver version | checks driver version |
| */ | */ |
| SQL_Connection& get_connection(const String& url, const String& request_origin, | SQL_Connection_ptr get_connection(const String& url, const String& request_origin, |
| Table *protocol2driver_and_client); | Table *protocol2driver_and_client); |
| private: // driver cache | private: // driver cache |