sqlutil

package
v0.0.5-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEntity

func GetEntity(ctx context.Context, sqlxCtx metadata.SqlxContext, id int) (*types.Entity, error)

func GetEntityByName

func GetEntityByName(ctx context.Context, sqlxCtx metadata.SqlxContext, name string) (*types.Entity, error)

func GetFeature

func GetFeature(ctx context.Context, sqlxCtx metadata.SqlxContext, id int) (*types.Feature, error)

func GetFeatureByName

func GetFeatureByName(ctx context.Context, sqlxCtx metadata.SqlxContext, groupName string, featureName string) (*types.Feature, error)

func GetGroup

func GetGroup(ctx context.Context, sqlxCtx metadata.SqlxContext, id int) (*types.Group, error)

func GetGroupByName

func GetGroupByName(ctx context.Context, sqlxCtx metadata.SqlxContext, name string) (*types.Group, error)

func GetRevision

func GetRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, id int) (*types.Revision, error)

func GetRevisionBy

func GetRevisionBy(ctx context.Context, sqlxCtx metadata.SqlxContext, groupID int, revision int64) (*types.Revision, error)

func ListEntity

func ListEntity(ctx context.Context, sqlxCtx metadata.SqlxContext, entityIDs *[]int) (types.EntityList, error)

func ListMetadata

func ListMetadata(ctx context.Context, db *sqlx.DB) (*informer.Cache, error)

func ListRevision

func ListRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, groupID *int) (types.RevisionList, error)

func UpdateEntity

func UpdateEntity(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.UpdateEntityOpt) error

func UpdateFeature

func UpdateFeature(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.UpdateFeatureOpt) error

func UpdateGroup

func UpdateGroup(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.UpdateGroupOpt) error

func UpdateRevision

func UpdateRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.UpdateRevisionOpt) error

UpdateRevision = MustUpdateRevision If fail to update any row or update more than one row, return error

Types

This section is empty.

Jump to

Keyboard shortcuts

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