Parse sql query using antlr parsetree to mongo bson document in Java
问题 I have a SQL like query example: Select id,name from employee where age > 30 and department = 'IT' limit 200 The SQL query grammer is defined in an ANTLR4 grammar file. Is there any implementation that converts the parse tree of this query to a bson document? The bson document will then be used to query a mongo db. 回答1: In one of my previous jobs I did something similar: got a query (not an sql, but pretty similar) and translated it to mongo query with antlr. I don't have a code to share,