31 lines
668 B
C++
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
|