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

Function GetRootObject

core/rootobject/collection.go:211–218  ·  view source on GitHub ↗

GetRootObject returns the root object that matches the given name.

(ctx context.Context, root objinterface.RootValue, tName doltdb.TableName)

Source from the content-addressed store, hash-verified

209
210// GetRootObject returns the root object that matches the given name.
211func GetRootObject(ctx context.Context, root objinterface.RootValue, tName doltdb.TableName) (objinterface.RootObject, bool, error) {
212 _, rawID, objID, err := ResolveName(ctx, root, tName)
213 if err != nil || objID == objinterface.RootObjectID_None {
214 return nil, false, err
215 }
216 coll, _ := globalCollections[objID].LoadCollection(ctx, root)
217 return coll.GetRootObject(ctx, rawID)
218}
219
220// GetRootObjectConflicts returns the conflict root object that matches the given name.
221func GetRootObjectConflicts(ctx context.Context, root objinterface.RootValue, tName doltdb.TableName) (conflicts.Conflict, bool, error) {

Callers 1

GetRootObjectMethod · 0.92

Calls 3

ResolveNameFunction · 0.85
LoadCollectionMethod · 0.65
GetRootObjectMethod · 0.65

Tested by

no test coverage detected