I’m afraid I might be missing something here, because the documentation for ANY and EVERY state the following regarding return values:
If at least one item in the array satisfies the
ANYexpression, then it returns the entire array; otherwise, it returns an empty array.
If all the items in the array satisfies the
EVERYexpression, then it returns the entire array; otherwise, it returns an empty array.
Don’t they just return a BOOLEAN? Is this a documentation quirk, or is there a nuance here that I’m somehow missing where the result could actually be an array? Simple tests like “SELECT ANY v IN [1, 2, 3] SATISFIES v = 2 END” show that a boolean comes back, not the whole array or an empty array.
Again, making sure I’m not missing something. I wanted to include an ANY expression as an index key expression, and would very much prefer the whole array is not the return value that gets embedded in the index (even in some weird misunderstood condition)…