What does it mean to say that “the where clause of select statements can perform >, >=, <, <= operations on one column only”?

StackOverflow https://stackoverflow.com/questions/1461444

Question

According to the Wikipedia article on Google App Engine:

The where clause of select statements can perform >, >=, <, <= operations on one column only. Therefore, only simple where clauses can be constructed.

What does this mean?

Was it helpful?

Solution

See this document:

For example, this query is allowed:

select from Person where birthYear >= minBirthYearParam
                      && birthYear <= maxBirthYearParam

However, this query is not allowed, because it uses inequality filters on two different properties in the same query:

select from Person where birthYear >= minBirthYearParam
                      && height >= minHeightParam   // ERROR

OTHER TIPS

Sounds to me like you can't compare two columns to each other: WHERE Column1 > Column2 wouldn't work for example.

Google explains it in their article on querying the App Engine datastore. Look for the bulleted list titled, "The filter operator can be any of the following:"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top