Diff for /parser3/src/include/pa_sql_connection.h between versions 1.16 and 1.18

version 1.16, 2001/10/29 17:34:24 version 1.18, 2001/11/05 10:21:26
Line 18 Line 18
 // defines  // defines
   
 /// @see SQL_Driver_services_impl::_throw  /// @see SQL_Driver_services_impl::_throw
 #define SQL_CONNECTION_FUNC_GUARDED(actions) \  #define SQL_CONNECTION_SERVICED_FUNC_GUARDED(actions) \
         if(!fservices || !setjmp(fservices->mark)) { \          if(!fservices || !setjmp(fservices->mark)) { \
                 actions; \                  actions; \
         } else \          } else \
Line 36  public: Line 36  public:
                 time_stamp(0) {                  time_stamp(0) {
         }          }
                   
         const String& url() { return furl; }          const String& get_url() { return furl; }
   
         void set_services(SQL_Driver_services *aservices) {          void set_services(SQL_Driver_services *aservices) {
                 time_stamp=time(0); // they started to use at this time                  time_stamp=time(0); // they started to use at this time
Line 45  public: Line 45  public:
         bool expired(time_t older_dies) {          bool expired(time_t older_dies) {
                 return time_stamp<older_dies;                  return time_stamp<older_dies;
         }          }
           time_t get_time_stamp() { return time_stamp; }
   
         void close() {          void close() {
                 SQL_driver_manager->close_connection(furl, *this);                  SQL_driver_manager->close_connection(furl, *this);
Line 52  public: Line 53  public:
   
         bool connected() { return fconnection!=0; }          bool connected() { return fconnection!=0; }
         void connect(char *used_only_in_connect_url_cstr) {           void connect(char *used_only_in_connect_url_cstr) { 
                 SQL_CONNECTION_FUNC_GUARDED(                  SQL_CONNECTION_SERVICED_FUNC_GUARDED(
                         fdriver.connect(used_only_in_connect_url_cstr, *fservices, &fconnection)                          fdriver.connect(used_only_in_connect_url_cstr, *fservices, &fconnection)
                 );                  );
         }          }
Line 60  public: Line 61  public:
                 fdriver.disconnect(fconnection); fconnection=0;                   fdriver.disconnect(fconnection); fconnection=0; 
         }          }
         void commit() {           void commit() { 
                 SQL_CONNECTION_FUNC_GUARDED(                  SQL_CONNECTION_SERVICED_FUNC_GUARDED(
                         fdriver.commit(*fservices, fconnection)                           fdriver.commit(*fservices, fconnection) 
                 );                  );
         }          }
         void rollback() {           void rollback() { 
                 SQL_CONNECTION_FUNC_GUARDED(                  SQL_CONNECTION_SERVICED_FUNC_GUARDED(
                         fdriver.rollback(*fservices, fconnection)                          fdriver.rollback(*fservices, fconnection)
                 );                  );
         }          }
         bool ping() {           bool ping() { 
                 SQL_CONNECTION_FUNC_GUARDED(                  SQL_CONNECTION_SERVICED_FUNC_GUARDED(
                         return fdriver.ping(*fservices, fconnection)                          return fdriver.ping(*fservices, fconnection)
                 );                  );
                 return 0; // never reached                  return 0; // never reached
         }          }
         uint quote(char *to, const char *from, unsigned int length) {          uint quote(char *to, const char *from, unsigned int length) {
                 SQL_CONNECTION_FUNC_GUARDED(                  SQL_CONNECTION_SERVICED_FUNC_GUARDED(
                         return fdriver.quote(*fservices, fconnection, to, from, length)                          return fdriver.quote(*fservices, fconnection, to, from, length)
                 );                  );
                 return 0; // never reached                  return 0; // never reached
Line 85  public: Line 86  public:
         void query(          void query(
                 const char *statement, unsigned long offset, unsigned long limit,                  const char *statement, unsigned long offset, unsigned long limit,
                 SQL_Driver_query_event_handlers& handlers) {                   SQL_Driver_query_event_handlers& handlers) { 
                 SQL_CONNECTION_FUNC_GUARDED(                  SQL_CONNECTION_SERVICED_FUNC_GUARDED(
                         fdriver.query(*fservices, fconnection,                           fdriver.query(*fservices, fconnection, 
                                 statement, offset, limit,                                   statement, offset, limit, 
                                 handlers)                                  handlers)

Removed from v.1.16  
changed lines
  Added in v.1.18


E-mail: