Versions in this module Expand all Collapse all v0 v0.4.1 Apr 7, 2024 Changes in this version + const Delete + const For + const If + const Insert + const Mapper + const MySQL + const PostgreSQL + const Select + const Update + const VALUE + const VALUES + const Value + const Values + const WHERE + const Where + var Null = map[string]bool + func Analysis(element *etree.Element, ctx map[string]any) ([]string, string, []string, []any, error) + func AnalysisExpr(template string) string + func AnalysisForTemplate(template string, ctx map[string]any, v any) (string, string, []any, error) + func AnalysisTemplate(template string, ctx map[string]any) (string, string, []any, error) + func Args(db reflect.Value, values []reflect.Value) (ctx reflect.Value, args map[string]any, tx reflect.Value, auto bool) + func BaseTypeKey(v reflect.Value) string + func DatabaseType(key string, dataType ToDatabase) + func Element(element *etree.Element, template string, ctx map[string]any) (string, string, []any, error) + func End(tag string, auto bool, result []reflect.Value, ...) + func ExecResultMapper(result []reflect.Value, exec sql.Result) (count int64, err error) + func ForElement(element *etree.Element, template string, ctx map[string]any) (string, string, []any, error) + func GolangType(key string, dataType ToGolang) + func IfElement(element *etree.Element, template string, ctx map[string]any) (string, string, []any, error) + func MapperCheck(fun reflect.Value) (bool, error) + func Namespace(namespace string) string + func NullConfig(null any) + func QueryResultMapper(value reflect.Value, result []reflect.Value) + func ResultMapping(value any) map[string]string + func Return(result []reflect.Value) (ret []reflect.Value) + func SelectCheck(columns []string, resultType any) (bool, error) + func StatementElement(element *etree.Element, template string, ctx map[string]any) (string, string, []any, error) + func TimeData(value reflect.Value, data any) error + func TimeDataPointer(value reflect.Value, data any) error + func ToDatabaseTime(data any) (any, error) + func ToDatabaseTimePointer(data any) (any, error) + func TypeKey(t any) string + func UnTemplate(template string) string + type Combine struct + Separator string + Template string + Value any + func (c Combine) ForEach() (string, string, []any, error) + type GoBatis struct + NameSpaces map[string]*Sql + SqlSource string + Type int + func New(db *sql.DB) *GoBatis + func (batis *GoBatis) Load(files embed.FS) + func (batis *GoBatis) LoadByRootPath(root string, files embed.FS) + func (batis *GoBatis) Logs(logger *zap.Logger) + func (batis *GoBatis) ScanMappers(mappers ...any) + func (batis *GoBatis) Source(source string) + type MapperFunc func([]reflect.Value) []reflect.Value + type Other struct + func (s Other) ForEach(value any, template string, separator string) (string, string, []any, error) + type Politic interface + ForEach func(value any, template string, separator string) (string, string, []any, error) + type Slice struct + func (s Slice) ForEach(value any, template string, separator string) (string, string, []any, error) + type Sql struct + Element *etree.Element + Statement map[string]*etree.Element + func NewSql(root *etree.Element) *Sql + func (receiver *Sql) LoadSqlElement() + type Struct struct + func (s Struct) ForEach(value any, template string, separator string) (string, string, []any, error) + type ToDatabase func(data any) (any, error) + type ToGolang func(value reflect.Value, data any) error