3

How to query not null values in google app engine admin console using GQL Syntax? Consider i am having a table with property FirstName. I need to get the values for which the First Name is not null. How do i do that? whats the query?

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130

1 Answers1

1

You don't really need a special query for this :

From the docs:

Datastore queries which refer to a property never return entities which don't have some value for that property.

So if you use FirstName in your GQL, it will only return entities that HAVE a FirstName.

Patrice
  • 4,641
  • 9
  • 33
  • 43
  • Note: conditions of the form property = NULL check to see whether a null value is explicitly stored in the datastore for that property. This is not the same as checking to see if the entity lacks any value for the property! Datastore queries which refer to a property never return entities which don't have some value for that property. – Konsol Labapen Oct 16 '15 at 01:05