I have the following XQuery code that uses op:from-view
.
In the op:where
section I am trying to select a column that can equal a list of values.
When I use one value like op:eq(op:col("client"), $client1)
it works fine.
However i need it to select ($client1, $client2)
.
How do I do that?
I can't seem to find an example anywhere.
Thanks.
How can Optic api do where in list?
85 Views Asked by supersteve At
1
Optic doesn't have an in() operator at present, so the condition would have to be passed to Optic as
To make that less tedious, one possibility would be to take advantage of build-time expressions as in:
Or to wrap that expression in a helper function:
and use it as follows:
Hoping that helps,