// Do executes a given func with each table in the database.
Do executes a given func with each table in the database.
// Do executes a given func with each table in the database .
func (i *TableIterator) Do(f func(*Table) error) error {
	for _, t := range i.tables {
		if err := f(t); err != nil {
			return err
		}
		if len(t.ChildTables) > 0 {
			childIter := &TableIterator{t.ChildTables}
			if err := childIter.Do(f); err != nil {
				return err
			}
		}
	}
	return nil
}
func ( i * TableIterator ) Do ( f func ( * Table ) error ) error { for _ , t := range i . tables { if err := f ( t ) ; err != nil { return err } if len ( t . ChildTables ) > 0 { childIter := & TableIterator { t . ChildTables } if err := childIter . Do ( f ) ; err != nil { return err } } } return nil }
Do executes a given func with each table in the database.
Do executes a given func with each table in the database .