|
|
| version 1.34.2.4.2.2, 2003/03/21 16:39:06 | version 1.35, 2003/07/24 11:31:24 |
|---|---|
| Line 32 static const char* IDENT_SQL_DRIVER_H="$ | Line 32 static const char* IDENT_SQL_DRIVER_H="$ |
| #include <setjmp.h> | #include <setjmp.h> |
| #include <stdlib.h> | #include <stdlib.h> |
| #define SQL_DRIVER_API_VERSION 0x0006 | #define SQL_DRIVER_API_VERSION 0x0007 |
| #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 93 public: | Line 93 public: |
| */ | */ |
| class SQL_Driver_query_event_handlers { | class SQL_Driver_query_event_handlers { |
| public: | public: |
| virtual bool add_column(SQL_Error& error, void *ptr, size_t size) =0; | virtual bool add_column(SQL_Error& error, const char* str, size_t length) =0; |
| virtual bool before_rows(SQL_Error& error) =0; | virtual bool before_rows(SQL_Error& error) =0; |
| virtual bool add_row(SQL_Error& error) =0; | virtual bool add_row(SQL_Error& error) =0; |
| virtual bool add_row_cell(SQL_Error& error, void *ptr, size_t size) =0; | virtual bool add_row_cell(SQL_Error& error, const char* str, size_t length) =0; |
| }; | }; |
| /// SQL driver API | /// SQL driver API |
| Line 134 public: | Line 134 public: |
| /// @returns true to indicate that connection still alive | /// @returns true to indicate that connection still alive |
| virtual bool ping( | virtual bool ping( |
| SQL_Driver_services& services, void *connection) =0; | 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 | /// encodes the string in 'from' to an escaped SQL string |
| virtual Quote_result quote( | virtual const char* quote( |
| SQL_Driver_services& services, 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( |