2018-11-18 19:30:45 +01:00
|
|
|
|
#ifndef PGSCHEMAOBJECT_H
|
|
|
|
|
|
#define PGSCHEMAOBJECT_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
#include "PgDatabaseObject.h"
|
|
|
|
|
|
#include <libpq-fe.h>
|
|
|
|
|
|
|
|
|
|
|
|
class PgNamespace;
|
|
|
|
|
|
|
|
|
|
|
|
/// Base class for database objects that are part of a specific schema
|
2018-11-25 19:45:06 +01:00
|
|
|
|
class PgNamespaceObject: public PgDatabaseObject {
|
2018-11-18 19:30:45 +01:00
|
|
|
|
public:
|
|
|
|
|
|
|
2018-11-25 19:45:06 +01:00
|
|
|
|
PgNamespaceObject(PgDatabaseCatalog& cat, Oid oid, const QString &name, Oid schema_oid);
|
|
|
|
|
|
|
|
|
|
|
|
Oid nsOid() const;
|
|
|
|
|
|
// void setSchemaOid(Oid oid);
|
|
|
|
|
|
QString nsName() const;
|
|
|
|
|
|
QString quotedNsName() const;
|
2018-11-18 19:30:45 +01:00
|
|
|
|
/// Returns the schema name and object name with proper quotes
|
2018-12-25 13:17:04 +01:00
|
|
|
|
QString fullyQualifiedQuotedObjectName() const override;
|
2018-11-18 19:30:45 +01:00
|
|
|
|
|
|
|
|
|
|
const PgNamespace& ns() const;
|
|
|
|
|
|
private:
|
|
|
|
|
|
Oid m_schemaOid = InvalidOid;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PGSCHEMAOBJECT_H
|