executor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionExecutorList

func ActionExecutorList() []string

func QueryExecutorList

func QueryExecutorList() []string

func RegActionExecutor

func RegActionExecutor(name string, e ActionExecutor)

func RegQueryExecutor

func RegQueryExecutor(name string, e queryExecutorBuilder)

Types

type ActionExecutor

type ActionExecutor interface {
	Insert(ctx context.Context, table string, data any) (id int64, count int64, err error)
	Update(ctx context.Context, table string, data g.Map, where g.Map) (count int64, err error)
	Delete(ctx context.Context, table string, where g.Map) (count int64, err error)
}

func GetActionExecutor

func GetActionExecutor(name string) ActionExecutor

type QueryExecutor

type QueryExecutor interface {
	ParseCondition(conditions g.MapStrAny, accessVerify bool) error
	ParseCtrl(ctrl g.Map) error
	List(page int, count int, needTotal bool) (list []g.Map, total int64, err error)
	One() (g.Map, error)
	EmptyResult()
}

func NewQueryExecutor

func NewQueryExecutor(name string, ctx context.Context, accessVerify bool, role string, access *db.Access) (QueryExecutor, error)

Jump to

Keyboard shortcuts

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