Hi, allWe are trying to work with some pre-built queries for Postgres and Mysql and we need to parse them to programatically change some clauses.Essentially we need to add some extra clauses to the WHERE block of said queries. The original queries are not modifiable in the source for other technical reasons and thus the need for this new code.We were trying to use node-sql-parserfor the job but it won't support more complex queries, it seems.Do you guys know of any good library that could properly decompose queries in some kind of structure so we could do this properly?The other dirt alternative would be for us to write some regex to capture the existing Where conditions and append some new rules, but that would also mean that we need to capture the current table name and alias to write the new conditions correctly.Any help is appreciated.
Submitted December 09, 2019 at 11:25PM by schedulle-cate
No comments:
Post a Comment