2017-02-01 18:01:02 +01:00
|
|
|
|
#ifndef PGNAMESPACE_H
|
|
|
|
|
|
#define PGNAMESPACE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
2017-08-23 13:27:23 +02:00
|
|
|
|
#include <libpq-fe.h>
|
2017-02-01 18:01:02 +01:00
|
|
|
|
|
2017-12-12 20:13:53 +01:00
|
|
|
|
class PgNamespace {
|
2017-02-01 18:01:02 +01:00
|
|
|
|
public:
|
|
|
|
|
|
PgNamespace();
|
|
|
|
|
|
|
2017-12-12 20:13:53 +01:00
|
|
|
|
Oid oid = InvalidOid;
|
2017-02-01 18:01:02 +01:00
|
|
|
|
QString name;
|
|
|
|
|
|
Oid owner = InvalidOid;
|
|
|
|
|
|
QString acl;
|
2017-12-12 20:13:53 +01:00
|
|
|
|
|
|
|
|
|
|
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 PgNamespace &rhs) const { return oid < rhs.oid; }
|
|
|
|
|
|
|
|
|
|
|
|
bool isSystemCatalog() const;
|
2017-02-01 18:01:02 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PGNAMESPACE_H
|