12345678910111213141516171819202122232425262728293031323334353637383940 |
- package models
- // DatabaseInfo 包含数据库的总大小、表数量和表名列表
- type DatabaseInfo struct {
- SizeMB float64
- TableCount int
- Tables map[string]TableInfo
- LobTables map[string]TableInfo
- Functions []FunctionInfo
- Triggers []TriggerInfo
- }
- type TableInfo struct {
- Name string
- Size float64
- DDL string
- Count int
- }
- type FunctionInfo struct {
- Name string
- Type string // "FUNCTION" 或 "PROCEDURE"
- Definition string
- }
- type TriggerInfo struct {
- Name string
- Event string // "INSERT", "UPDATE", "DELETE" 等
- Table string
- Timing string // "BEFORE" 或 "AFTER"
- Statement string
- }
- // DbConnParams 定义了数据库连接参数的结构体
- type DbConnParams struct {
- Host string
- Port string
- Database string
- User string
- Password string
- }
|