realtime
realtime copied to clipboard
Support more filters in addition to `eq`
Feature request
Support: neq
, lt
, lte
, gt
, and gte
in addition to eq
.
Use case
In my app, I'm trying to filter realtime using (realtime:public:some_table:someValue=gt.previousValue)
but that's currently not possible.
Describe the solution you'd like
I would like to be able to use: neq
, lt
, lte
, gt
, and gte
to filter realtime data.
Additional context
The issue was originally filed here:
- supabase-community/supabase-flutter#91
Related: https://github.com/supabase/walrus/issues/9
@w3b6x9
It looks like neq
, lt
, lte
, gt
, and gte
are already supported by walrus according this comment:
- https://github.com/supabase/walrus/issues/9#issuecomment-1018927685
But it isn't supported by realtime according to this:
- supabase-community/supabase-flutter#91
@osaxma walrus does support them but realtime rls server does not expose those additional filters at the moment.
support contains (cs) filter issue: https://github.com/supabase/realtime/issues/233
Is there anything we can do to help @w3b6x9?
@RasmusEdvardsen thanks for offering! We're currently making some big changes to Realtime and will add in additional filters shortly after the new changes we're making are stable.
@w3b6x9 good to hear 🙂 Thanks for the feedback, I really like your product!
I think that when this is complete, it will really help https://github.com/psteinroe/supabase-cache-helpers/pull/22/files come into its own for React users :)
Update ... this is done actually, and pending some QA we will update the docs and let you know so you can take a look!
@chasers is this planned on being released soon? We're hitting our channel limits currently because we can only do direct queries
Per our discussion offline, these are actually on production now and more obvious with #373
will eq filter also suport Strings?
@LorenzFedeli in my experience yes
@LorenzFedeli yes it does.
I can't get it to work. To be exact I'm trying to compare to a date with yyyy-MM-ddThh:mm:ss format. .from('table:date=eq.2022-01-01T12:33:00') this gets everything from my table
Can you try it with a normal string and see what happens? Comparing to a datetime field would likely be an edge case currently.
And if you're hosted on our platform it's usually easier if I can get a project ref. You can contact support with those details and we can take it from there if you like.