дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-27 21:12:34 +02:00
feat(database): show table comments in the database tree (#6416)
Tables and views in the Database tree now show their comment in grey after the name, with the full comment as the row tooltip. Built-in drivers read it in the same catalog query that lists relations (PostgreSQL, MySQL, Oracle, ClickHouse, Snowflake, SQL Server extended properties) and JDBC sources from REMARKS. The new Show Table Comments view option is on by default and toggles from the Database window options; TableInfo.comment is optional on the wire. Co-authored-by: wangyuewen-china <[email protected]>
Цей коміт міститься в:
1 джерело
3a1353cc0e
коміт
2e93422270
18 files changed
+150
-32
No files matched your search
@@ -32,6 +32,8 @@ public class SelfTest {
|
||||
case "getIdentifierQuoteString" -> "\"";
|
||||
case "getSearchStringEscape" -> "\\";
|
||||
case "getSchemas" -> rows(List.of(Map.of("TABLE_SCHEM", "app")));
|
||||
case "getTables" -> rows(List.of(Map.of(
|
||||
"TABLE_NAME", "orders", "TABLE_TYPE", "TABLE", "REMARKS", "Orders table")));
|
||||
case "getColumns" -> "app".equals(a[1]) && "%".equals(a[2]) ? rows(List.of(
|
||||
Map.of("TABLE_NAME", "orders", "COLUMN_NAME", "id", "TYPE_NAME", "INT", "NULLABLE", 0),
|
||||
Map.of("TABLE_NAME", "orders", "COLUMN_NAME", "note", "TYPE_NAME", "VARCHAR", "NULLABLE", 1,
|
||||
@@ -155,6 +157,9 @@ public class SelfTest {
|
||||
var columns = new String(reply(in), StandardCharsets.UTF_8);
|
||||
assert columns.contains("orders") && columns.contains("note") && columns.contains("'none'") : columns;
|
||||
assert columns.contains("comment") && columns.contains("free text") : columns;
|
||||
send(out, 10, "tables", "app");
|
||||
var tables = new String(reply(in), StandardCharsets.UTF_8);
|
||||
assert tables.contains("orders") && tables.contains("Orders table") : tables;
|
||||
} finally {
|
||||
child.destroyForcibly().waitFor();
|
||||
}
|
||||
|
||||
Reference in new issue
Заблокувати користувача