Will
Explore posts from serversDTDrizzle Team
•Created by Will on 9/8/2023 in #help
Prepared Statement - Neon Syntax Error
Hi there,
I am trying to use a prepared statement to run a query but am getting a syntax error. below you can see the .toSql() logged, as well as the error.
here is my prepared statement:
I don't see anything wrong with my prepared statement. Can anyone spot what I'm doing wrong or let me know if this is a bug? Much appreciated.
2 replies
DTDrizzle Team
•Created by Will on 9/4/2023 in #help
ERROR: prepared statement "s9656" does not exist
11 replies
DTDrizzle Team
•Created by Will on 8/29/2023 in #help
How to use a composite primary key in WHERE?
I have a table dv360UserProfilesTable which uses a composite key of userId and assignedUserProfileId. If I want to update this table, I'm struggling with how to use the composite key to batch update profiles. The below code throws the error: db error: ERROR: argument of WHERE must be type boolean, not type record
The docs also do not show an example of this https://orm.drizzle.team/docs/indexes-constraints#composite-primary-key
4 replies
DTDrizzle Team
•Created by Will on 8/18/2023 in #help
How would you write this REPLACE query?
I'm trying something like this:
but am getting this error: NeonDbError: db error: ERROR: argument of WHERE must be type boolean, not type record
I don't really understand why the where is not type boolean here because I'm using an IN statement.
3 replies
DTDrizzle Team
•Created by Will on 8/17/2023 in #help
Connecting to Neon through Drizzle via Cloud Function
Hi there! I have a nextjs app that is hooked up to neon via drizzle. I want to use some cloud functions to do some additional data transfer into the DB.
1. Does anyone have any advice on how to set up a cloud function with Drizzle?
2. How would you go about sharing the schema between the cloud function and the next app? I'm thinking I'll need to set up some sort of monorepo like turborepo but I don't know what the deal is with putting a google cloud function in a turborepo.
Thanks!
1 replies
DTDrizzle Team
•Created by Will on 8/3/2023 in #help
How do I import a type?
This might be something I'm just totally overlooking, but I'm used to prisma where you can just import any schema you've defined as a type.
For example, if I have a table
posts
, I'd expecect to be able to import a Post
type to be used in one of my child components.
Is this possible with Drizzle? Or have you all found it to be unnecessary14 replies