Tony the Pony
Tony the Pony

Reputation: 41407

Parameterized queries in Google App Engine Datastore?

The GAE Datastore provides a class PreparedQuery, which is the compiled form of a query. But is there such a thing as a parameterized query (e.g. lastname = {?}) ? There’s no point in compiling a query if it needs to be recompiled every time a parameter changes (unless the same exact query is run over and over again, in which case its results should be cached, anyway).

Did I overlook something in the documentation?

Upvotes: 1

Views: 178

Answers (1)

Nick Johnson
Nick Johnson

Reputation: 101149

No, there isn't - parameters are specified when you construct the Query object. 'Preparing' a query is not an expensive operation, however - no datastore roundtrips are involved.

Upvotes: 2

Related Questions