mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 23:25:59 +00:00
Display comments into TABLES and COLUMNS lists #755
This commit is contained in:
@@ -35,7 +35,21 @@
|
||||
];
|
||||
}
|
||||
|
||||
$: extInfo = data.foreignKey ? `${data.dataType} -> ${data.foreignKey.refTableName}` : data.dataType;
|
||||
function getExtInfo(data) {
|
||||
const res = [];
|
||||
if (data.foreignKey) {
|
||||
res.push(`${data.dataType} -> ${data.foreignKey.refTableName}`);
|
||||
} else {
|
||||
res.push(data.dataType);
|
||||
}
|
||||
if (data.columnComment) {
|
||||
res.push(data.columnComment);
|
||||
}
|
||||
if (res.length > 0) return res.join(', ');
|
||||
return null;
|
||||
}
|
||||
|
||||
$: extInfo = getExtInfo(data);
|
||||
</script>
|
||||
|
||||
<AppObjectCore
|
||||
|
||||
@@ -932,6 +932,9 @@
|
||||
|
||||
function getExtInfo(data) {
|
||||
const res = [];
|
||||
if (data.objectComment) {
|
||||
res.push(data.objectComment);
|
||||
}
|
||||
if (data.tableRowCount != null) {
|
||||
res.push(`${formatRowCount(data.tableRowCount)} rows`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user