--- parser3/src/sql/pa_sql_driver.h 2003/03/20 08:11:15 1.34.2.4.2.1 +++ parser3/src/sql/pa_sql_driver.h 2003/03/25 13:58:38 1.34.2.4.2.3 @@ -26,9 +26,11 @@ #ifndef PA_SQL_DRIVER_H #define PA_SQL_DRIVER_H -static const char* IDENT_SQL_DRIVER_H="$Date: 2003/03/20 08:11:15 $"; +static const char* IDENT_SQL_DRIVER_H="$Date: 2003/03/25 13:58:38 $"; #include +#include +#include #define SQL_DRIVER_API_VERSION 0x0006 #define SQL_DRIVER_CREATE create /* used in driver implementation */ @@ -69,8 +71,8 @@ class SQL_Driver_services { public: /// allocates some bytes virtual void *malloc(size_t size) =0; - /// allocates some bytes clearing them with zeros - virtual void *calloc(size_t size) =0; + /// allocates some bytes, user promises: no pointers inside + virtual void *malloc_atomic(size_t size) =0; /// reallocates bytes virtual void *realloc(void *ptr, size_t size) =0; /// prepare throw exception @@ -132,14 +134,10 @@ 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 Quote_result quote( + virtual const char* quote( SQL_Driver_services& services, void *connection, - const char* from, unsigned int length) =0; + const char* str, unsigned int length) =0; virtual void query( SQL_Driver_services& services, void *connection, const char* statement, unsigned long offset, unsigned long limit,