sql

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeySQL

func GetKeySQL(key string, model interface{}, alias string) (sqlKey string, argsKey []interface{})

key search sql

func GetMoreKeySQL

func GetMoreKeySQL(key string, searModel interface{}, tables ...string) (sqlKey string, argsKey []interface{})

多张表, 第一个表为主表 key search sql tables [table1:table1_alias] searModel : 搜索字段模型

func GetReflectTags

func GetReflectTags(ref reflect.Type) (tags []string)

层级递增解析tag

func GetSQLError

func GetSQLError(error string) (err error)

数据库错误过滤、转换(友好提示)

func GetTags

func GetTags(model interface{}) []string

根据model中表模型的json标签获取表字段 将select* 变为对应的字段名

func GtTag

func GtTag(structTag reflect.StructTag, curTag string) (oTag, tag, tagTable string, b bool)

get tag

Types

This section is empty.

Jump to

Keyboard shortcuts

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