|
|
| version 1.35, 2003/07/24 11:31:24 | version 1.37, 2003/12/22 11:44:36 |
|---|---|
| Line 26 | Line 26 |
| #ifndef PA_SQL_DRIVER_H | #ifndef PA_SQL_DRIVER_H |
| #define PA_SQL_DRIVER_H | #define PA_SQL_DRIVER_H |
| static const char* IDENT_SQL_DRIVER_H="$Date$"; | static const char * const IDENT_SQL_DRIVER_H="$Date$"; |
| #include <sys/types.h> | #include <sys/types.h> |
| #include <setjmp.h> | #include <setjmp.h> |
| #include <stdlib.h> | #include <stdlib.h> |
| #define SQL_DRIVER_API_VERSION 0x0007 | #define SQL_DRIVER_API_VERSION 0x0008 |
| #define SQL_DRIVER_CREATE create /* used in driver implementation */ | #define SQL_DRIVER_CREATE create /* used in driver implementation */ |
| #define SQL_DRIVER_CREATE_NAME "create" /* could not figure out how to # it :( */ | #define SQL_DRIVER_CREATE_NAME "create" /* could not figure out how to # it :( */ |
| Line 75 public: | Line 75 public: |
| virtual void *malloc_atomic(size_t size) =0; | virtual void *malloc_atomic(size_t size) =0; |
| /// reallocates bytes | /// reallocates bytes |
| virtual void *realloc(void *ptr, size_t size) =0; | virtual void *realloc(void *ptr, size_t size) =0; |
| /// $request:charset | |
| virtual const char* request_charset() =0; | |
| /// transcoder | |
| virtual void transcode(const char* src, size_t src_length, | |
| const char*& dst, size_t& dst_length, | |
| const char* charset_from_name, | |
| const char* charset_to_name | |
| ) =0; | |
| /// prepare throw exception | /// prepare throw exception |
| virtual void _throw(const SQL_Error& e) =0; | virtual void _throw(const SQL_Error& e) =0; |
| /// throw C++ exception from prepared | /// throw C++ exception from prepared |
| Line 127 public: | Line 135 public: |
| virtual void connect(char *used_only_in_connect_url_cstr, | virtual void connect(char *used_only_in_connect_url_cstr, |
| SQL_Driver_services& services, void **connection) =0; | SQL_Driver_services& services, void **connection) =0; |
| virtual void disconnect(void *connection) =0; | virtual void disconnect(void *connection) =0; |
| virtual void commit( | virtual void commit(void *connection) =0; |
| SQL_Driver_services& services, void *connection) =0; | virtual void rollback(void *connection) =0; |
| virtual void rollback( | |
| SQL_Driver_services& services, void *connection) =0; | |
| /// @returns true to indicate that connection still alive | /// @returns true to indicate that connection still alive |
| virtual bool ping( | virtual bool ping(void *connection) =0; |
| SQL_Driver_services& services, void *connection) =0; | |
| /// encodes the string in 'from' to an escaped SQL string | /// encodes the string in 'from' to an escaped SQL string |
| virtual const char* quote( | virtual const char* quote(void *connection, |
| SQL_Driver_services& services, void *connection, | |
| const char* str, unsigned int length) =0; | const char* str, unsigned int length) =0; |
| virtual void query( | virtual void query(void *connection, |
| SQL_Driver_services& services, void *connection, | |
| const char* statement, unsigned long offset, unsigned long limit, | const char* statement, unsigned long offset, unsigned long limit, |
| SQL_Driver_query_event_handlers& handlers) =0; | SQL_Driver_query_event_handlers& handlers) =0; |
| }; | }; |