smoke
Explore posts from serversDTDrizzle Team
•Created by smoke on 5/20/2023 in #help
Relations module - or condition
Hi there!
I have a teams table, an users table, and a team_members table that connects these two. A team also has an ownerId column.
Currently I have a query that fetches all the teams of an userId whether they are connected through the ownerId column or the join table.
I was wondering if this is possible using the new relations module? Since this is a many-to-many, but also an one-to-many, with an 'or' condition.
40 replies
DTDrizzle Team
•Created by smoke on 5/19/2023 in #help
drizzle-kit: Error: Cannot find module 'drizzle-orm/version'
Hi there, when I run the following command:
pnpx drizzle-kit generate:pg
, I get the following error and I am not sure why:
8 replies
DTDrizzle Team
•Created by smoke on 4/1/2023 in #help
Select exists
Hi there,
I was wondering if there is currently a good way of performing a ‘select exists’, to check whether a specific row exists.
I could use the exists expression as a subquery, but this is not the same as the select exists if I only want to check if a record exists without returning the values.
Thanks a lot, I appreciate it. I could just perform a raw query but there might be some better solutions.
7 replies