The query API

Now that we understand how queries work under the hood, along with its their limitations and workarounds, it is time to learn more about the query API. As we have already seen briefly, there are two interfaces through which you can query your data. One is the object-oriented way where you can create query objects, call methods on them to tailor them according to your needs, and fetch results. The other is the SQL-like interface, which only allows you to read data. Thus, the only available statement is SELECT. This language is called GQL. Whatever queries you issue in GQL are translated into its equivalent object-oriented API.

Previously, the datastore API was available under the db package and was not very intuitive. Besides this, ...

Get Mastering Google App Engine now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.