-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Add optional parameter to like(), or_like(), not_like() and or_not_like() methods. #5643
base: develop
Are you sure you want to change the base?
Conversation
…) and or_not_like() methods. which can be used to choose whether use those methods with WHERE clause or HAVING clause.
This is parameter creep ... It may look inconsistent, but a better option would be to just have And you must follow the styleguide. |
…or_not_having_like() methods.
You're still ignoring the styleguide ... |
Is there anything I have to do in order to make this PR get merged? |
Yes, there are still some spaces left in on lines 1100, 1171 (shown in diff with darker green). And there's more significant stuff code-wise, but it will probably result in a lot of back and forth if I asked you to do all of it, so I can make those changes myself after merging. It's decent enough as it is, I just want less repetition. |
…ng_group_start(), or_not_having_group_start() and having_group_end() methods for HAVING clause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the code doesn't match PSR-2 rules
Yes, all of CodeIgniter doesn't match PSR-2 rules. We have our own styleguide, referenced in the contributing guide, which you should read before reviewing others' work. |
* @param bool $escape | ||
* @return CI_DB_query_builder | ||
*/ | ||
public function not_having_like($field, $match = '', $side = 'both', $escape = NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be having_not_like
instead.
Same thing applies to all other methods below - not
should always be after having
in the name.
This PR address the 2nd feature request from this #5641 issue.