I'd like a query to match if the field value is in a list of values. I can't figure out the syntax for this. The field is not a list.
ie. Given elements:
{'name': 'Fred', 'status': 'attached', 'age': 32}
{'name': 'George', 'status': 'loner', 'age': 45}
{'name': 'Anna', 'status': 'married', 'age': 22}
I'd like a query to match a list of ages, something like this:
db.search(Query().age.any([x for x in range(25, 35)])
But it seems this only works for fields that are lists? Is that right?
Is there some other way to do this?
Thanks,
Ed