WIP: SQL for creating table and related objects

This commit is contained in:
eelke 2018-11-30 18:41:38 +01:00
parent 57217974f4
commit 498233d58c
15 changed files with 221 additions and 121 deletions

View file

@ -1,6 +1,7 @@
#ifndef PGCONSTRAINT_H
#define PGCONSTRAINT_H
#include "PgNamespaceObject.h"
#include "Pgsql_Value.h"
#include "PgCatalogTypes.h"
#include <QString>
@ -46,11 +47,8 @@ void operator<<(ForeignKeyMatch &s, const Pgsql::Value &v);
QString ForeignKeyMatchToString(ForeignKeyMatch fkm);
class PgConstraint {
class PgConstraint: public PgNamespaceObject {
public:
Oid oid = InvalidOid;
QString name;
Oid connamespace = InvalidOid;
ConstraintType type;
bool deferrable;
bool deferred;
@ -76,11 +74,7 @@ public:
QString definition;
PgConstraint();
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 PgConstraint &rhs) const { return oid < rhs.oid; }
using PgNamespaceObject::PgNamespaceObject;
};