WP-Query-Builder icon indicating copy to clipboard operation
WP-Query-Builder copied to clipboard

Add getSql public method

Open websteam opened this issue 2 years ago • 1 comments

Hello!

First of all - very nice library :)

It would be nice to add a getSql public method, which would return a string of the produced query. This will be very useful for subqueries for example with IN clauses. Additionally, you could change property access to protected, to make it more flexible with decorators.

websteam avatar Feb 22 '23 20:02 websteam

Hi, unfortunately, the author abandoned this project...

However, do you mean the dump function support for the debugger or nested queries?

For some reason, when you mentioned the decorator pattern, it seemed like a good idea to me, but in my opinion, the builder and the chain of responsibilities are used in the implementation of the query builder. Does the same query builder from Laravel use a decorator? In my opinion, no. I'm just interested in your opinion)

DenisLopatin avatar Apr 27 '24 20:04 DenisLopatin