N1QL/SQL++ Both works = & IN


I learn n1ql and sometimes I see this

      NEST reviews ON (META(reviews).id IN product.reviewList)

then I see this:

      NEST reviews ON (META(reviews).id = product.reviewList)

I tested out and both works but which should I use ? What you prefer ?

Right side of IN requires ARRAY
equality both sides data types must be Same.
In case of JOIN on META().id it may work both due to internal rewrite to ON/USE KEYS

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.