--- parser3/src/sql/pa_sql_driver.h 2003/02/17 17:05:03 1.34.2.3 +++ parser3/src/sql/pa_sql_driver.h 2003/03/20 08:11:15 1.34.2.4.2.1 @@ -26,7 +26,7 @@ #ifndef PA_SQL_DRIVER_H #define PA_SQL_DRIVER_H -static const char* IDENT_SQL_DRIVER_H="$Date: 2003/02/17 17:05:03 $"; +static const char* IDENT_SQL_DRIVER_H="$Date: 2003/03/20 08:11:15 $"; #include @@ -101,6 +101,16 @@ public: class SQL_Driver { public: + /** allocated using our allocator, + @todo never freed + */ + static void *operator new(size_t size) { + void *result=::malloc(size); + if(!result) + abort(); + + return result; + } /// get api version virtual int api_version() =0; /// initialize driver by loading sql dynamic link library @@ -122,10 +132,14 @@ public: /// @returns true to indicate that connection still alive virtual bool ping( SQL_Driver_services& services, void *connection) =0; + struct Quote_result { + char *s; + size_t size; + }; /// encodes the string in 'from' to an escaped SQL string - virtual unsigned int quote( + virtual Quote_result quote( SQL_Driver_services& services, void *connection, - char *to, const char* from, unsigned int length) =0; + const char* from, unsigned int length) =0; virtual void query( SQL_Driver_services& services, void *connection, const char* statement, unsigned long offset, unsigned long limit,