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

Should we error when passing duplicate keys to select-*, etc.? #142

Open
camsaul opened this issue Apr 3, 2023 · 0 comments
Open

Should we error when passing duplicate keys to select-*, etc.? #142

camsaul opened this issue Apr 3, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request high priority

Comments

@camsaul
Copy link
Owner

camsaul commented Apr 3, 2023

Apparently this used to work, completely unintentionally, in Toucan 1:

(db/select-field :category_id Venue
                 :category_id [:in allowed-category-ids]
                 :category_id [:not-in disallowed-category-ids])

That was never intentional. I don't think supporting this is really worth it in terms of making the library more complicated and having even more things that need to be documented, but it would be nice to error in this case to prevent people from accidentally trying to do something like this anyway.

This should also be documented in the "differences from Toucan 1" documentation.

@camsaul camsaul added documentation Improvements or additions to documentation enhancement New feature or request high priority labels Apr 3, 2023
@camsaul camsaul changed the title Error when passing duplicate keys to select-*, etc. Should we error when passing duplicate keys to select-*, etc.? Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

1 participant