Comments (7)
因为我的yql_test.go也是package yql,是同一个包,因此可以使用包中的私有变量
from yql.
嗯,谢谢~
我在使用Match匹配规则时,传入的参数中包含有map,那么规则应该怎么写呢,我尝试的写了一下,似乎不是我预期的值,正在学习你的源码,限于刚接触不久的golang,水平着实有限,肯请指教~谢谢!以下是我添加的部分代码
rawYQL =
score in (7,1,9,5,3) and hobby.key in ('soccer', 'swim') m := map[string]string{"key":"soccer"} result, _ = yql.Match(rawYQL, map[string]interface{}{ "score": []int64{3, 5, 1}, "hobby": m, }) fmt.Println(result)
from yql.
@luciferofwg 以上语法是不支持 hobby.key这种变量访问方式,目前只支持和sql一样直接引用变量名。你上面的例子应该改写为:
rawYQL = score in (7,1,9,5,3) and hobby_key in ('soccer', 'swim')
result, _ = yql.Match(rawYQL, map[string]interface{}{ "score": []int64{3, 5, 1}, "hobby_key": m["key"], })
from yql.
只有lambda表达式中才支持a.b这样的语法
from yql.
只有lambda表达式中才支持a.b这样的语法
嗯,谢谢版主~
from yql.
@luciferofwg 以上语法是不支持 hobby.key这种变量访问方式,目前只支持和sql一样直接引用变量名。你上面的例子应该改写为:
rawYQL = score in (7,1,9,5,3) and hobby_key in ('soccer', 'swim') result, _ = yql.Match(rawYQL, map[string]interface{}{ "score": []int64{3, 5, 1}, "hobby_key": m["key"], })
不支持?
4 Jun 2018: #1 (comment)
到底支持还是不支持?
from yql.
@sdghchj YQL有两部分,一部分是sql,这部分不支持nested object。另一部分是lambda,这部分是支持的
from yql.
Related Issues (14)
- support for nested fields? HOT 2
- Ambiguous import problem with the antlr module
- yql没有release版本吗 HOT 7
- lambda.Filter能用了吗? HOT 1
- Consider migrating to "github.com/antlr/antlr4/runtime/Go/antlr/v4" HOT 2
- 你好请问能支持like语法吗 HOT 1
- [BUG] if string is a constant expr not containing any variable, the result is wrong HOT 1
- increase compatibility with json.Number to avoid accuracy loss of int
- License HOT 2
- Benchmarks HOT 1
- In operator has problems in some cases HOT 1
- 运算符支持 HOT 2
- String Array HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yql.