pgLab/pglab/PgDatabase.h
Eelke Klein 04723a289b Switching to linux for development of pglab.
Switched from qmake to cmake. Code changes to make it compile.
2017-08-23 08:10:01 +02:00

31 lines
668 B
C++

#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