-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for overwriting of query segements #2
Comments
Maybe select() method should be same as is, but add method replaceSelect(). IMO basic methods should be as simple as possible, and methods that came outside the basic functionality can have more complicated names, because these methods will be used rare, and developers to use them almost always came to DOC to read how do this. Also, You can always write Your own QueryBuilder and QueryBuilderFactory and extends this code, and add methods that You need, in the way you need. There is realy more to extends, this code is open for modifications by extending :) |
The other option is to use default parameters, like an I hear you though, I am not opposed to inheriting, especially cause this is an edge case. You are welcome to close this issue. |
Can You describe little this idea with parameter? |
Just looked at the code again, it wouldn't work because |
I add remove*() methods, that allows to remove each query segment, like: removeSelects(), removeWheres(), removeLimit(), etc. |
Hey,
Came across a use case that, while maybe possible, is probably not great. I am busy building large query objects, and in an inheritance case, I want to overwrite the selects. I do understand that this is a little bit of an edge case. It would good however to have
select
andaddSelect
which will allow for this.select
would overwrite the selects andaddSelect
would append.Later.
The text was updated successfully, but these errors were encountered: