View source on GitHub |
Check a datastore query with normalized filters, orders.
google.appengine.datastore.datastore_stub_util.CheckQuery(
query, filters, orders, max_query_components
)
Raises an ApplicationError when any of the following conditions are violated:
- transactional queries have an ancestor
- queries that are not too large (sum of filters, orders, ancestor <= max_query_components)
- ancestor (if any) app and namespace match query app and namespace
- kindless queries only filter on key and only sort on key ascending
- multiple inequality (<, <=, >, >=) filters all applied to the same property
- filters on key compare to a reference in the same app and namespace as the query
- if an inequality filter on prop X is used, the first order (if any) must be on X
Args | |
---|---|
query
|
query to validate |
filters
|
normalized (by datastore_index.Normalize) filters from query |
orders
|
normalized (by datastore_index.Normalize) orders from query |
max_query_components
|
limit on query complexity |