Iter calls the given callback for each table and hash contained in the map.
(ctx context.Context, cb func(string, hash.Hash) (bool, error))
| 340 | |
| 341 | // Iter calls the given callback for each table and hash contained in the map. |
| 342 | func (m RootTableMap) Iter(ctx context.Context, cb func(string, hash.Hash) (bool, error)) error { |
| 343 | var stop bool |
| 344 | return m.AddressMap.IterAll(ctx, func(n string, a hash.Hash) error { |
| 345 | n, ok := decodeTableNameForAddressMap(n, m.schemaName) |
| 346 | if !stop && ok { |
| 347 | var err error |
| 348 | stop, err = cb(n, a) |
| 349 | return err |
| 350 | } |
| 351 | return nil |
| 352 | }) |
| 353 | } |
no test coverage detected