3
[Swift] `RealtimeChannelV2`: Improve the `postgresChange` function signature
Source: supabase/supabase#33619 · opened by @LucasAbijmil
When using RealtimeChannelV2, the filter passed in parameter is a String that must be entered manually by the client.
Let's consider filtering the id (of type UUID) column via an array, our function signature will be as follows:
While this works like a charm, I can see several drawbacks:
• Easy to introduce errors
• Learning curve (especially for _PostgREST_ beginners)
• A syntax far less easy and readable than what we can have for a database query via the functions of PostgrestFilterBuilder.
The idea would be to improve syntax and readability by using something similar to PostgrestFilterBuilder, so that the signature would look something like:
So, when called (and taking the previous example), we'd have the following:
Let's consider filtering the id (of type UUID) column via an array, our function signature will be as follows:
While this works like a charm, I can see several drawbacks:
• Easy to introduce errors
• Learning curve (especially for _PostgREST_ beginners)
• A syntax far less easy and readable than what we can have for a database query via the functions of PostgrestFilterBuilder.
The idea would be to improve syntax and readability by using something similar to PostgrestFilterBuilder, so that the signature would look something like:
So, when called (and taking the previous example), we'd have the following:
No pledges yet. Be the first to back this.
No comments yet.