ewilliam
ewilliam
Explore posts from servers
DTDrizzle Team
Created by ewilliam on 8/12/2023 in #help
how to type dynamic where condition
i'd like to do something like
async function selectEventByCondition(condition) {
return db.query.events.findFirst({
where: condition,
with: {
exceptions: true,
},
})
}
async function selectEventByCondition(condition) {
return db.query.events.findFirst({
where: condition,
with: {
exceptions: true,
},
})
}
however the condition is any type in this case. does drizzle provide a type i can use? prisma has generated types that can be used in similar situations
10 replies