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,7 +1,7 @@
|
|||
#ifndef PGPROC_H
|
||||
#define PGPROC_H
|
||||
|
||||
#include "PgSchemaObject.h"
|
||||
#include "PgNamespaceObject.h"
|
||||
#include <QString>
|
||||
#include <libpq-fe.h>
|
||||
#include "Pgsql_Value.h"
|
||||
|
|
@ -24,12 +24,12 @@ public:
|
|||
};
|
||||
|
||||
|
||||
class PgProc: public PgSchemaObject {
|
||||
class PgProc: public PgNamespaceObject {
|
||||
public:
|
||||
using PgSchemaObject::PgSchemaObject;
|
||||
using PgNamespaceObject::PgNamespaceObject;
|
||||
|
||||
Oid oid = InvalidOid; // oid
|
||||
QString name; // name
|
||||
// Oid oid = InvalidOid; // oid
|
||||
// QString name; // name
|
||||
// Oid pronamespace = InvalidOid; // oid, namespace
|
||||
Oid owner = InvalidOid; // oid
|
||||
Oid lang = InvalidOid; // oid
|
||||
|
|
@ -65,12 +65,10 @@ public:
|
|||
);
|
||||
const std::vector<Arg>& args() const;
|
||||
|
||||
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 PgProc &rhs) const { return oid < rhs.oid; }
|
||||
|
||||
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 PgProc &rhs) const { return oid < rhs.oid; }
|
||||
|
||||
QString createSql() const;
|
||||
QString argListWithNames(bool multiline = false) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue