Two things that are either missing, or I don’t know what I’m doing I can’t find anything in the documentation to cover the following cases in the WHERE clause.
Case #1 - IN Clause
SELECT propertyA, propertyB FROM bucket WHERE propertyB IN ("A","B","C")
This is a staple in data engineering, am I missing something? Is there an alternate way to do this in N1QL?
Case #2 - Arrays
Say you have the following array inside a document:
ANY syntax allows to use ARRAY indexing feature and get the data faster. The following query uses ix1 index.
CREATE INDEX ix1 ON default (DISTINCT ARRAY child.productCode FOR child IN orderDetails END);
SELECT propertyA, propertyB FROM default WHERE ANY child IN orderDetails SATISFIES child.productCode = 123 END;
I see it on Google now that I’ve made the mental shift to “Collection Operators”. As general feedback coming from a SQL Server world, a large portion of the N1QL documentation is pretty light on examples. While now it makes sense after seeing your example, the documentation on the collections operators page doesn’t have any examples of manually constructing an array on the RHS.
Not the end of the world, just general feedback that more examples are helpful for people coming from other query languages.
I have to skip “/emv3dsecure/v1/devicedatacollection” and search for nested fields in parameters array. The level “/emv3dsecure/v1/devicedatacollection” contains information that i am not able to know.
I tried
OBJECT_VALUES(paths)[0].post path in WHERE Clause but it returns only the data below the first post field. Why OBJECT_VALUES(paths)[*].post is not working? Is there any other way to solve that problem?