2018-08-25 18:11:12 +02:00
|
|
|
|
#ifndef PGOBJECT_H
|
|
|
|
|
|
#define PGOBJECT_H
|
|
|
|
|
|
|
2018-11-18 19:30:45 +01:00
|
|
|
|
#include <QString>
|
2018-08-25 18:11:12 +02:00
|
|
|
|
|
|
|
|
|
|
class PgDatabaseCatalog;
|
|
|
|
|
|
|
2018-11-18 19:30:45 +01:00
|
|
|
|
class PgObject {
|
2018-08-25 18:11:12 +02:00
|
|
|
|
public:
|
2018-11-18 19:30:45 +01:00
|
|
|
|
explicit PgObject(PgDatabaseCatalog& cat);
|
|
|
|
|
|
virtual ~PgObject();
|
|
|
|
|
|
|
|
|
|
|
|
virtual QString objectName() const = 0;
|
|
|
|
|
|
/// Default implementation uses objectName and add quotes when needed.
|
|
|
|
|
|
virtual QString quotedObjectName() const;
|
|
|
|
|
|
|
2018-08-25 18:11:12 +02:00
|
|
|
|
protected:
|
2018-11-18 19:30:45 +01:00
|
|
|
|
const PgDatabaseCatalog& catalog() const;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
PgDatabaseCatalog* m_catalog;
|
|
|
|
|
|
|
2018-08-25 18:11:12 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PGOBJECT_H
|