Hi, anyone know how to implement the function in t...
# help
a
Hi, anyone know how to implement the function in the link below by using Functions and Triggers pages from the database dashboard (Alpha Preview section)? https://supabase-sql.vercel.app/youtube-like-short-id
n
Hello @arcavid! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
g
At a high level, you would enable pgcrypto extension which is already supported in the database section. Then you would have to go to pg_shortkey github and copy the sql and run it in the sql window under supabase dashboard. You can't use the function editor as it appears to also need a new column type called SHORTKEY and that SQL in the repository generates it in a domain statement. The rest of the SQL there appears to generate a trigger function which you would then call by setting up a trigger thru the dashboard as you pointed out. This is high level and not looking at what all the function actually does.
n
arcavid (2022-03-18)
a
Thanks a lot!! I'll give it a try.