fix(database): show column comments in the SQL table and column hover (#6402)

The completion metadata the SQL console hover reads carried no column comments, though Modify Table and the Database view already read them. completion_columns now returns the comment on PostgreSQL, MySQL, Oracle, ClickHouse and Snowflake (NULL on SQL Server and SQLite), Snowflake's SHOW COLUMNS path and the JDBC bridge's schemaColumns (REMARKS, jar rebuilt) carry it too, and the hover shows a comment column in the table card and the comment under a single column.

Fixes #6374
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-27 16:01:45 +08:00
1 джерело 2ce7621abb
коміт 318c227b0c
10 files changed
+81 -21

No files matched your search

+2 -1
Переглянути файл
@@ -35,7 +35,7 @@ public class SelfTest {
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,
"COLUMN_DEF", "'none'"))) : rows(List.of());
"COLUMN_DEF", "'none'", "REMARKS", "free text"))) : rows(List.of());
default -> throw new SQLFeatureNotSupportedException();
});
return proxy(Connection.class, (p, m, a) -> switch (m.getName()) {
@@ -154,6 +154,7 @@ public class SelfTest {
send(out, 9, "schemaColumns", "app");
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;
} finally {
child.destroyForcibly().waitFor();
}