On 10 Jul 2010, at 16:21, John Nagle wrote:
On 7/9/2010 11:08 PM, Dennis Lee Bieber wrote:
On Sat, 10 Jul 2010 06:56:13 +0200, Rene Veerman<rene7...@gmail.com>
declaimed the following in gmane.comp.python.general:
hi.
i'm using this function;
def dbCacheGet(self, appParams):
results = db.GqlQuery(
"SELECT * "
"FROM DBcache "
"WHERE url='"+appParams['urlCalled']+"'"
).fetch(1)
if results.count('*')==0:
return None
else:
return results
i dont think this will work correctly.
i need a function that returns the complete count in the results
variable.
This is really a Google AppEngine question. Ask in their support
forums.
http://groups.google.com/group/google-appengine-python would be a good
place to start.
It's worth noting that for many database queries, asking how many
hits there are can cost almost as much as actually retrieving them.
That is the case with the App Engine datastore. If your counts contain
more than a few hundred results then you would be better so store them
somewhere.
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list