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

Function LoadCollection

core/rootobject/collection.go:412–417  ·  view source on GitHub ↗

LoadCollection loads the collection matching the given ID from the root.

(ctx context.Context, root objinterface.RootValue, collectionID objinterface.RootObjectID)

Source from the content-addressed store, hash-verified

410
411// LoadCollection loads the collection matching the given ID from the root.
412func LoadCollection(ctx context.Context, root objinterface.RootValue, collectionID objinterface.RootObjectID) (objinterface.Collection, error) {
413 if globalCollections[collectionID] == nil {
414 return nil, nil
415 }
416 return globalCollections[collectionID].LoadCollection(ctx, root)
417}
418
419// PutRootObject adds the given root object to the respective Collection in the root, returning the updated root.
420func PutRootObject(ctx context.Context, root objinterface.RootValue, tName doltdb.TableName, rootObj objinterface.RootObject) (objinterface.RootValue, error) {

Callers 5

GetTableHashMethod · 0.92
RenameTableMethod · 0.92
PutRootObjectFunction · 0.85
RemoveRootObjectFunction · 0.85
RemoveRootObjectIfExistsFunction · 0.85

Calls 1

LoadCollectionMethod · 0.65

Tested by

no test coverage detected