#include <mysqldb.h>
Inheritance diagram for Dv::MySql::Command_:
Private Member Functions | |
Command_ (Db &db, Sql::Command &cmd) | |
virtual | ~Command_ () |
Destructor, virtual because it will be subclassed. | |
bool | check_error () |
Return true iff all is well. | |
void | sync (unsigned int r) throw (Sql::Exception) |
Synchronize mrow_ cursor to point to row # r. | |
int | error () const |
Return error code. | |
Db & | db () |
Return MySql::Db connection of this command. | |
bool | exec () throw (Sql::Exception) |
Execute current command. | |
void | fetch (std::vector< std::string > &, unsigned int r) throw (Sql::Exception) |
Fetch r'th row from query result. | |
void | fetch (std::string &, unsigned int r, unsigned int c) throw (Sql::Exception) |
Fetch c'th element in r'th row of query result. | |
void | escape (const std::string &) |
Write quoted and escaped version of parameter to textstream(). | |
const std::vector< Sql::Field > & | fields () |
Return field description corresponding to query result. | |
unsigned int | insertid () const |
Return auto_increment insertid of last query. | |
Private Attributes | |
Db & | db_ |
void * | result_ |
Stored result of query, opaque declaration, really MYSQL_RES*. | |
int | row_ |
Current row# [0..] of mrow_, -1 if none. | |
unsigned long * | lengths_ |
Lengths of fields [0..ncols()] in current row. | |
void * | mrow_ |
Buffer corresponding to row_; opaque declaration, really MYSQL_ROW. | |
int | errno_ |
Error code, 0 if ok. | |
std::vector< Sql::Field > | fields_ |
Field list of the query result, filled on demand. | |
Friends | |
class | Db |
Only Db can e.g. construct a Command_. |
Definition at line 125 of file mysqldb.h.
|
|
|
Destructor, virtual because it will be subclassed.
Reimplemented from Dv::Sql::Command_. |
|
Return true iff all is well.
|
|
Synchronize mrow_ cursor to point to row # r.
|
|
Return error code.
Definition at line 153 of file mysqldb.h. References errno_. |
|
Return MySql::Db connection of this command.
Implements Dv::Sql::Command_. Definition at line 155 of file mysqldb.h. References db_. |
|
Execute current command. Part of Sql::Command_ required interface. Implements Dv::Sql::Command_. |
|
Fetch r'th row from query result. Part of Sql::Command_ required interface. Implements Dv::Sql::Command_. |
|
Fetch c'th element in r'th row of query result. Part of Sql::Command_ required interface. Reimplemented from Dv::Sql::Command_. |
|
Write quoted and escaped version of parameter to textstream(). Part of Sql::Command_ required interface. Reimplemented from Dv::Sql::Command_. |
|
Return field description corresponding to query result. Part of Sql::Command_ required interface. Implements Dv::Sql::Command_. |
|
Return auto_increment insertid of last query.
Reimplemented from Dv::Sql::Command_. |
|
Only Db can e.g. construct a Command_.
|
|
Definition at line 131 of file mysqldb.h. Referenced by db(). |
|
Stored result of query, opaque declaration, really MYSQL_RES*.
|
|
Current row# [0..] of mrow_, -1 if none.
|
|
Lengths of fields [0..ncols()] in current row.
|
|
Buffer corresponding to row_; opaque declaration, really MYSQL_ROW.
|
|
Error code, 0 if ok.
Definition at line 141 of file mysqldb.h. Referenced by error(). |
|
Field list of the query result, filled on demand.
|