The catalogue now loads the list of databases en there is a table model that can show this data.

This commit is contained in:
eelke 2017-02-12 14:03:42 +01:00
parent a9430bca1a
commit 20af12535e
22 changed files with 504 additions and 118 deletions

31
src/PgDatabase.h Normal file
View file

@ -0,0 +1,31 @@
#ifndef PGDATABASE_H
#define PGDATABASE_H
#include <QString>
#include <pgsql/libpq-fe.h>
class PgDatabase {
public:
PgDatabase();
Oid oid = InvalidOid;
QString name;
Oid dba; // owner?
int encoding;
QString collate;
QString ctype;
bool isTemplate;
bool allowConn;
int connLimit;
Oid tablespace;
QString acl;//"ARRAY";"YES"
bool isValid() const { return oid != InvalidOid; }
bool operator==(Oid _oid) const { return oid == _oid; }
bool operator==(const QString &n) const { return name == n; }
bool operator<(Oid _oid) const { return oid < _oid; }
bool operator<(const PgDatabase &rhs) const { return oid < rhs.oid; }
};
#endif // PGDATABASE_H