Show SQL for database

Also improvements to the SQL for tables and views.
This commit is contained in:
eelke 2022-01-20 20:13:56 +01:00
parent b5a706a2a2
commit 3158a4364b
12 changed files with 172 additions and 58 deletions

View file

@ -94,10 +94,20 @@ QString PgServerObject::aclAllPattern() const
QString PgServerObject::dropSql() const
{
return {};
return "DROP " % typeName() % " " % fullyQualifiedQuotedObjectName() % ";";
}
QString PgServerObject::createSql() const
{
return {};
return {};
}
QString PgServerObject::commentSql() const
{
if (description.isEmpty())
return {};
return "COMMENT ON " + typeName() + " " + fullyQualifiedQuotedObjectName()
+ " IS " + escapeLiteral(description) + ";";
}