From fc58acb25274a8702dd95416b9fcea33b9777425 Mon Sep 17 00:00:00 2001 From: eelke Date: Sun, 23 Dec 2018 19:43:50 +0100 Subject: [PATCH] Added convenience functions to PgLanguage for quickly testing for the standard languages. --- pglablib/catalog/PgLanguage.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pglablib/catalog/PgLanguage.h b/pglablib/catalog/PgLanguage.h index fe4a1a4..3178bc8 100644 --- a/pglablib/catalog/PgLanguage.h +++ b/pglablib/catalog/PgLanguage.h @@ -24,6 +24,12 @@ public: QString createSql() const; QString dropSql() const; + + bool isC() const { return objectName() == "c"; } + bool isInternal() const { return objectName() == "internal"; } + bool isPlpgsql() const { return objectName() == "plpgsql"; } + bool isSql() const { return objectName() == "sql"; } + }; #endif // PGLANGUAGE_H