MCPcopy Create free account
hub / github.com/dolthub/doltgresql / LoadSequences

Function LoadSequences

core/sequences/collection_funcs.go:134–150  ·  view source on GitHub ↗

LoadSequences loads the sequences collection from the given root.

(ctx context.Context, root objinterface.RootValue)

Source from the content-addressed store, hash-verified

132
133// LoadSequences loads the sequences collection from the given root.
134func LoadSequences(ctx context.Context, root objinterface.RootValue) (*Collection, error) {
135 m, ok, err := storage.GetProllyMap(ctx, root)
136 if err != nil {
137 return nil, err
138 }
139 if !ok {
140 m, err = prolly.NewEmptyAddressMap(root.NodeStore())
141 if err != nil {
142 return nil, err
143 }
144 }
145 return &Collection{
146 accessedMap: make(map[id.Sequence]*Sequence),
147 underlyingMap: m,
148 ns: root.NodeStore(),
149 }, nil
150}
151
152// ResolveNameFromObjects implements the interface objinterface.Collection.
153func (*Collection) ResolveNameFromObjects(ctx context.Context, name doltdb.TableName, rootObjects []objinterface.RootObject) (doltdb.TableName, id.Id, error) {

Callers 6

DebugStringMethod · 0.92
RemoveTablesMethod · 0.92
RenameTableMethod · 0.92
GetRelationTypeFromRootFunction · 0.92
LoadCollectionMethod · 0.85

Calls 2

GetProllyMapMethod · 0.80
NodeStoreMethod · 0.80

Tested by

no test coverage detected