Mike J
Explore posts from serversDTDrizzle Team
•Created by Mike J on 10/26/2024 in #help
How would you write this SQL query using Drizzle?
Hey! This is my first time using Drizzle. I have the following SQL query, which returns the ID for "my_name" (which I expect to return most of the time). If the name doesn't exist, it will insert it into the table and return the new ID. It's one call to the database and avoids trying to INSERT only if the value doesn't exist.
How do I write this using Drizzle?
2 replies
CDCloudflare Developers
•Created by Mike J on 11/23/2023 in #pages-help
Using 'pg' in an Astro API route
Hi. I think you can use Node's pg with Cloudflare workers according to https://developers.cloudflare.com/workers/tutorials/postgres
I am trying to deploy an Astro API route like the following but the build is failing
The package "net" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
It's not clear to me where I am supposed to specify the platform.
1 replies