caibirdme / yql Goto Github PK
View Code? Open in Web Editor NEWyet another query language for rule engine in golang
License: MIT License
yet another query language for rule engine in golang
License: MIT License
Do you mind adding a license to this?
Hey,
Just stumbled across this project, looks amazing. Really curious to see how it compares against other similar projects like in terms of execution performance (not parse/check):
不能支持与、或、异或这种运算吗
It seems that v1
module of github.com/antlr/antlr4/runtime/Go/antlr
has been deprecated.
https://github.com/antlr/antlr4/blob/master/runtime/Go/antlr/go.mod
// Deprecated: Please switch to the new v4 module path: github.com/antlr/antlr4/runtime/Go/antlr/v4 - see https://github.com/antlr/antlr4/blob/master/doc/go-target.md
module github.com/antlr/antlr4/runtime/Go/antlr
The new module is github.com/antlr/antlr4/runtime/Go/antlr/v4
and it fit more properly with the idiomatic ways of Go than v1
module. For example, migrating to v4
may reduce the likehood of ambiguous import error related to antlr.
Is there any plan to migrate to github.com/antlr/antlr4/runtime/Go/antlr/v4
? If so, this doc may help.
Is there support for querying on nested fields?
Given this sample:
{
"src_ip":"127.0.0.1",
"event":{
"Event":{
"Process":{
"type":2,
"exec_filename":"/usr/bin/dig",
"exec_command_line":[
"dig",
"+short",
"ifjeow0234f90iwefo2odj.wat.lol"
]
}
}
}
}
Can I do something like these queries using this library?
event.Event.Process.exec_filename='/usr/bin/dig' and src_ip='127.0.0.1'
How about querying a nested array?
src_ip='127.0.0.1' and 'ifjeow0234f90iwefo2odj.wat.lol' in event.Event.Process.exec_command_line
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
Hello, Is it possible to match string array?
rawYQL = stringArray in ('test1')
result, _ = yql.Match(rawYQL, map[string]interface{}{
"stringArray": []string{"test1","test2"},
})
Using encoding/json to marshal/unmarshal a map may cause accuracy loss of int. In terms of this condition, we can use json.Number to avoid. Now I update yql by adding compatibility with json.Number
你好请问能支持like语法吗
如题。。 我看文档里写着处于非常早期的阶段不建议生产使用。
我的场景里只有A==X || B==Y
版主,你好!
在学习你的代码的过程中,发现几个问题,想请教一下。
在文件 yql_test.go 中引用yql包中的部分接口函数时,并没有使用yql.Match 并且 使用的常量 epsilon 也是不能直接引用的,不知道是我这边环境的问题还是代码问题?
The import needs to be updated in go.mod
in accordance to the newest changes made to the antlr package, or the versioning should be limited so that it only downloads the compatible version.
github.com/test_user/test_repo imports
github.com/caibirdme/yql imports
github.com/antlr/antlr4/runtime/Go/antlr: ambiguous import: found package github.com/antlr/antlr4/runtime/Go/antlr in multiple modules:
github.com/antlr/antlr4 v0.0.0-20210121092344-5dce78c87a9e (/Users/me/go/pkg/mod/github.com/antlr/[email protected]/runtime/Go/antlr)
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e (/Users/me/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected])
Antlr issue: antlr/antlr4#3188
yql没有release版本吗
If there is only one option, always return an error,example,
rawSQL := hobby in ('swim')
, data := map[string]interface{}{"hobby": "swim"}
will return false
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.