db

package
v0.0.0-...-50f8553 Latest Latest
Warning

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

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

Documentation

Overview

db

Index

Constants

This section is empty.

Variables

View Source
var Db *sql.DB

Functions

func Exec

func Exec(sql string, args ...interface{}) (sql.Result, error)

func ExecAndErrorResultData

func ExecAndErrorResultData(sql string, args ...interface{}) (sql.Result, *golib.ResultData)

func FilteredSQLInject

func FilteredSQLInject(to_match_str string) bool

正则过滤sql注入的方法 参数 : 要匹配的语句

func Hi

func Hi()

func Query

func Query(sql string, args ...interface{}) (*sql.Rows, error)

func QueryAndErrorResultData

func QueryAndErrorResultData(sql string, args ...interface{}) (*sql.Rows, *golib.ResultData)

func SpliceKeyValue

func SpliceKeyValue(data map[string]string, separator string, separator2 string) string

func SpliceKeyValueForSqlLike

func SpliceKeyValueForSqlLike(data map[string]string, separator string) string

{k1:"v1",k2:"v2"} ==> k1 like %v1% and k2 like %v2%

Types

This section is empty.

Jump to

Keyboard shortcuts

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