sqls

package
v0.0.0-...-82e7740 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: MIT Imports: 10 Imported by: 0

README

util-sqls GoDoc

sql util library for Go

Installation

go get gopkg.in/goyy/goyy.v0/util/sqls

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSpace

func FormatSpace(sql string) string

FormatSpace remove superfluous spaces in the SQL statement

func ParseCountSql

func ParseCountSql(sql string) string

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

func ParseTemplateSql(sql string, args map[string]interface{}) (out string, err error)

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.

func SetPriority

func SetPriority(value int)

SetPriority set the priority of the logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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