how to do ANY

need to do where 'myvariable' = ANY(mycolumn)
6 Replies
bloberenober
bloberenober15mo ago
.where(sql`'myvariable' = ANY(${mycolumn})`)
Andrii Sherman
Andrii Sherman15mo ago
I guess myvariable also should be in ${}
bloberenober
bloberenober15mo ago
.where(sql`${myvariable} = ANY(${mycolumn})`)
thdxr
thdxr15mo ago
yeah that's what I did but was wondering if there was a more native way got it
bloberenober
bloberenober15mo ago
you can make a helper function
thdxr
thdxr15mo ago
oh true