Rework of catalog objects. Several of them are now inheriting from common
base classes that implement common functionality.
This commit is contained in:
parent
840af1e0a9
commit
73c4cf4790
45 changed files with 340 additions and 265 deletions
|
|
@ -1,22 +1,26 @@
|
|||
#ifndef PGNAMESPACE_H
|
||||
#define PGNAMESPACE_H
|
||||
|
||||
#include "PgDatabaseObject.h"
|
||||
#include <QString>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
class PgNamespace {
|
||||
public:
|
||||
PgNamespace();
|
||||
|
||||
Oid oid = InvalidOid;
|
||||
QString name;
|
||||
/// Object representing a namespace within a database
|
||||
class PgNamespace: public PgDatabaseObject {
|
||||
public:
|
||||
|
||||
// Oid oid = InvalidOid;
|
||||
// QString name;
|
||||
Oid owner = InvalidOid;
|
||||
QString acl;
|
||||
|
||||
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; }
|
||||
using PgDatabaseObject::PgDatabaseObject;
|
||||
|
||||
// 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 PgNamespace &rhs) const { return oid < rhs.oid; }
|
||||
|
||||
bool isSystemCatalog() const;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue