-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix(types): allow Op.contains on a jsonb column #16167
Conversation
In the case of a jsonb column, this wasn't working properly. Previously, the below would be a TypeScript error; this fixes it. Because a jsonb column isn't a Range, we need to add a specific case for it. ``` const someJson = ...; const e = await MyEntity.findAll({ where: { myJsonbCol: { [Op.contains]: someJson }, }, }); ```
@ephys thanks for taking a look! I think I properly fixed the issue with interfaces (by using |
Hey @ephys, anything else I need to do here in order for this to be merged? (And apologies if I haven't set the github review status correctly, I'm not super familiar with the procedural conventions in OSS projects!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be good, thank you!
Pull Request Checklist
If a documentation update is necessary, have you opened a PR to the documentation repository?N/ADescription Of Change
In the case of a jsonb column, this wasn't working properly. Previously, the below would be a TypeScript error; this fixes it. Because a jsonb column isn't a Range, we need to add a specific case for it.