Skip to content

Commit 980b74c

Browse files
author
Jan Was
committed
add extra operators when looking for keywords in stmt.bind
1 parent 60cb4d4 commit 980b74c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stmt.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bytes"
55
"context"
66
"database/sql/driver"
7+
"unicode"
78

89
"github.com/kshvakov/clickhouse/lib/data"
910
)
@@ -138,13 +139,17 @@ func (stmt *stmt) bind(args []driver.NamedValue) string {
138139
char == '(',
139140
char == ',',
140141
char == '%',
142+
char == '+',
143+
char == '-',
144+
char == '*',
145+
char == '/',
141146
char == '[':
142147
keyword = true
143148
default:
144149
if limit.matchRune(char) {
145150
keyword = true
146151
} else {
147-
keyword = keyword && (char == ' ' || char == '\t' || char == '\n')
152+
keyword = keyword && unicode.IsSpace(char)
148153
}
149154
}
150155
buf.WriteRune(char)

0 commit comments

Comments
 (0)