如何在 GQL 中查询 NotEqual 条件

How to query NotEqual condition in GQL

我想过滤掉一些数据。我尝试了不同的标准 如何使用 GQL 不相等条件查询?

Cloud Datastore 无法做到这一点。请在此处查看运算符列表:

https://cloud.google.com/datastore/docs/reference/gql_reference#operators_and_comparisons

Comparators are either equivalence comparators: =, IN, CONTAINS, = NULL, HAS ANCESTOR, and HAS DESCENDANT, or inequality comparators: <, <=, >, and >=.

这点也值得注意:

There is no way to determine whether an entity lacks a value for a property (that is, whether the property has no value). If you use a condition of the form property = NULL, what will occur is a check whether a null value is explicitly stored for that property. Datastore queries that refer to a property will never return entities that don't have a value for that property.