--- parser3/src/sql/pa_sql_driver.h 2003/03/11 14:58:33 1.34.2.4 +++ parser3/src/sql/pa_sql_driver.h 2003/03/21 16:39:06 1.34.2.4.2.2 @@ -26,9 +26,11 @@ #ifndef PA_SQL_DRIVER_H #define PA_SQL_DRIVER_H -static const char* IDENT_SQL_DRIVER_H="$Date: 2003/03/11 14:58:33 $"; +static const char* IDENT_SQL_DRIVER_H="$Date: 2003/03/21 16:39:06 $"; #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,10 +134,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* str, unsigned int length) =0; virtual void query( SQL_Driver_services& services, void *connection, const char* statement, unsigned long offset, unsigned long limit,