Inheritance diagram for QDb:

Public Types | |
| typedef std::vector< QVdt > | column |
|
typedef std::map< std::string, column > | QDbTable |
Public Member Functions | |
| double | DoQueryDouble (const std::string &Query) |
| make query and expect a single double as output | |
| int | DoQueryInt (const std::string &Query) |
| make query and expect a single int as output | |
| bool | DoQueryBool (const std::string &Query) |
| make query and expect a single bool as output | |
| std::string | DoQueryString (const std::string &Query) |
| make query and expect a single string as output | |
| std::vector< double > & | DoQueryVectorDouble (const std::string &Query) |
| make query and expect a vector of double as output | |
| const QDbTable | DoQuery (const std::string &Query, int MaxLines=1000) |
| make query and expect a table as output | |
| bool | DoSQLNoReturn (const std::string &query) |
| make query and expect no output | |
| int | DoExec (const std::string &Query) |
| Execute an INSERT, UPDATE, DELETE, FETCH, or MOVE statement. | |
Protected Member Functions | |
| QDb (const std::string &ip, const std::string &port, const std::string &usr, const std::string &pwd, const std::string &db) | |
| protected constructor called by child classes | |
| bool | Connect () |
| open connection to db | |
| bool | DisConnect () |
| close connection to db | |
| bool | isConnected () const |
| check connection status | |
| const QDbTable | DoQuery (const std::string &Table, const std::string &Where, const std::string &Fields, const std::string &Order, int MaxLines) |
| Perform a SELECT query with simplified syntax. | |
| const char * | DataBase () const |
Private Member Functions | |
| const char * | Server () const |
| const char * | Port () const |
| const char * | User () const |
| const char * | Passwd () const |
Private Attributes | |
| PGconn * | fConnection |
| bool | fConnected |
| std::string | fServerIpAddress |
| std::string | fServerIpPort |
| std::string | fUserName |
| std::string | fPasswd |
| std::string | fDataBase |
| QDb::QDb | ( | const std::string & | ip, | |
| const std::string & | port, | |||
| const std::string & | usr, | |||
| const std::string & | pwd, | |||
| const std::string & | db | |||
| ) | [protected] |
protected constructor called by child classes
| ip | network address or name of the db host | |
| port | port the db is listening to | |
| usr | username for db authentication | |
| pwd | password for db authentication | |
| db | db name |
| const QDb::QDbTable QDb::DoQuery | ( | const std::string & | Query, | |
| int | MaxLines = 1000 | |||
| ) |
make query and expect a table as output
| MaxLines | determine max number of lines to be returned by the query.
|
| int QDb::DoExec | ( | const std::string & | Query | ) |
Execute an INSERT, UPDATE, DELETE, FETCH, or MOVE statement.
| bool QDb::isConnected | ( | ) | const [inline, protected] |
check connection status
1.5.1