Reputation: 2228
I'm checking the documentation at https://googlecloudplatform.github.io/google-cloud-python/stable/datastore-usage.html, but I could not find a way to do a query using OR conditionals.
Filtering using an AND conditional is straightforward, just use the method add_filter
.
OR conditionals are supported by NDB, but AFAIK, NDB is not supported in Compute Engine/GAE-Flexible.
If it is really the case that OR is not supported, are there any other libraries which I can use from Compute Engine/GAE-Flexible to access the datastore with better query features?
Upvotes: 0
Views: 674
Reputation: 2207
Datastore (server side) does not support OR conditions. NDB/AppEngine APIs supported this by executing multiple queries and combining the results. Check the below link to an issue that was raised for the Java API, but also applies to all languages:
https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1364
Have not come across any other high level APIs that support this, so you may have to do it yourself.
Upvotes: 1