Arc::MySQLQuery Class Reference

Inheritance diagram for Arc::MySQLQuery:
Arc::Query

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)

Member Function Documentation

virtual bool Arc::MySQLQuery::execute ( const std::string &  sqlstr  )  [virtual]

Execute the query

Parameters:
sqlstr The sql sentence used to query

Implements Arc::Query.

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 = ?"

Parameters:
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

Parameters:
row_number The number of the row
Returns:
A vector includes all the values in 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

Parameters:
row_number The row number inside the query result
field_name The field name for the value which will be return
Returns:
The value of the specified filed in the specified row

Implements Arc::Query.


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:21 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3