alexb
DTDrizzle Team
•Created by alexb on 9/18/2024 in #help
How to type a generic selection function
Thanks for your help! I'll update the thread if I ever find a better solution
16 replies
DTDrizzle Team
•Created by alexb on 9/18/2024 in #help
How to type a generic selection function
That'll do, I feel like this is a pretty standard use case though, surprised there's no clean way to do it :/
16 replies
DTDrizzle Team
•Created by alexb on 9/18/2024 in #help
How to type a generic selection function
Nice thanks!
yeah this is exactly the workaround I used
16 replies
DTDrizzle Team
•Created by alexb on 9/18/2024 in #help
How to type a generic selection function
16 replies
DTDrizzle Team
•Created by alexb on 9/18/2024 in #help
How to type a generic selection function
from
import type { SelectedFields } from 'drizzle-orm/pg-core'
16 replies
DTDrizzle Team
•Created by alexb on 9/18/2024 in #help
How to type a generic selection function
@Mario564 thanks
SelectedFields really help but I'm still having issues
It works unless I add a
where
condition
ie:
return db.select(selectFields).from(users) // works
return db.select(selectFields).from(users).where(eq(users.id, '1111')) // returns "any"
16 replies