sql

package
v1.20.10 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 11 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, model interface{}, tables ...string) (sqlKey string, argsKey []interface{})

more tables key search sql tables [table1:table1_alias] searModel : 搜索字段模型

func GetSQLError

func GetSQLError(error string) (err error)

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

func StructWhereSQL added in v1.8.6

func StructWhereSQL(st interface{}) (sql string, args []interface{})

struct to where sql return key1 = value1 and key2 = value2...

func Table added in v1.8.9

func Table(table string) string

table parse

Types

type Key added in v1.20.1

type Key struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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