Having CRUD functions and Transaction Support
Hello all,
I'm using Supabase as my DB and SvelteKit both for the frontend and backend.
I decided to create some "CRUD" files, to manage creations and deletions. The purpose would be to set the values of variables such as created_at, created_by (which is a foreign key to user_id), updated_at and updated_by. I was creating my function like this:
However, I now realized that by doing this, I'll not be able to use transactions. Is there any way I can define that 'updatedAt' should be set to the current timestamp and still use transactions?
Thank you!
I'm using Supabase as my DB and SvelteKit both for the frontend and backend.
I decided to create some "CRUD" files, to manage creations and deletions. The purpose would be to set the values of variables such as created_at, created_by (which is a foreign key to user_id), updated_at and updated_by. I was creating my function like this:
However, I now realized that by doing this, I'll not be able to use transactions. Is there any way I can define that 'updatedAt' should be set to the current timestamp and still use transactions?
Thank you!