jdgamble555
04/03/2022, 1:20 AMexists
function like select exists(select 1 from contact where id=12)
in supabase?Needle
04/03/2022, 1:20 AM/title
command!
We have solved your problem?
Click the button below to archive it.garyaustin
04/03/2022, 1:24 AMNeedle
04/03/2022, 1:24 AMjdgamble555
04/03/2022, 1:26 AMtypescript
const { data } = await supabase.from('profiles').select(`exists( username )`).eq('id', user.id)
In postgres, I should be able to return true or false is something exists...garyaustin
04/03/2022, 1:29 AMgaryaustin
04/03/2022, 1:30 AMjdgamble555
04/03/2022, 1:31 AMGET https://22234fdsa.supabase.co/rest/v1/profiles?select=username&id=eq.7b8bca86-47ad-4928-8f56-538638e09774 400
which I would like to get rid of.barry
04/03/2022, 1:32 AMbarry
04/03/2022, 1:33 AMbarry
04/03/2022, 1:33 AMjdgamble555
04/03/2022, 1:33 AMjdgamble555
04/03/2022, 1:35 AMbarry
04/03/2022, 1:35 AMbarry
04/03/2022, 1:35 AMbarry
04/03/2022, 1:35 AMbarry
04/03/2022, 1:35 AMjdgamble555
04/03/2022, 1:36 AMgaryaustin
04/03/2022, 1:38 AMbarry
04/03/2022, 1:39 AMbarry
04/03/2022, 1:39 AMbarry
04/03/2022, 1:39 AMjdgamble555
04/03/2022, 1:39 AMgaryaustin
04/03/2022, 1:40 AMjdgamble555
04/03/2022, 1:40 AMtypescript
const { data, error, status } = await supabase
.from('profiles')
.select(`username`)
.eq('id', user.id)
.single();
It does return [], but it still prints to the consolegaryaustin
04/03/2022, 1:40 AMgaryaustin
04/03/2022, 1:41 AMbarry
04/03/2022, 1:41 AMgaryaustin
04/03/2022, 1:42 AMjdgamble555
04/03/2022, 1:49 AMNeedle
04/03/2022, 3:29 AM