Added typeName function to PgObject as it might be useful for building generic functions.

This commit is contained in:
eelke 2018-12-24 11:31:56 +01:00
parent b210c570fc
commit 3f337b2cca
21 changed files with 83 additions and 15 deletions

View file

@ -370,3 +370,17 @@ QString PgProc::volatility() const
}
return "<unknown>";
}
QString PgProc::typeName() const
{
switch (kind) {
case ProcKind::Function:
case ProcKind::Window:
return "FUNCTION";
case ProcKind::Procedure:
return "PROCEDURE";
case ProcKind::Aggregate:
return "AGGREGATE";
}
throw std::runtime_error("Unexpected kind in PgProc::typeName()");
}