summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/mapr/token.go4
-rw-r--r--internal/mapr/wherecondition.go1
2 files changed, 3 insertions, 2 deletions
diff --git a/internal/mapr/token.go b/internal/mapr/token.go
index 6ac7631..bbf4890 100644
--- a/internal/mapr/token.go
+++ b/internal/mapr/token.go
@@ -37,7 +37,7 @@ func tokenize(queryStr string) []token {
commasStripped := strings.Replace(part, ",", " ", -1)
for _, tokenStr := range strings.Fields(commasStripped) {
token := token{
- str: tokenStr,
+ str: strings.ToLower(tokenStr),
isBareword: true,
}
tokens = append(tokens, token)
@@ -71,7 +71,7 @@ func tokensConsume(tokens []token) ([]token, []token) {
stripped := t.str[1 : length-1]
//dlog.Common.Trace("stripped", stripped)
t := token{
- str: stripped,
+ str: strings.ToLower(stripped),
isBareword: t.isBareword,
}
consumed = append(consumed, t)
diff --git a/internal/mapr/wherecondition.go b/internal/mapr/wherecondition.go
index 280dcfb..c2dd2a1 100644
--- a/internal/mapr/wherecondition.go
+++ b/internal/mapr/wherecondition.go
@@ -54,6 +54,7 @@ func (wc *whereCondition) String() string {
func makeWhereConditions(tokens []token) (where []whereCondition, err error) {
parse := func(tokens []token) (whereCondition, []token, error) {
+
var wc whereCondition
if len(tokens) < 3 {
err := errors.New(invalidQuery + "Not enough arguments in 'where' clause")