Added list of databases and roles.

Roles works for atleast 9.3 and up.

Reorganizing code for communicating with database.
This commit is contained in:
eelke 2017-02-18 12:05:48 +01:00
parent 8c077b3d5f
commit 2d962334da
28 changed files with 881 additions and 428 deletions

31
src/Pgsql_Row.h Normal file
View file

@ -0,0 +1,31 @@
#ifndef PGSQL_ROW_H
#define PGSQL_ROW_H
#include "Pgsql_Value.h"
namespace Pgsql {
class Result;
/** \brief A reference to a specific row from a result.
*
* As it is a reference its contents won't be valid after its associated result has
* been destroyed.
*/
class Row {
public:
Row(const Result &result, int row);
bool next();
bool operator==(const Row& rhs) const;
Value get(int col) const;
//Value get(const char *colname) const;
//bool get(int col, QString &s);
private:
const Result& m_result;
int m_row;
};
} // end namespace Pgsql
#endif // PGSQL_ROW_H