In ndb, in order to query for items where property A
is in list B
, you can do something like:
Item.query(Item.A.IN(B))
How can you query for items where property A is not in list B?
It's not possible. Note that your IN query is actually automatically broken down into a number of different EQUALS queries, for each item in list B, and the merged results are returned.
You could query for all, and then manually filter out and ignore results that are in list B.
A typical GAE solution would be to denormalize and precompute another value that would be easy to index and query, and save that as a property in Item.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With