There doesn't seem to be any documentation on how to query the datastore using boolean parameters in the where statement of a GQL query.
I have been trying to query an AppEngine datastore based on a boolean column, but it's not returning any results in the data viewer of the AppEngine dashboard.
I've tried the following:
SELECT * FROM users WHERE active=TRUE
SELECT * FROM users WHERE active=True
Any help would be greatly appreciated.
As per the documentation the correct syntax for GQL boolean comparisons is
See https://developers.google.com/appengine/docs/python/datastore/gqlreference
Now if you are not getting results then either the
active
attribute is not True for all entities or the attributeactive
is not in fact a bool type.Just for completeness I performed the following query with expected results.