mysql_mixed_expr

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StdExecutor = New(nil, nil, nil)

Functions

This section is empty.

Types

type Executor

type Executor struct {

	// KeyMap 字段映射
	// 	存在映射 => key 转换为映射值
	//
	// 		字段存在 '.',则第一个 '.' 前面作为字段名,后面作为 json 属性名
	// 		不存在 '.',则整体作为字段名
	KeyMap map[string]string
	// contains filtered or unexported fields
}

func New

func New(mysqlExecutor *mysql_expr.Executor, jsonExecutor *mysql_json_expr.Executor, keyMap map[string]string) *Executor

func (*Executor) DoAst

func (e *Executor) DoAst(ast *expression.AstNode, prefix, suffix string) (sqls string, params []any, keys []string)

DoAst 执行 ast

func (*Executor) DoExpr

func (e *Executor) DoExpr(expr string, prefix, suffix string) (sqls string, params []any, keys []string, err error)

DoExpr 执行表达式

func (*Executor) DoTerm

func (e *Executor) DoTerm(term *expression.AstNode, prefix, suffix string) (sql string, params []any, keys []string)

DoTerm 执行 term

Jump to

Keyboard shortcuts

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