I have a Boolean column in one of my Parse entities, and I want to query for all rows that have this column explicitly set to false , or left to the default value undefined .
I cannot do equalTo('myBoolColumn', false) because it does not return rows with an undefined value for this column.
I would prefer not to do notEqualTo('myBoolColumn', true) , because the analysis documentation says that notEqualTo queries are inefficient, t use indexes.
The documentation suggests using containedIn instead, but it's wrong to write a containedIn('myBoolColumn', [false, undefined]) query containedIn('myBoolColumn', [false, undefined]) to achieve the expected result.
It seems that notEqualTo logical queries can still be indexed, but I have not found an authoritative source that confirms this, and I do not know how to check whether this query uses an index or not.
So which one should I use: notEqualTo('myBoolColumn', true) or containedIn('myBoolColumn', [false, undefined]) ?
source share