advsql/old/check_table_integrity.go

16 lines
347 B
Go
Raw Normal View History

2022-07-05 12:44:25 +02:00
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
}