0

I'm trying to use a query i know is supposed to return a value but it does'nt and i'm unable to filter using Type

heres the query:

SELECT Type FROM machinetype WHERE Brand = 'Avant'

heres the index serving:

Type ▲ , Brand ▲
Dan McGrath
  • 41,220
  • 11
  • 99
  • 130

1 Answers1

1

There are no results returned because you are missing to fetch them.

Python:

q = db.GqlQuery("""SELECT Type FROM machinetype WHERE Brand = 'Avant'""")
results = q.fetch(10)

or for one result

results = q.get()

Another possibility is that you modelled Brand as Text which makes it non-indexable or you have the code running in production and did never run the query on the development server and the index was not created.

loki
  • 2,271
  • 5
  • 32
  • 46