Skip to content

Add 4933 PostgreSql array contains operators #5228

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 May 6, 2024

fixes #4933

Array contains operators for PostgreSqlDialect

Support <@ and @> for array type, now shared with json, tsvector types
Additionally add && arrays overlap operator

  • Added grammar for contains_operator_expression and resolves expression to Boolean
  • Added fixture test
  • Added integration tests

note: In PostgreSql, arrays of text[] and varchar[] are considered distinct types with the <@ @> && operators

@griffio griffio marked this pull request as ready for review May 6, 2024 17:28
@griffio griffio force-pushed the add-4933-postgresql-array-operator branch from 1c33bfc to 991761b Compare May 20, 2024 18:39
@griffio griffio force-pushed the add-4933-postgresql-array-operator branch from 991761b to fff5670 Compare June 9, 2024 15:28
griffio added 4 commits July 9, 2024 13:40
<@ and @> are used by json, tsvector and array

Move the operators to separate mixin
For Array Contains

text[] and varchar[] arrays are different types in Postgresql for contains operator
Add fixture and integration test
@griffio griffio force-pushed the add-4933-postgresql-array-operator branch from fff5670 to a2e5d0e Compare July 9, 2024 12:40
@JakeWharton JakeWharton enabled auto-merge (squash) July 9, 2024 15:00
@JakeWharton JakeWharton merged commit 81d1abd into sqldelight:master Jul 9, 2024
11 checks passed
@griffio griffio deleted the add-4933-postgresql-array-operator branch July 9, 2024 16:25
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.

Postgres - support array operators
2 participants