Added pg_proc table to the catalog. Contains the definition of functions.

Also improved the loading code for some catalog tables.
This commit is contained in:
eelke 2018-11-17 19:38:07 +01:00
parent d8fc14c823
commit 35813ae926
10 changed files with 152 additions and 17 deletions

View file

@ -26,6 +26,7 @@ class PgAmContainer;
class PgTablespaceContainer;
class PgTriggerContainer;
class PgTypeContainer;
class PgProcContainer;
class PgDatabaseCatalog: public QObject, public std::enable_shared_from_this<PgDatabaseCatalog> {
Q_OBJECT
@ -55,6 +56,7 @@ public:
std::shared_ptr<const PgTablespaceContainer> tablespaces() const;
std::shared_ptr<const PgTriggerContainer> triggers() const;
std::shared_ptr<const PgTypeContainer> types() const;
std::shared_ptr<const PgProcContainer> procs() const;
enum RefreshFlag {
Attributes = 1,
@ -68,6 +70,7 @@ public:
Tablespaces = (1 << 8),
Triggers = (1 << 9),
Types = (1 << 10),
Proc = (1 << 11),
All = 0xffffffff
};
using RefreshFlags = int;
@ -90,6 +93,7 @@ private:
std::shared_ptr<PgTablespaceContainer> m_tablespaces;
std::shared_ptr<PgTriggerContainer> m_triggers;
std::shared_ptr<PgTypeContainer> m_types;
std::shared_ptr<PgProcContainer> m_procs;
template <typename T>
void load2(std::shared_ptr<T> &ptr, Pgsql::Connection &conn)