Is there support for dynamic where clauses? I could not find any documentation about how to do that. In my case I need to add AND'd conditions with nested OR conditions conditionally, to get something like:
WHERE x=? AND (foo>=? OR bar> ?) AND (bar> ?)
I've tried to create an []sq.Sqlizer and add the OR-expressions in there, then feed that to SelectBuilder.Where() but it fails with the message
converting Exec argument # 1's type: unsupported type []sqrl.Sqlizer, a slice
Ideally there is some kind of ConditionBuilder for this I guess.
Hi,
Is there support for dynamic where clauses? I could not find any documentation about how to do that. In my case I need to add AND'd conditions with nested OR conditions conditionally, to get something like:
WHERE x=? AND (foo>=? OR bar> ?) AND (bar> ?)
I've tried to create an
[]sq.Sqlizer
and add the OR-expressions in there, then feed that toSelectBuilder.Where()
but it fails with the messageIdeally there is some kind of ConditionBuilder for this I guess.