Experimenting.

This commit is contained in:
Azareal 2017-11-13 00:36:31 +00:00
parent f907b2f80c
commit 0572c3e048
1 changed files with 4 additions and 3 deletions

View File

@ -112,11 +112,12 @@ func (where *DBWhere) parseColumn(segment string, i int) int {
var buffer string var buffer string
for ; i < len(segment); i++ { for ; i < len(segment); i++ {
char := segment[i] char := segment[i]
if ('a' <= char && char <= 'z') || ('A' <= char && char <= 'Z') || char == '.' || char == '_' { switch {
case ('a' <= char && char <= 'z') || ('A' <= char && char <= 'Z') || char == '.' || char == '_':
buffer += string(char) buffer += string(char)
} else if char == '(' { case char == '(':
return where.parseFunction(segment, buffer, i) return where.parseFunction(segment, buffer, i)
} else { default:
i-- i--
where.Expr = append(where.Expr, DBToken{buffer, "column"}) where.Expr = append(where.Expr, DBToken{buffer, "column"})
return i return i