Documentation
¶
Index ¶
- func New(ctx context.Context, accessVerify bool, role string, access *db.Access) (executor.QueryExecutor, error)
- type ActionExecutor
- func (a *ActionExecutor) Delete(ctx context.Context, table string, where g.Map) (count int64, err error)
- func (a *ActionExecutor) Insert(ctx context.Context, table string, data any) (id int64, count int64, err error)
- func (a *ActionExecutor) Update(ctx context.Context, table string, data g.Map, where g.Map) (count int64, err error)
- type SqlExecutor
- func (e *SqlExecutor) EmptyResult()
- func (e *SqlExecutor) List(page int, count int, needTotal bool) (list []g.Map, total int64, err error)
- func (e *SqlExecutor) One() (g.Map, error)
- func (e *SqlExecutor) ParseCondition(conditions g.MapStrAny, accessVerify bool) error
- func (e *SqlExecutor) ParseCtrl(ctrl g.Map) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionExecutor ¶
type ActionExecutor struct {
DbName string
}
type SqlExecutor ¶
type SqlExecutor struct { Role string //保存where条件 [ ["user_id",">", 123], ["user_id","<=",345] ] Where [][]any Columns []string Order string Group string // 是否最终为空结果, 用于node中中断数据获取 WithEmptyResult bool // contains filtered or unexported fields }
func (*SqlExecutor) EmptyResult ¶
func (e *SqlExecutor) EmptyResult()
func (*SqlExecutor) ParseCondition ¶
func (e *SqlExecutor) ParseCondition(conditions g.MapStrAny, accessVerify bool) error
ParseCondition 解析查询条件 accessVerify 内部调用时, 不校验是否可使用该种查询方式
Click to show internal directories.
Click to hide internal directories.