caibirdme / yql

yet another query language for rule engine in golang
MIT License
311 stars 52 forks source link

[BUG] if string is a constant expr not containing any variable, the result is wrong #15

Open wangzhanbing opened 11 months ago

wangzhanbing commented 11 months ago

if string is a constant expr not containing any variable, the result is wrong for example

rawYQL = "3>1"
result, err = yql.Match(rawYQL, map[string]interface{}{})
fmt.Println(rawYQL, "is ", result, "err: ", err)

# Output: 3>1 is  false err:  <nil>

expect result is true

wangzhanbing commented 10 months ago

Do you have expected time fixing this bug ?

otherwise, I think we can add a parameter to config whether to ignore upper or lower in expr