Relations, three level nested where?
Want results from more Discord servers?Recommended Posts
Help with this relational query?I am trying to get all the organizations that a member is associated with. This code is working: RQB | using specific fields from a query against relationsis there a way to create a select filter that matches specific fields from a relation? say i `findMaSimulate enums with SQLite `CHECK()`I'm a heavy enum user in Postgres. Using SQLite now, wondering if anyone has come up with something Migrating from Prisma graduallyWe're in the middle of migrating away from Prisma to Drizzle which we just found out that Drizzle haselect with limit of 1Is there a cleaner way of selecting only one item with proper type safety than this? ```ts const usOption filter parametersHi! Love using drizzle so far! Had a quick question (not a bug): ``` const res = await ctx.databHow to delete with cascade?I'm using postgres with the following schema (reduced to the important parts): ``` export const worPSQL SQL query does not workUnable to achieve it with Drizzle helpers - I had to write my query in plain SQL. I'm trying to budrop 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_jsonCount in relational queriesHow do I count in relational queries? For example if i'm querying db.query.posts.findMany() and wantCreate a type of VARCHARI want to create a type for my column of `VARCHAR` but when I used Drizzle-Kit to generate it, I gSelect with relationIs there a way to get relations when using `db.select().from(table)`I can't get the `db.query.table.Any plan to support ClickHouse db?Any plan to support ClickHouse db? https://clickhouse.com/`where` inside relational queries `with` does not workHi there! I'm new to drizzle and tried out the relational queries. I want to do a nested `where` rIssue with 'insert on conflict do update where'I am using db.insert(lastHeaterMetricsTable) .values(heaterEntityWithMaxTime)