IterRootObjects implements the interface doltdb.RootValue.
(ctx context.Context, cb func(name doltdb.TableName, table doltdb.RootObject) (stop bool, err error))
| 515 | |
| 516 | // IterRootObjects implements the interface doltdb.RootValue. |
| 517 | func (root *RootValue) IterRootObjects(ctx context.Context, cb func(name doltdb.TableName, table doltdb.RootObject) (stop bool, err error)) error { |
| 518 | colls, err := rootobject.LoadAllCollections(ctx, root) |
| 519 | if err != nil { |
| 520 | return err |
| 521 | } |
| 522 | for _, coll := range colls { |
| 523 | err = coll.IterAll(ctx, func(rootObj objinterface.RootObject) (stop bool, err error) { |
| 524 | return cb(rootObj.Name(), rootObj) |
| 525 | }) |
| 526 | if err != nil { |
| 527 | return err |
| 528 | } |
| 529 | } |
| 530 | return nil |
| 531 | } |
| 532 | |
| 533 | // IterTables implements the interface doltdb.RootValue. |
| 534 | func (root *RootValue) IterTables(ctx context.Context, cb func(name doltdb.TableName, table *doltdb.Table, sch schema.Schema) (stop bool, err error)) error { |
no test coverage detected