Diff for /parser3/src/main/pa_sql_driver_manager.C between versions 1.34 and 1.40

version 1.34, 2001/09/14 15:41:59 version 1.40, 2001/10/15 11:48:04
Line 2 Line 2
         Parser: sql driver manager implementation.          Parser: sql driver manager implementation.
   
         Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)          Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
   
         Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)          Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
   
           $Id$
 */  */
 static const char *RCSId="$Id$";   
   
 #include "pa_sql_driver_manager.h"  #include "pa_sql_driver_manager.h"
 #include "ltdl.h"  #include "ltdl.h"
Line 14  static const char *RCSId="$Id$"; Line 14  static const char *RCSId="$Id$";
 #include "pa_common.h"  #include "pa_common.h"
 #include "pa_threads.h"  #include "pa_threads.h"
   
 //#include "pa_sapi.h"  
   
 // globals  // globals
   
 SQL_Driver_manager *SQL_driver_manager;  SQL_Driver_manager *SQL_driver_manager;
Line 37  public: Line 35  public:
         void *malloc(size_t size) { return Pooled::malloc(size); }          void *malloc(size_t size) { return Pooled::malloc(size); }
         /// allocates some bytes clearing them with zeros          /// allocates some bytes clearing them with zeros
         void *calloc(size_t size) { return Pooled::calloc(size); }          void *calloc(size_t size) { return Pooled::calloc(size); }
   
         /// throw exception          /// throw exception
         void _throw(const char *comment) {           void _throw(const char *comment) { 
                 THROW(0, 0,                   THROW(0, 0, 
Line 51  private: Line 50  private:
 // SQL_Driver_manager  // SQL_Driver_manager
   
 /// @param request_url protocol://[driver-dependent]  /// @param request_url protocol://[driver-dependent]
 SQL_Connection& SQL_Driver_manager::get_connection(const String& request_url,   SQL_Connection& SQL_Driver_manager::get_connection(const String& request_url,
                                                                                                      const String& request_origin,
                                                                                                    Table *protocol2driver_and_client) {                                                                                                     Table *protocol2driver_and_client) {
         Pool& pool=request_url.pool(); // request pool                                                                                               Pool& pool=request_origin.pool(); // request pool                                                                                          
   
         // we have table for locating protocol's library          // we have table for locating protocol's library
         if(!protocol2driver_and_client)          if(!protocol2driver_and_client)
Line 75  SQL_Connection& SQL_Driver_manager::get_ Line 75  SQL_Connection& SQL_Driver_manager::get_
                 int pos=request_url.pos("://", 3);                  int pos=request_url.pos("://", 3);
                 if(pos<0)                  if(pos<0)
                         PTHROW(0, 0,                          PTHROW(0, 0,
                                 &request_url,                                  request_url.size()?&request_url:&request_origin,
                                 "no protocol specified"); // NOTE: not THROW, but PTHROW                                  "connection string must start with protocol://"); // NOTE: not THROW, but PTHROW
   
                 // make global_url C-string on global pool                  // make global_url C-string on global pool
                 request_url_cstr=request_url.cstr(String::UL_AS_IS);                  request_url_cstr=request_url.cstr(String::UL_AS_IS);

Removed from v.1.34  
changed lines
  Added in v.1.40


E-mail: