Hi! And thanks for the response š
Youāre right, this could hurt performance but probably much fixable than other query builders since we can isolate the sub queries and fix their score one at a time. Plus, the queries are in pure SQL so an experienced DBA can help with the query performance.
That being said, I know that long running projects like ActiveRecord are battle tested and they got lots of eyes benchmarking and fixing performance issues.
I think the best (and the worst) thing about my method is that itās not opinionated at all, what could lead to better performance on every specific application, e.g pagination custom logic or usage of stored procedures.
If our Query class has limit, pagination and conditionsāāāit becomes a solution to very specific use case. What about JOINs and stored procedures? Using custom indexes? No matter how well we build it, JSQL, our JavaScript-to-SQL DSL, will be weaker than SQL since we have to implement a nice DSL for every database implementation and feature. Moreover, we couldnāt compose queriesāāāso Iāll probably repeat myself in many queries.
Thanks for the response again š