sqls

package
v0.4.28 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegSpace = regexp.MustCompile(regSpace)

Functions

func BatchDelete

func BatchDelete(table, primaryKey string, count int) string

BatchDelete 生成批量删除SQL.

func BatchInsert

func BatchInsert(sql string, num int) string

BatchInsert 生成批量插入SQL.

func Count

func Count(sql string) string

Count 计数SQL.

func Offset

func Offset(count, limit int) []int

Offset 倒叙生成offset,防止丢数据.

func Params

func Params(sql string) ([]string, string)

Params 参数及去除参数的SQL.

func TableName

func TableName(sql string) string

TableName sql语句中获取表名.

func TableNames

func TableNames(sql string) (string, string)

TableNames 数据库名及表名.

Types

This section is empty.

Jump to

Keyboard shortcuts

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