Change to IdentQuote, add IdentQuote to Select QM

This commit is contained in:
Patrick O'brien 2016-08-02 13:25:02 +10:00
parent b171fd42ba
commit fb8540af1a
5 changed files with 16 additions and 8 deletions
strmangle

View file

@ -19,8 +19,8 @@ var (
smartQuoteRgx = regexp.MustCompile(`^(?i)"?[a-z_][_a-z0-9]*"?(\."?[_a-z][_a-z0-9]*"?)*$`)
)
// SmartQuote intelligently quotes identifiers in sql statements
func SmartQuote(s string) string {
// IdentQuote attempts to quote simple identifiers in SQL tatements
func IdentQuote(s string) string {
if s == "null" {
return s
}