Postgres Realtime Querying hydration and commonality to postgREST #14031
Unanswered
Towerful
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I would love to see some better hydration options for Postgres Realtime.
Would it be possible for a successful connection to also return an initial data set?
Alternatively, is there a way to use the supabase-js query builder to return the
RealtimePostgresChangesFilterobject?so
supabase.from('users').select('name').eq('id', 1).toRealtime('*')might return{event: '*', schema: 'public', table: 'users', filter: 'id=eq.1'}This would allow something like:
or, perhaps, the result of the await-ed query would have an additional
realtimeproperty that would include the information. e.gI realise that this breaks down when dealing with multiple relations and complex queries.
Using the 2nd method above (after a successful query) might allow for auto-generation of multiple realtime filters, however the complexity would very quickly explode.
It might work like this:
perhaps a better way would be to allow the postgREST client to execute arbitrary strings.
So the
id=eq.1that is required for Realtime can also be used by postgREST.this would certainly be the easier one to implement in the short term, and would reduce the duplication of logic
All reactions