Google App Engine Data Warehouse for Go Doesnโ€™t! = Filter

I recently messed around with GAE for go and found that it misses the fundamental! = (Not equal) filter in its data warehouse API.

https://developers.google.com/appengine/docs/go/datastore/queries#Go_Property_filters

It also does not have an operand condition OR.

Can someone tell me how can I filter data that is not equal to something?

+4
source share
2 answers

even languages โ€‹โ€‹that have a filter "! =" actually break it into two inequality filters (one> and one <). Maybe doing the equivalent will solve your problem?

select * from the table where param! = "test"

becomes equal

* , param > "test"

* , param < "test"

, ... , .

+4

, , , .

:

, , . , (<, < =, > , > =) . , , :

q := datastore.NewQuery("Person").
        Filter("BirthYear >=", minBirthYear).
        Filter("BirthYear <=", maxBirthYear)
+2

All Articles