fix(tdengine): fix table data preview
This commit is contained in:
12 files changed
+135
-28
No files matched your search
@@ -81,7 +81,10 @@ public final class TDengineAgent extends BaseDatabaseAgent {
|
||||
try (java.sql.Statement stmt = requireConnected().createStatement();
|
||||
ResultSet rs = stmt.executeQuery("SHOW DATABASES")) {
|
||||
while (rs.next()) {
|
||||
result.add(new DatabaseInfo(rs.getString(1)));
|
||||
String name = rs.getString(1);
|
||||
if (!isSystemDatabase(name)) {
|
||||
result.add(new DatabaseInfo(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -323,6 +326,14 @@ public final class TDengineAgent extends BaseDatabaseAgent {
|
||||
return "`" + identifier.replace("`", "``") + "`";
|
||||
}
|
||||
|
||||
private static boolean isSystemDatabase(String name) {
|
||||
if (name == null) {
|
||||
return false;
|
||||
}
|
||||
String normalized = name.trim().toLowerCase(Locale.ROOT);
|
||||
return "information_schema".equals(normalized) || "performance_schema".equals(normalized);
|
||||
}
|
||||
|
||||
private static Integer parseNumericPrecision(String dataType) {
|
||||
return parseIntGroup(NUMERIC_PRECISION_PATTERN, dataType, 2);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user