frankscp
DTDrizzle Team
•Created by frankscp on 2/4/2024 in #help
can't connect to database in Netflify after adding drizzle, even though it works in localhost
Hello all,
I have a sveltekit application (supabase as database, using drizzle as orm) that is working flawlessly in my local machine. However, after my last deploy in which I implemented Drizzle orm as opposed to using supabase api directly, it is completely broke in Netflify.
Not only do my endpoints return an error when calling them, but some pages are simply not available and throw a not found error. I suspect in might be related that might not be working for some reason, but so far I haven't found a solution. I even tried to deploy it to vercel, but the exact same error occurred. Any idea on what might be causing this? Thank you
3 replies
DTDrizzle Team
•Created by frankscp on 1/15/2024 in #help
How to check if a column of type uuid has a value missing without using sql
Hello,
I have a table that references other via foreign key. Both Ids are of type UUID. How can I check if the UUID's value is null using the javascript library? I was expecting 'eq(table1.table2Id, null)' to work, and it actually does at runtime, but I get the following typescript error:
4 replies
DTDrizzle Team
•Created by frankscp on 12/14/2023 in #help
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!
3 replies
DTDrizzle Team
•Created by frankscp on 12/4/2023 in #help
Transaction rolling back without error
Hello all,
I'm trying to use Drizzle together with Supabase and SvelteKit to have transaction support. However, I've come across an issue which I'm having trouble understanding.
The following query is successful on it's own (the value of the variables is extracted from a form data):
However, when I use inside a transaction, the transaction does NOT fail, but it does NOT write to the database either:
8 replies