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,18 +1,18 @@
|
|||
#ifndef PGTRIGGER_H
|
||||
#define PGTRIGGER_H
|
||||
|
||||
#include "PgSchemaObject.h"
|
||||
#include "PgNamespaceObject.h"
|
||||
#include "Pgsql_Value.h"
|
||||
#include <QString>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
class PgDatabaseCatalog;
|
||||
|
||||
class PgTrigger: public PgSchemaObject {
|
||||
class PgTrigger: public PgNamespaceObject {
|
||||
public:
|
||||
Oid oid = InvalidOid;
|
||||
// Oid oid = InvalidOid;
|
||||
Oid relid;
|
||||
QString name;
|
||||
// QString name;
|
||||
Oid foid;
|
||||
int16_t type;
|
||||
char enabled;
|
||||
|
|
@ -29,15 +29,15 @@ public:
|
|||
QString oldtable; // >= 10.0
|
||||
QString newtable; // >= 10.0
|
||||
|
||||
using PgSchemaObject::PgSchemaObject;
|
||||
using PgNamespaceObject::PgNamespaceObject;
|
||||
|
||||
virtual QString objectName() const override;
|
||||
// virtual QString objectName() const override;
|
||||
|
||||
|
||||
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 PgTrigger &rhs) const { return oid < rhs.oid; }
|
||||
// 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 PgTrigger &rhs) const { return oid < rhs.oid; }
|
||||
|
||||
static constexpr int TriggerTypeRow = (1 << 0);
|
||||
static constexpr int TriggerTypeBefore = (1 << 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue