rootobject

package
v0.51.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConflict added in v0.51.1

CreateConflict creates a conflict on the given root for the two root objects.

func DeserializeRootObject added in v0.51.1

func DeserializeRootObject(ctx context.Context, rootObjID objinterface.RootObjectID, data []byte) (objinterface.RootObject, error)

DeserializeRootObject calls the same-named function on the collection that matches the ID that was given.

func DiffRootObjects added in v0.51.1

func DiffRootObjects(ctx context.Context, rootObjID objinterface.RootObjectID, fromHash string, ours, theirs, ancestor objinterface.RootObject) ([]objinterface.RootObjectDiff, objinterface.RootObject, error)

DiffRootObjects calls the same-named function on the collection that matches the ID that was given.

func GetFieldType added in v0.51.1

func GetFieldType(ctx context.Context, rootObjID objinterface.RootObjectID, fieldName string) *pgtypes.DoltgresType

GetFieldType calls the same-named function on the collection that matches the ID that was given.

func GetRootObject

GetRootObject returns the root object that matches the given name.

func GetRootObjectConflicts added in v0.51.1

func GetRootObjectConflicts(ctx context.Context, root objinterface.RootValue, tName doltdb.TableName) (conflicts.Conflict, bool, error)

GetRootObjectConflicts returns the conflict root object that matches the given name.

func HandleMerge

HandleMerge handles merging root objects.

func Init

func Init()

Init initializes the package

func LoadAllCollections

func LoadAllCollections(ctx context.Context, root objinterface.RootValue) ([]objinterface.Collection, error)

LoadAllCollections loads and returns all collections from the root.

func LoadCollection

func LoadCollection(ctx context.Context, root objinterface.RootValue, collectionID objinterface.RootObjectID) (objinterface.Collection, error)

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

func PutRootObject

PutRootObject adds the given root object to the respective Collection in the root, returning the updated root.

func RemoveRootObject

func RemoveRootObject(ctx context.Context, root objinterface.RootValue, identifier id.Id, rootObjectID objinterface.RootObjectID) (objinterface.RootValue, error)

RemoveRootObject removes the matching root object from its respective Collection, returning the updated root.

func RemoveRootObjectIfExists added in v0.51.1

func RemoveRootObjectIfExists(ctx context.Context, root objinterface.RootValue, identifier id.Id, rootObjectID objinterface.RootObjectID) (objinterface.RootValue, error)

RemoveRootObjectIfExists removes the matching root object from its respective Collection, returning the updated root. If the root object does not exist, then this will not attempt the deletion.

func ResolveName

ResolveName returns the fully resolved name of the given item (if the item exists). Also returns the type of the item.

func UpdateField added in v0.51.1

func UpdateField(ctx context.Context, rootObjID objinterface.RootObjectID, rootObject objinterface.RootObject, fieldName string, newValue any) (objinterface.RootObject, error)

UpdateField calls the same-named function on the collection that matches the ID that was given.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL