how to do ANY

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