Skip to content

Fix 5330 add Postgresql ILIKE operator #5333

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

Merged

Conversation

griffio
Copy link
Collaborator

@griffio griffio commented Jul 7, 2024

fixes #5330

https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-LIKE

  • Added ILIKE operator - extended existing rule even though it has Sqlite operators GLOB, MATCH, REGEX,
  • Added Regex
    • operator ~~ is equivalent to LIKE, and ~~* corresponds to ILIKE. There are also !~~ and !~~* operators
      that represent NOT LIKE and NOT ILIKE
  • Added integration test

griffio added 2 commits July 7, 2024 09:00
Add `ILIKE` to `binary_like_operator`

Postgresql doesn't use `GLOB | REGEXP | MATCH` keywords
It would require rewriting the mixin just to add `ILIKE`

Add like and ilike patterns to regex_match_operator
regex_match_operator is ordered by shortest matching characters first as the parser gets confused
fixture test
integration tests
@griffio griffio marked this pull request as ready for review July 7, 2024 16:01
@JakeWharton JakeWharton merged commit a407d5c into sqldelight:master Jul 8, 2024
11 checks passed
@griffio griffio deleted the fix-5330-add-postgresql-ilike branch July 10, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

PostgreSQL - ILIKE isn't supported
2 participants