Dustin@WunderGraph
Dustin@WunderGraph
DTDrizzle Team
Created by Luxaritas on 4/11/2023 in #help
Typescript build fails with large number of columns
😂
195 replies
DTDrizzle Team
Created by Luxaritas on 4/11/2023 in #help
Typescript build fails with large number of columns
Let me downgrade to 0.11.6 sweating
195 replies
DTDrizzle Team
Created by Luxaritas on 4/11/2023 in #help
Typescript build fails with large number of columns
Awesome! I'd expect you running into this issue as well with your own projects right?
195 replies
DTDrizzle Team
Created by Luxaritas on 4/11/2023 in #help
Typescript build fails with large number of columns
No pressure but I'm worried to proceed with Drizzle if the problem can't be addressed soon. Is it even fixable or does it entirely depends on TypeScript compiler? Some update would be indeed very helpful. Thank you.
195 replies
DTDrizzle Team
Created by Dustin@WunderGraph on 7/16/2023 in #help
How to create GIN/GIST index on text[] column?
2 replies
DTDrizzle Team
Created by Dustin@WunderGraph on 7/12/2023 in #help
How to do conditional joins with the query builder?
You're right, thx
18 replies
DTDrizzle Team
Created by Dustin@WunderGraph on 7/12/2023 in #help
How to do conditional joins with the query builder?
I tested it. I don't have auto completion for the different join types.
18 replies
DTDrizzle Team
Created by Dustin@WunderGraph on 7/12/2023 in #help
How to do conditional joins with the query builder?
Hi @Dan Kochetov, tsc does not complain but innerJoin literal is not type-safe. Therefore according to my example above, I'd like to work with one concrete join and reassign the result back to query.
18 replies
DTDrizzle Team
Created by Dustin@WunderGraph on 7/12/2023 in #help
How to do conditional joins with the query builder?
I want to do this without specifying all types on my own. This doesn't work because leftJoin and inerJoin return different types.
const query = this.db
.select()
.from(schema.users)
// here
if (myCondition) {
query = query.innerJoin(
schema.projects,
eq(schema.users.id, schema.projects.userId)
)
} else {
query = query.leftJoin(
schema.projects,
eq(schema.users.id, schema.projects.userId)
)
}
const result = await query
const query = this.db
.select()
.from(schema.users)
// here
if (myCondition) {
query = query.innerJoin(
schema.projects,
eq(schema.users.id, schema.projects.userId)
)
} else {
query = query.leftJoin(
schema.projects,
eq(schema.users.id, schema.projects.userId)
)
}
const result = await query
18 replies
DTDrizzle Team
Created by Dustin@WunderGraph on 7/12/2023 in #help
How to do conditional joins with the query builder?
I mean conditional joins like leftJoin or innerJoin not condition statements part of a single join.
18 replies
DTDrizzle Team
Created by Dustin@WunderGraph on 7/12/2023 in #help
How to do conditional joins with the query builder?
I think you missed the point. I want to do conditional joins.
18 replies
DTDrizzle Team
Created by Dustin@WunderGraph on 7/12/2023 in #help
How to do conditional joins with the query builder?
I think the new one. db.select().from(table).innerJoin
18 replies