user
01/15/2022, 4:13 PMgaryaustin
01/15/2022, 11:46 PMuser
01/16/2022, 8:03 PMDarryl
01/16/2022, 9:16 PMjetpackjoe
01/16/2022, 11:22 PMBogdwynny
01/17/2022, 9:00 AMBenXk
01/17/2022, 4:42 PM[{"comment":"Hello","author":"2aa439fd-77b0-448f-8ab7-ad26a0a0b5b3"}]
BenXk
01/17/2022, 4:42 PMreplies:author ( username )
so I can get the author but how can I get comment too?Scott P
01/17/2022, 4:57 PMjetpackjoe
01/18/2022, 3:25 AMawait supabase.auth.setAuth(accessToken)
followed immediate by await supabasea.from('mytable').select()
When I turn RLS off, I get data, with RLS on, I get []
for some reason setAuth
is returning {access_token: "...", token_type: 'bearer', user: null}
when I pass the same access token to supabase.auth.api.signIn
, I get a user back... so I know the token is good... but trying to figure out why setAuth
is returning a null user and why RLS isn't workingjetpackjoe
01/18/2022, 4:28 AM1304654
01/18/2022, 9:03 AMawait supabaseClient.from("order_detail").insert(order_details);
It throws the next error:
details: "Key (order_id)=(f11e232a-9010-405a-94ed-9363765fc6d9) already exists."message: "duplicate key value violates unique constraint \"order_detail_order_id_key
1304654
01/18/2022, 9:05 AMorder_details=[{order_id: 'f11e232a-9010-405a-94ed-9363765fc6d9', product_id: "a93935ff-ade8-4acc-ac7e-aacc5dfe1961"},{order_id: 'f11e232a-9010-405a-94ed-9363765fc6d9', product_id: "c4cc5857-6bce-4b10-818c-acfb87f3a4f9"}]
1304654
01/18/2022, 9:06 AM1304654
01/18/2022, 9:45 AMGeggs
01/19/2022, 1:34 PMGeggs
01/19/2022, 3:57 PMjaf
01/20/2022, 12:48 PMonConflict
option when doing a mass insert? What syntax do I need to use? I have a composite unique constraint that consists of two columns. I'm periodically inserting the whole data set and want to just ignore the row if it already exists (or maybe update the updated_at
column). One tutorial I found suggested the following: ON CONFLICT ON CONSTRAINT customers_name_key
DO NOTHING
So how would I write that with the supabase JS library?TremalJack
01/20/2022, 1:32 PMTremalJack
01/20/2022, 1:33 PMSteve
01/20/2022, 2:08 PMJaeden
01/21/2022, 10:06 AMstats( * )
return only the last item? Right now I get an array of thousands of entries. Am I overlooking some syntax for quering foreign tables?
return await supabase.from<WatchlistData>('watchlists').select(`*, items:watchlist_items(*, data:projects(*, stats( * ))), creator:profiles(*)`).eq('id', watchlistId).single()
Jaeden
01/21/2022, 10:27 AMlimit()
with a foreignTable
return await supabase.from<WatchlistData>('watchlists').select(`*, items:watchlist_items(*, data:projects(*, stats( * ))), creator:profiles(*)`).limit(1, { foreignTable: 'stats' }).eq('id', watchlistId).single()
jaf
01/21/2022, 5:32 PMjaf
01/21/2022, 5:44 PMgaryaustin
01/21/2022, 6:06 PMjaf
01/21/2022, 6:58 PMjonahcockshaw
01/21/2022, 10:35 PMManishShahi
01/22/2022, 6:15 AMsilentworks
01/22/2022, 5:18 PM