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

Implement PgHasArrayType trait for PgLQuery #2246

Closed
mlesin opened this issue Dec 18, 2022 · 0 comments · Fixed by #3553
Closed

Implement PgHasArrayType trait for PgLQuery #2246

mlesin opened this issue Dec 18, 2022 · 0 comments · Fixed by #3553
Labels
enhancement New feature or request

Comments

@mlesin
Copy link

mlesin commented Dec 18, 2022

Is your feature request related to a problem? Please describe.
I do need to use ? operator from postgresql ltree extension, which expects array of lquery on right hand side of expression, but doing so I'm getting the trait `PgHasArrayType` is not implemented for `PgLQuery` compilation error

Describe the solution you'd like
I think we should implement PgHasArrayType trait for PgLQuery

Describe alternatives you've considered
There is a workaround for now to pass array of text and make type cast in SQL query itself, like $1::lquery[]

Additional context
None

@mlesin mlesin added the enhancement New feature or request label Dec 18, 2022
philipcristiano added a commit to philipcristiano/sqlx that referenced this issue Oct 9, 2024
An lquery array can be used with the `?` operator for "Does ltree match
any lquery in array?"

Documentation: https://www.postgresql.org/docs/current/ltree.html#LTREE-OPS-FUNCS

Closes launchbadge#2246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant