🐛 fix(kingbase): 修复开表与 ER 图加载缓慢问题

- 解耦 Kingbase 首屏查询与编辑定位元数据加载
- 使用单次全库外键快照替代 ER 图逐表扫描
- 补充大规模表结构和异步元数据回归测试

Fixes #731
Fixes #732
This commit is contained in:
Syngnat
2026-07-27 20:39:08 +08:00
parent 999218dccc
commit 770243e0da
11 changed files with 524 additions and 37 deletions

View File

@@ -44,6 +44,13 @@ type Database interface {
GetTriggers(dbName, tableName string) ([]connection.TriggerDefinition, error)
}
// DatabaseForeignKeyProvider is an optional metadata interface for drivers that
// can load a database-wide foreign-key snapshot more efficiently than one table
// at a time.
type DatabaseForeignKeyProvider interface {
GetDatabaseForeignKeys(dbName string) (map[string][]connection.ForeignKeyDefinition, error)
}
// TableRowCounter is an optional metadata interface for drivers that can
// provide exact table row counts alongside a table list.
type TableRowCounter interface {