Skip to content
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

'like' operator should default to 'ilike' for postgres #271

Closed
circulon opened this issue Dec 17, 2020 · 2 comments · Fixed by #272
Closed

'like' operator should default to 'ilike' for postgres #271

circulon opened this issue Dec 17, 2020 · 2 comments · Fixed by #272

Comments

@circulon
Copy link
Contributor

circulon commented Dec 17, 2020

Thanks for fixing the like operator.

I just found out that Postgres has separate 'like' and 'ilike' operators (case-sensitive and case-insensitive respectively)

I would think that the grammar for 'like' and 'not like' in postgres default to 'ILIKE' and 'NOT ILIKE' as all other RDMS seem to have no distinction like this (no pun intended) and are all case-insensitive.

@josephmancuso
Copy link
Member

Are you able to put this PR together?

This would just be a small text change on these 2 lines

https://github.com/MasoniteFramework/orm/blob/0.9/src/masoniteorm/query/grammars/PostgresGrammar.py#L69-L73

@circulon
Copy link
Contributor Author

PR created fixing this issue
#272

@josephmancuso josephmancuso linked a pull request Dec 19, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants