|
|
|
|
|
by ofiryanai
1759 days ago
|
|
Hi all, I have a bit off topic question but seems related. I'm trying to write sort of a SQL compiler. The current goal is to analyze queries and find similarities, later maybe to translate between sql dialects.
I found Uber's QueryParser[1] but it's in haskell, so I started wrapping the python sqlparse[2] library and implement a Visitor to traverse their weird AST.
1. How close is it to implementing a compiler?
2. Is there theory you can suggest further reading for that matter?
3. Would you use a different language/library then I picked? Thanks :) [1] https://github.com/uber/queryparser
[2] https://github.com/andialbrecht/sqlparse |
|
[1] https://www.antlr.org/
[2] https://github.com/antlr/grammars-v4