LoadExtensions loads the extensions collection from the given root.
(ctx context.Context, root objinterface.RootValue)
| 93 | |
| 94 | // LoadExtensions loads the extensions collection from the given root. |
| 95 | func LoadExtensions(ctx context.Context, root objinterface.RootValue) (*Collection, error) { |
| 96 | m, ok, err := storage.GetProllyMap(ctx, root) |
| 97 | if err != nil { |
| 98 | return nil, err |
| 99 | } |
| 100 | if !ok { |
| 101 | m, err = prolly.NewEmptyAddressMap(root.NodeStore()) |
| 102 | if err != nil { |
| 103 | return nil, err |
| 104 | } |
| 105 | } |
| 106 | return NewCollection(ctx, m, root.NodeStore()) |
| 107 | } |
| 108 | |
| 109 | // ResolveNameFromObjects implements the interface objinterface.Collection. |
| 110 | func (*Collection) ResolveNameFromObjects(ctx context.Context, name doltdb.TableName, rootObjects []objinterface.RootObject) (doltdb.TableName, id.Id, error) { |
no test coverage detected