solarpowerlog trunk
QueryHelper Class Reference

#include <QueryHelper.h>

List of all members.

Public Member Functions

 ~QueryHelper ()
int DoQuery (std::vector< std::string > &what, std::string &where)
std::map< std::string, boost::any > GetNextResult (void)

Protected Member Functions

 QueryHelper (dbixx::session *session, std::map< std::string, dbtypes > *x)

Friends

class IPersistanceStorage

Detailed Description

Definition at line 18 of file QueryHelper.h.


Constructor & Destructor Documentation

QueryHelper::QueryHelper ( dbixx::session *  session,
std::map< std::string, dbtypes > *  x 
) [protected]

Definition at line 12 of file QueryHelper.cpp.

QueryHelper::~QueryHelper ( )

Definition at line 20 of file QueryHelper.cpp.


Member Function Documentation

int QueryHelper::DoQuery ( std::vector< std::string > &  what,
std::string &  where 
)

builds up the query, executing it afterwards. returns the found rows. SELECT what FROM this->table WHERE where; returns the num of results or zero if no row returned. If negative, an error occured while executing the sta

Definition at line 26 of file QueryHelper.cpp.

std::map< std::string, boost::any > QueryHelper::GetNextResult ( void  )

return the next row, conveniently packed into an std::map

Entries which are null are omitted. Only the columns are returned that were searched for.

Definition at line 71 of file QueryHelper.cpp.


Friends And Related Function Documentation

friend class IPersistanceStorage [friend]

Definition at line 21 of file QueryHelper.h.


The documentation for this class was generated from the following files: