Comments (2)
@yaacov thanks! 🙏
from tree-search-language.
Hi, thanks for the issue ❤️
TSL language definition and implementations:
So TSL has two sets of string operators for "like":
1 - The SQL like:
https://github.com/yaacov/tree-search-language/blob/master/pkg/tsl/consts.go#L33
https://github.com/yaacov/tree-search-language/blob/master/pkg/tsl/consts.go#L34
2 - The NoSQL regexp:
RegexOp: https://github.com/yaacov/tree-search-language/blob/master/pkg/tsl/consts.go#L31
I did not implement all the operator in all the walkers ... , for example the SQL implementation did not implement the regexp
operator, while the mongo one will skip the like
.
tsl_mem
./tsl-mem example use the semantic walker to implement an in memory database:
https://github.com/yaacov/tree-search-language/blob/master/cmd/tsl_mem/main.go#L31
Semantic Walker
When giving semantic meaning to the operators in semantic pkg ( https://godoc.org/github.com/yaacov/tree-search-language/pkg/walkers/semantics ) I only implemented the Regexp operator:
In the function that handle string operators:
https://github.com/yaacov/tree-search-language/blob/master/pkg/walkers/semantics/walk.go#L192
I only implemented:
RegExp:
https://github.com/yaacov/tree-search-language/blob/master/pkg/walkers/semantics/walk.go#L212
And like falls into unexpected literal here:
https://github.com/yaacov/tree-search-language/blob/master/pkg/walkers/semantics/walk.go#L226
P.S.
This will also happen in the mongo walker:
https://github.com/yaacov/tree-search-language/blob/master/pkg/walkers/mongo/walk.go#L79
That only implement Regexp:
https://github.com/yaacov/tree-search-language/blob/master/pkg/walkers/mongo/walk.go#L110
But not in the SQL walker 😄 :
https://github.com/yaacov/tree-search-language/blob/master/pkg/walkers/sql/walk.go#L139
from tree-search-language.
Related Issues (4)
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 tree-search-language.