feat: update ui
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user