advsql/check_table_integrity.go

16 lines
347 B
Go
Raw Normal View History

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
}