|
|
| version 1.2, 2001/04/05 11:01:55 | version 1.4, 2001/04/05 13:19:41 |
|---|---|
| Line 13 | Line 13 |
| #include "pa_pool.h" | #include "pa_pool.h" |
| #include "pa_sql_driver.h" | #include "pa_sql_driver.h" |
| #include "pa_exception.h" | #include "pa_sql_driver_manager.h" |
| /// sql connection | /// SQL connection. handy wrapper around low level SQL_Driver |
| class SQL_Connection : public Pooled { | class SQL_Connection : public Pooled { |
| public: | public: |
| Line 43 public: | Line 43 public: |
| void disconnect() { fdriver.disconnect(connection); } | void disconnect() { fdriver.disconnect(connection); } |
| void commit() { fdriver.commit(connection); } | void commit() { fdriver.commit(connection); } |
| void rollback() { fdriver.rollback(connection); } | void rollback() { fdriver.rollback(connection); } |
| bool ping() { return fdriver.ping(connection); } | |
| uint quote(char *to, const char *from, unsigned int length) { | |
| return fdriver.quote(connection, to, from, length); | |
| } | |
| void query( | void query( |
| const char *statement, | const char *statement, unsigned long offset, unsigned long limit, |
| unsigned int *column_count, SQL_Driver::Cell **columns, | unsigned int *column_count, SQL_Driver::Cell **columns, |
| unsigned long *row_count, SQL_Driver::Cell ***rows) { | unsigned long *row_count, SQL_Driver::Cell ***rows) { |
| fdriver.query(connection, | fdriver.query(connection, |
| statement, | statement, offset, limit, |
| column_count, columns, | column_count, columns, |
| row_count, rows); | row_count, rows); |
| } | } |