Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 595 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 595 Bytes

sqlstring

Simple SQL escape and format

Go GoDoc

Escaping sql values

//Format
sql := sqlstring.Format("select * from users where name=? and age=? limit ?,?", "t'est", 10, 10, 10)

fmt.Printf("sql: %s",sql)

//Escape
sql = "select * from users WHERE name = " + sqlstring.Escape(name);
fmt.Printf("sql: %s",sql)

License

MIT