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,15 +1,15 @@
|
|||
#ifndef PGINDEX_H
|
||||
#define PGINDEX_H
|
||||
|
||||
#include "PgSchemaObject.h"
|
||||
#include "PgNamespaceObject.h"
|
||||
#include "Pgsql_declare.h"
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
|
||||
class PgIndex : public PgSchemaObject {
|
||||
class PgIndex : public PgNamespaceObject {
|
||||
public:
|
||||
|
||||
Oid indexrelid = InvalidOid; // oid of pg_class for this index
|
||||
// Oid indexrelid = InvalidOid; // oid of pg_class for this index
|
||||
Oid relid = InvalidOid; // oid of table (pg_class) where this is an index on
|
||||
int16_t natts = 0;
|
||||
bool isunique = false;
|
||||
|
|
@ -30,14 +30,13 @@ public:
|
|||
QString pred;
|
||||
QString definition;
|
||||
|
||||
using PgSchemaObject::PgSchemaObject;
|
||||
using PgNamespaceObject::PgNamespaceObject;
|
||||
QString getAm() const;
|
||||
virtual QString objectName() const override;
|
||||
|
||||
bool operator==(Oid _oid) const { return indexrelid == _oid; }
|
||||
//bool operator==(const QString &n) const { return name == n; }
|
||||
bool operator<(Oid _oid) const { return indexrelid < _oid; }
|
||||
bool operator<(const PgIndex &rhs) const { return indexrelid < rhs.indexrelid; }
|
||||
// bool operator==(Oid _oid) const { return indexrelid == _oid; }
|
||||
// //bool operator==(const QString &n) const { return name == n; }
|
||||
// bool operator<(Oid _oid) const { return indexrelid < _oid; }
|
||||
// bool operator<(const PgIndex &rhs) const { return indexrelid < rhs.indexrelid; }
|
||||
};
|
||||
|
||||
#endif // PGINDEX_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue