Public Member Functions | |
virtual int | get_num_colums () |
virtual int | get_num_rows () |
virtual bool | execute (const std::string &sqlstr) |
virtual QueryRowResult | get_row (int row_number) const |
virtual QueryRowResult | get_row () const |
virtual std::string | get_row_field (int row_number, std::string &field_name) |
virtual bool | get_array (std::string &sqlstr, QueryArrayResult &result, std::vector< std::string > &arguments) |
virtual bool Arc::MySQLQuery::execute | ( | const std::string & | sqlstr | ) | [virtual] |
virtual bool Arc::MySQLQuery::get_array | ( | std::string & | sqlstr, | |
QueryArrayResult & | result, | |||
std::vector< std::string > & | arguments | |||
) | [virtual] |
Query the database by using some parameters into sql sentence e.g. "select table.value from table where table.name = ?"
sqlstr | The sql sentence with some parameters marked with "?". | |
result | The result in an array which includes all of the value in query result. | |
arguments | The argument list which should exactely correspond with the parametes in sql sentence. |
Implements Arc::Query.
virtual int Arc::MySQLQuery::get_num_colums | ( | ) | [virtual] |
Get the colum number in the query result
Implements Arc::Query.
virtual int Arc::MySQLQuery::get_num_rows | ( | ) | [virtual] |
Get the row number in the query result
Implements Arc::Query.
virtual QueryRowResult Arc::MySQLQuery::get_row | ( | ) | const [virtual] |
Get the value of one row in the query result, the row number will be automatically increased each time the method is called
Implements Arc::Query.
virtual QueryRowResult Arc::MySQLQuery::get_row | ( | int | row_number | ) | const [virtual] |
Get the value of one row in the query result
row_number | The number of the row |
Implements Arc::Query.
virtual std::string Arc::MySQLQuery::get_row_field | ( | int | row_number, | |
std::string & | field_name | |||
) | [virtual] |
Get the value of one specific field in one specific row
row_number | The row number inside the query result | |
field_name | The field name for the value which will be return |
Implements Arc::Query.