WL#10612: X Protocol IN Operator for JSON

Affects: Server-8.0   —   Status: Complete

Related to DevAPI

Currently, it's not possible to express queries that compare against the contents 
of an array or object.

For example, checking whether an array from an object contains an element or one-
of/all-of of the elements in another list is not possible.

The expression syntax must be extended to support such an operator, using the 
JSON_CONTAINS() function.


Sample expressions that must be possible:
=========================================

3 in [1,2,3,4]

doc.field in [1,2,3,4]

4 in doc.array

doc.field in doc.array

json_quote(substr(field, 1, 5)) in doc.array


Sample expressions that are not valid
=====================================

substr(field, 1, 5) in doc.array

Does not produce a JSON value, cannot implicitly cast because string won't produce 
a castable JSON value