advsql/old/check_table_integrity.go
2022-07-05 12:44:25 +02:00

16 lines
347 B
Go

package advsql
func (s *Store) checkTableIntegrity(value interface{}) (bool, error) {
valueStructure, err := objectStructure(value)
if err != nil {
return false, err
}
tableStructure, err := s.tableStructure(valueStructure.TypeName)
if err != nil {
return false, err
}
return compareStructures(valueStructure, tableStructure), nil
}