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

Enforce non-null parameter to .eq #464

Merged
merged 1 commit into from
Aug 24, 2023
Merged

Conversation

wyozi
Copy link
Contributor

@wyozi wyozi commented Aug 22, 2023

What kind of change does this PR introduce?

Currently, .eq() allows null inputs but crucially it won't work, as you need to use .is() for null comparisons.

This PR adds stronger typing to ensure that null values are not passed to .eq(). Instead, you'll either have to do non-null assertion or a more proper method, like .is() or .eqNullable() (#463)

Note: this is kind of a breaking change, but I think an extremely useful one and call sites where this causes errors should be fixed

@soedirgo
Copy link
Member

Thanks!

this is kind of a breaking change, but I think an extremely useful one and call sites where this causes errors should be fixed

Agreed, using null with .eq() would just fail in the first place.

@soedirgo soedirgo merged commit fbeb24c into supabase:master Aug 24, 2023
@soedirgo soedirgo mentioned this pull request Aug 24, 2023
@wyozi wyozi deleted the non-null-eq branch August 24, 2023 07:15
@github-actions
Copy link

🎉 This PR is included in version 1.8.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants