MySQL select statement tests.

This commit is contained in:
go-jet 2019-08-01 16:56:54 +02:00
parent 449cd9fd8f
commit 6af43f0c46
22 changed files with 65812 additions and 47193 deletions

View file

@ -172,10 +172,10 @@ func (q *sqlBuilder) writeString(str string) {
q.write([]byte(str))
}
func (q *sqlBuilder) writeIdentifier(name string) {
func (q *sqlBuilder) writeIdentifier(name string, alwaysQuote ...bool) {
quoteWrap := name != strings.ToLower(name) || strings.ContainsAny(name, ". -")
if quoteWrap {
if quoteWrap || len(alwaysQuote) > 0 {
identQuoteChar := string(q.dialect.IdentifierQuoteChar)
q.writeString(identQuoteChar + name + identQuoteChar)
} else {