Documentation
¶
Index ¶
- type Collection
- func (pge *Collection) AddLoadedExtension(ctx context.Context, ext Extension) error
- func (pge *Collection) DeserializeRootObject(ctx context.Context, data []byte) (objinterface.RootObject, error)
- func (pge *Collection) DiffRootObjects(ctx context.Context, fromHash string, ours objinterface.RootObject, ...) ([]objinterface.RootObjectDiff, objinterface.RootObject, error)
- func (pge *Collection) DropLoadedExtension(ctx context.Context, names ...id.Extension) error
- func (pge *Collection) DropRootObject(ctx context.Context, identifier id.Id) error
- func (pge *Collection) GetFieldType(ctx context.Context, fieldName string) *pgtypes.DoltgresType
- func (pge *Collection) GetID() objinterface.RootObjectID
- func (pge *Collection) GetLoadedExtension(ctx context.Context, name id.Extension) (Extension, error)
- func (pge *Collection) GetRootObject(ctx context.Context, identifier id.Id) (objinterface.RootObject, bool, error)
- func (*Collection) HandleMerge(ctx context.Context, mro merge.MergeRootObject) (doltdb.RootObject, *merge.MergeStats, error)
- func (pge *Collection) HasLoadedExtension(ctx context.Context, name id.Extension) bool
- func (pge *Collection) HasRootObject(ctx context.Context, identifier id.Id) (bool, error)
- func (pge *Collection) IDToTableName(identifier id.Id) doltdb.TableName
- func (pge *Collection) IterAll(ctx context.Context, ...) error
- func (pge *Collection) IterIDs(ctx context.Context, callback func(identifier id.Id) (stop bool, err error)) error
- func (*Collection) LoadCollection(ctx context.Context, root objinterface.RootValue) (objinterface.Collection, error)
- func (pge *Collection) PutRootObject(ctx context.Context, rootObj objinterface.RootObject) error
- func (pge *Collection) RenameRootObject(ctx context.Context, oldName id.Id, newName id.Id) error
- func (pge *Collection) ResolveName(ctx context.Context, name doltdb.TableName) (doltdb.TableName, id.Id, error)
- func (*Collection) ResolveNameFromObjects(ctx context.Context, name doltdb.TableName, ...) (doltdb.TableName, id.Id, error)
- func (*Collection) Serializer() objinterface.RootObjectSerializer
- func (pge *Collection) TableNameToID(name doltdb.TableName) id.Id
- func (pge *Collection) UpdateField(ctx context.Context, rootObject objinterface.RootObject, fieldName string, ...) (objinterface.RootObject, error)
- type Extension
- func (ext Extension) CompareVersions(other Extension) int
- func (ext Extension) GetID() id.Id
- func (ext Extension) GetRootObjectID() objinterface.RootObjectID
- func (ext Extension) HashOf(ctx context.Context) (hash.Hash, error)
- func (ext Extension) Name() doltdb.TableName
- func (ext Extension) Serialize(ctx context.Context) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
objinterface.RootObjectMap
// contains filtered or unexported fields
}
Collection contains a collection of loaded extensions.
func LoadExtensions ¶
func LoadExtensions(ctx context.Context, root objinterface.RootValue) (*Collection, error)
LoadExtensions loads the extensions collection from the given root.
func NewCollection ¶
func NewCollection(ctx context.Context, rom objinterface.RootObjectMap) (*Collection, error)
NewCollection returns a new Collection.
func (*Collection) AddLoadedExtension ¶
func (pge *Collection) AddLoadedExtension(ctx context.Context, ext Extension) error
AddLoadedExtension adds a new extension, that has already been loaded, to the collection.
func (*Collection) DeserializeRootObject ¶ added in v0.51.1
func (pge *Collection) DeserializeRootObject(ctx context.Context, data []byte) (objinterface.RootObject, error)
DeserializeRootObject implements the interface objinterface.Collection.
func (*Collection) DiffRootObjects ¶ added in v0.51.1
func (pge *Collection) DiffRootObjects(ctx context.Context, fromHash string, ours objinterface.RootObject, theirs objinterface.RootObject, ancestor objinterface.RootObject) ([]objinterface.RootObjectDiff, objinterface.RootObject, error)
DiffRootObjects implements the interface objinterface.Collection.
func (*Collection) DropLoadedExtension ¶
DropLoadedExtension drops a loaded extension. This should be called when unloading an extension, but this function itself does not perform the necessary logic.
func (*Collection) DropRootObject ¶
DropRootObject implements the interface objinterface.Collection.
func (*Collection) GetFieldType ¶ added in v0.51.1
func (pge *Collection) GetFieldType(ctx context.Context, fieldName string) *pgtypes.DoltgresType
GetFieldType implements the interface objinterface.Collection.
func (*Collection) GetID ¶
func (pge *Collection) GetID() objinterface.RootObjectID
GetID implements the interface objinterface.Collection.
func (*Collection) GetLoadedExtension ¶
func (pge *Collection) GetLoadedExtension(ctx context.Context, name id.Extension) (Extension, error)
GetLoadedExtension returns the loaded extension with the given name. Returns an extension with an invalid ID if it cannot be found.
func (*Collection) GetRootObject ¶
func (pge *Collection) GetRootObject(ctx context.Context, identifier id.Id) (objinterface.RootObject, bool, error)
GetRootObject implements the interface objinterface.Collection.
func (*Collection) HandleMerge ¶
func (*Collection) HandleMerge(ctx context.Context, mro merge.MergeRootObject) (doltdb.RootObject, *merge.MergeStats, error)
HandleMerge implements the interface objinterface.Collection.
func (*Collection) HasLoadedExtension ¶
HasLoadedExtension returns whether the extension has been loaded.
func (*Collection) HasRootObject ¶
HasRootObject implements the interface objinterface.Collection.
func (*Collection) IDToTableName ¶
func (pge *Collection) IDToTableName(identifier id.Id) doltdb.TableName
IDToTableName implements the interface objinterface.Collection.
func (*Collection) IterAll ¶
func (pge *Collection) IterAll(ctx context.Context, callback func(rootObj objinterface.RootObject) (stop bool, err error)) error
IterAll implements the interface objinterface.Collection.
func (*Collection) IterIDs ¶
func (pge *Collection) IterIDs(ctx context.Context, callback func(identifier id.Id) (stop bool, err error)) error
IterIDs implements the interface objinterface.Collection.
func (*Collection) LoadCollection ¶
func (*Collection) LoadCollection(ctx context.Context, root objinterface.RootValue) (objinterface.Collection, error)
LoadCollection implements the interface objinterface.Collection.
func (*Collection) PutRootObject ¶
func (pge *Collection) PutRootObject(ctx context.Context, rootObj objinterface.RootObject) error
PutRootObject implements the interface objinterface.Collection.
func (*Collection) RenameRootObject ¶
RenameRootObject implements the interface objinterface.Collection.
func (*Collection) ResolveName ¶
func (pge *Collection) ResolveName(ctx context.Context, name doltdb.TableName) (doltdb.TableName, id.Id, error)
ResolveName implements the interface objinterface.Collection.
func (*Collection) ResolveNameFromObjects ¶ added in v0.51.1
func (*Collection) ResolveNameFromObjects(ctx context.Context, name doltdb.TableName, rootObjects []objinterface.RootObject) (doltdb.TableName, id.Id, error)
ResolveNameFromObjects implements the interface objinterface.Collection.
func (*Collection) Serializer ¶
func (*Collection) Serializer() objinterface.RootObjectSerializer
Serializer implements the interface objinterface.Collection.
func (*Collection) TableNameToID ¶
func (pge *Collection) TableNameToID(name doltdb.TableName) id.Id
TableNameToID implements the interface objinterface.Collection.
func (*Collection) UpdateField ¶ added in v0.51.1
func (pge *Collection) UpdateField(ctx context.Context, rootObject objinterface.RootObject, fieldName string, newValue any) (objinterface.RootObject, error)
UpdateField implements the interface objinterface.Collection.
type Extension ¶
type Extension struct {
ExtName id.Extension
Namespace id.Namespace
Relocatable bool
Version string
}
Extension represents an extension that has been installed into a database.
func DeserializeExtension ¶
DeserializeExtension returns the Extension that was serialized in the byte slice. Returns an empty Extension (has an invalid ID) if data is nil or empty.
func (Extension) CompareVersions ¶
CompareVersions compares the version of the extension versus the given extension, as opaque strings.
func (Extension) GetRootObjectID ¶ added in v0.51.1
func (ext Extension) GetRootObjectID() objinterface.RootObjectID
GetRootObjectID implements the interface objinterface.RootObject.