Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion soql/parser/core/helpers.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package core

import (
"strings"

. "github.com/shellyln/takenoco/base"
objparser "github.com/shellyln/takenoco/object"
)
Expand Down Expand Up @@ -31,7 +33,7 @@ func makeOpMatcher(className string, ops []string) func(c interface{}) bool {
}
val := ast.Value.(string)
for _, op := range ops {
if op == val {
if strings.EqualFold(op, val) {
return true
}
}
Expand Down
12 changes: 12 additions & 0 deletions soql/parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ func TestParse(t *testing.T) {
want: nil,
wantErr: false,
dbgBreak: true,
}, {
name: "Fix bug (2025-01-08) #1",
args: args{s: `SELECT Id FROM Contact WHERE LastName = 'bar' or (Name = 'bar' and LastName = 'foo')`},
want: nil,
wantErr: false,
dbgBreak: true,
}, {
name: "Fix bug (2025-01-08) #2",
args: args{s: `SELECT Id FROM Contact WHERE LastName = 'bar' OR (Name = 'bar' AND LastName = 'foo')`},
want: nil,
wantErr: false,
dbgBreak: true,
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
Loading