postgrest-js
postgrest-js copied to clipboard
Adding the ONLY keyword to the JS API
Discussed in https://github.com/supabase/supabase/discussions/5927
Originally posted by Teio07 March 15, 2022 Hi, I'm considering handling deletion using partitions (to separate deleted records from non deleted records) as described in this post : https://stackoverflow.com/questions/506432/cascading-soft-delete
But once implemented, if I want to be able to select records (only non-deleted ones) I have to SELECT like this with Postgresql :
SELECT name, altitude
FROM ONLY cities
WHERE altitude > 500;
ref. : https://www.postgresql.org/docs/9.1/ddl-inherit.html#:~:text=Here%20the%20ONLY%20keyword%20indicates,DELETE%20%E2%80%94%20support%20the%20ONLY%20keyword.
Is such a call possible using supabase with react ? How would that translate ?
Thanks in advance !