Documentation ¶
Index ¶
- func FormatSpace(sql string) string
- func ParseCountSql(sql string) string
- func ParseNamedSql(dia dialect.Interface, sql string, args map[string]interface{}) (sqlout string, argsout []interface{}, err error)
- func ParseTemplateSql(sql string, args map[string]interface{}) (out string, err error)
- func SetPriority(value int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSpace ¶
FormatSpace remove superfluous spaces in the SQL statement
func ParseCountSql ¶
ParseCountSql select ... from ... -> select count(1) from ...
func ParseNamedSql ¶
func ParseNamedSql(dia dialect.Interface, sql string, args map[string]interface{}) (sqlout string, argsout []interface{}, err error)
ParseNamedSql takes a query using named parameters and an argument and returns a new query with a list of args that can be executed by a database.
func ParseTemplateSql ¶
ParseTemplateSql takes a query using named parameters and an argument and returns a new query with a list of args that can be executed by a database.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.