feat: update ui

This commit is contained in:
2025-08-06 11:12:16 +08:00
parent e034a2e54e
commit c4ad0c1dc9
12 changed files with 4983 additions and 226 deletions

View File

@@ -412,6 +412,14 @@ func (cm *ConnectionManager) isSearchableColumn(columnType string) bool {
return false
}
// GetTableRowCount returns the total number of rows in a table
func (cm *ConnectionManager) GetTableRowCount(tableName string) (int64, error) {
var count int64
query := fmt.Sprintf("SELECT COUNT(*) FROM %s", tableName)
err := cm.db.Raw(query).Scan(&count).Error
return count, err
}
// GetTableDataByID retrieves a single record by ID
func (cm *ConnectionManager) GetTableDataByID(tableName string, id interface{}) (map[string]interface{}, error) {
// Find primary key column