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

Allowed choosing the IN-list data structure type #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

avalente
Copy link

Currently it is impossible to interact with PostgreSQL advanced data types such as arrays because vectors are intercepted for the IN clause expansion. The set data type seems more suitable (after all, semantically it is a set membership test), but I made it configurable. I didn't change the default, however: if you want to change the behaviour you have to pass an explicit option.

@dmitrig01
Copy link

I've dealt with this issue before, and an alternate solution that came to mind was naming the parameter such that it ended with "..." to indicate that it should be expanded into top-level items.

--- name: test
SELECT * FROM test WHERE x IN (:foo...) AND y = :bar

then query as (test ... {:foo... [1 2 3] :bar [2 3 4]})

Thoughts on that approach instead.

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 this pull request may close these issues.

2 participants