pgLab/pglablib/PgDatabase.h
eelke 73c4cf4790 Rework of catalog objects. Several of them are now inheriting from common
base classes that implement common functionality.
2018-11-25 19:45:06 +01:00

33 lines
768 B
C++

#ifndef PGDATABASE_H
#define PGDATABASE_H
#include "PgServerObject.h"
#include <QString>
#include <libpq-fe.h>
class PgDatabase: public PgServerObject {
public:
// 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"
using PgServerObject::PgServerObject;
bool isValid() const { return oid() != InvalidOid; }
// bool operator==(Oid _oid) const { return oid() == _oid; }
// bool operator==(const QString &n) const { return objectName() == n; }
// bool operator<(Oid _oid) const { return oid() < _oid; }
// bool operator<(const PgDatabase &rhs) const { return oid() < rhs.oid(); }
};
#endif // PGDATABASE_H