3 ms·
Neat! I did an exploration of sql parsers in different languages [0] and couldn't find much for python. But between this project itself and the couple it lists
by eatonphil 4y ago
Neat! I did an exploration of sql parsers in different languages [0] and couldn't find much for python. But between this project itself and the couple it lists in the benchmarks I have a few more to look at.
[0] https://datastation.multiprocess.io/blog/2022-04-11-sql-parsers.html https://datastation.multiprocess.io/blog/2022-04-11-sql-pars...
- hrgiger 4y agoIt reminds me what compilerworks doing also, I didnt test it tough can not judge similarities https://www.compilerworks.com/technology/ https://www.compilerworks.com/technology/
- captaintobs 4y agoAwesome, let me know if you have any questions or suggestions if you check it out!
- contravariant 4y agoYou were a bit too quick in dismissing sqlparse. I had the same initial reaction but it does actually build a tree, more or less, by grouping together tokens. It doesn't build a full syntax tree, though. For instance, it doesn't attempt to identify the FROM or JOINs from a select statement for instance, but it does make sure to group things such that a FROM keyword following a SELECT is part of the same SELECT statement. This makes it flexible but does leave you with slightly more work (though it worked well enough for my purposes).