DT
Drizzle Teamsevenwestonroads
PSQL SQL query does not work
Unable to achieve it with Drizzle helpers - I had to write my query in plain SQL.
I'm trying to build a query that looks like this;
But I keep getting the following error;
I do not understand the error and can't manage to find a solution... To give you context,
ip_addresses is a column of identities that is a VARCHAR[]
anonymous_ids is a column of identities that is a VARCHAR[]
email is a column of identities that is a VARCHAR
Then, all the interpolated values are arrays of strings.
Any idea on how to make it work ??? Much appreciated 🙏
B
bloberenober•348d ago
first of all, you can enable query logging to see which query is generated
secondly, I suspect the problem is in
${batchEmails.join(", ")}
part. You can use the inArray
operator from Drizzle instead.The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.3KMembers
View on DiscordWant results from more Discord servers?
More Postsdrop tablesIs there a way to do a migration to drop tables? Other ORMs like Sequelize and Prisma have a conceptdb.query error with relationI have created a schema.ts, with two tables, with a one-to-one relationship. I have also create the How to transform to camelCase with json_agg()?As topic. I can't find any example on how to go about this. The closest I can find is https://orm.drHow to use select?I have a SQL query
```
SELECT
row_to_json(departments.*) as department,
row_to_json