comments on tables
Show them in the list of tables. Genereate SQL to set the comment.
This commit is contained in:
parent
7fbc828326
commit
9d58af8cd2
5 changed files with 34 additions and 18 deletions
|
|
@ -131,6 +131,7 @@ QVariant TablesTableModel::headerData(int section, Qt::Orientation orientation,
|
|||
case TablespaceCol: return tr("Tablespace");
|
||||
case OptionsCol: return tr("Options");
|
||||
case AclCol: return tr("ACL");
|
||||
case CommentCol: return tr("Comment");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -140,7 +141,7 @@ QVariant TablesTableModel::headerData(int section, Qt::Orientation orientation,
|
|||
// Basic functionality:
|
||||
int TablesTableModel::rowCount(const QModelIndex &) const
|
||||
{
|
||||
return m_tables.size();
|
||||
return static_cast<int>(m_tables.size());
|
||||
}
|
||||
|
||||
int TablesTableModel::columnCount(const QModelIndex &) const
|
||||
|
|
@ -159,6 +160,7 @@ Oid TablesTableModel::getType(int column) const
|
|||
case KindCol:
|
||||
case OptionsCol:
|
||||
case AclCol:
|
||||
case CommentCol:
|
||||
default:
|
||||
oid = Pgsql::varchar_oid;
|
||||
}
|
||||
|
|
@ -176,6 +178,7 @@ QVariant TablesTableModel::getData(const QModelIndex &index) const
|
|||
case TablespaceCol: return getTablespaceDisplayString(*m_catalog, t.tablespace);
|
||||
case OptionsCol: break;
|
||||
case AclCol: return t.aclString();
|
||||
case CommentCol: return t.description;
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue