SupabaseS
Supabaseโ€ข4y ago
Joakim

RPC to add to an array

Hi! I got an column in my store_table for likes.
It takes in UID. so a authenticated user can like a store in this case.
see image.

Now I need to create an RPC takes takes in two parameters. the UID, and store_id, the UID has type uid, and store_id is type int4

so append user_id to likes where store_id is equal to the store_id selected

It's my first time writing one and struggle to find exactly what I need.
So hoping for some help in writing it, thanks ๐Ÿ˜„
image.png
Was this page helpful?