How is it possible to write a couchbase request in order to choose the first condition in where if it is defined or the second one if the first one is undefined.
I tried somethings like :
SELECT id FROM auto as a WHERE IFMISSINGORNULL(ARRAY_LENGTH(a.data[0])>1, ARRAY_LENGTH(a.data[1])>1)
In this request if a.data[0] is defined, I want to check the length of a.data[0] and if a.data[0] is not defined, I want to check the length of a.data[1].