realtime icon indicating copy to clipboard operation
realtime copied to clipboard

Add support for range filters

Open rlee1990 opened this issue 3 years ago • 4 comments

It would be good to be able to support pagination in realtime with things like range.

rlee1990 avatar Oct 07 '22 16:10 rlee1990

@rlee1990 thanks for the feature request!

Just to clarify, do you mean a range filter? for example, a client wants to only receive changes when id is between 1 and 100, inclusive?

w3b6x9 avatar Oct 07 '22 18:10 w3b6x9

@rlee1990 thanks for the feature request!

Just to clarify, do you mean a range filter? for example, a client wants to only receive changes when id is between 1 and 100, inclusive?

Something like this:

final data = await supabase
  .from('cities')
  .select('name, country_id')
  .range(0,3);

rlee1990 avatar Oct 07 '22 18:10 rlee1990

@rlee1990 for your specific example here, this belongs on the PostgREST repo. Can you create this there please?

Complimentary, I think it makes sense for Realtime to support a range filter so that one subscription could update a list of things returned from a query like that.

I'm going to change the subject to better reflect that.

chasers avatar Dec 14 '22 16:12 chasers

Will do

rlee1990 avatar Dec 14 '22 16:12 rlee1990