Umbranox
Umbranox
DTDrizzle Team
Created by Umbranox on 9/16/2023 in #help
Possible to reuse columns while selecting?
This looks exactly what I was looking for, thank you so much
28 replies
DTDrizzle Team
Created by Umbranox on 9/16/2023 in #help
Possible to reuse columns while selecting?
So instead of having to type
columns: {
name: true,
banned: true
},
columns: {
name: true,
banned: true
},
every query I can type
columns: usersSelect
columns: usersSelect
28 replies
DTDrizzle Team
Created by Umbranox on 9/16/2023 in #help
Possible to reuse columns while selecting?
That's not what I'm trying to do, I'm essentially just trying to make the "columns" I am selecting constant, so in two seperate queries I'm not having to type them again, while also having consistency
28 replies
DTDrizzle Team
Created by Umbranox on 9/16/2023 in #help
Possible to reuse columns while selecting?
I agree, lots of problems were caused in my current codebase due to prisma being rather inefficient, forcing me to use raw queries.
28 replies
DTDrizzle Team
Created by Umbranox on 9/16/2023 in #help
Possible to reuse columns while selecting?
I did attempt using drizzle-zod but wasn't entirely sure how to use it's result in a select query, especially when relations are involved, not sure if I'm thinking of this in the correct way 😅
28 replies
DTDrizzle Team
Created by Umbranox on 9/16/2023 in #help
Possible to reuse columns while selecting?
That looks great for the where condition, but how about the usersSelect typesafe with relations?
28 replies