2018-12-17 21:51:14 +01:00
|
|
|
|
#ifndef PGLANGUAGE_H
|
|
|
|
|
|
#define PGLANGUAGE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "PgDatabaseObject.h"
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
#include <libpq-fe.h>
|
|
|
|
|
|
//#include "Pgsql_Value.h"
|
|
|
|
|
|
|
2018-12-25 13:17:04 +01:00
|
|
|
|
class PgLanguage: public PgDatabaseObject {
|
2018-12-17 21:51:14 +01:00
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
// Oid oid;
|
|
|
|
|
|
// QString name;
|
|
|
|
|
|
// Oid owner;
|
|
|
|
|
|
bool ispl; // true "user installable language" language like plpgsql perl en pythong, false for internal, c and sql
|
|
|
|
|
|
bool pltrusted;
|
|
|
|
|
|
Oid plcallfoid;
|
|
|
|
|
|
Oid inline_;
|
|
|
|
|
|
Oid validator;
|
|
|
|
|
|
|
|
|
|
|
|
using PgDatabaseObject::PgDatabaseObject;
|
|
|
|
|
|
|
|
|
|
|
|
QString createSql() const;
|
|
|
|
|
|
QString dropSql() const;
|
2018-12-23 19:43:50 +01:00
|
|
|
|
|
|
|
|
|
|
bool isC() const { return objectName() == "c"; }
|
|
|
|
|
|
bool isInternal() const { return objectName() == "internal"; }
|
|
|
|
|
|
bool isPlpgsql() const { return objectName() == "plpgsql"; }
|
|
|
|
|
|
bool isSql() const { return objectName() == "sql"; }
|
|
|
|
|
|
|
2018-12-24 11:31:56 +01:00
|
|
|
|
QString typeName() const override;
|
2018-12-17 21:51:14 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PGLANGUAGE_H
|