I have a user in my system who has created an entity which I'd like to retrieve. I'm attempting to do this using a filter because it's supposed to be faster than a call to the gql method. However, the filter returns no results and gql works.
randy_res = Vote.all().filter('created_by=', randy).fetch(limit=10)
randy_res = Vote.gql('WHERE...
Hi Everyone,
I have an entity with a selfreferencyproperty and I wanted to search with a WHERE condition on the selfref field's key. My intent is to reduce DB hits by building a list of keys, then iterating over the same entity to build a nested list. I am using this list to hit memcache.get_multi() for a cached dictionary version of th...
Is it possible to select from a google app engine db where the key of a db.Model object is not in a given list? If so, what would be the syntax?
Ex of a model class:
class Spam(db.Model):
field1 = db.BooleanProperty(default=false)
field2 = db.IntegerProperty()
Example of a query which I'd like to work but can't figure out:
...
I have two entity kinds in my python GAE app - both with similar attributes - and I'd like to query both lists and order the result according to an attribute common to both kinds. So something along the lines of:
db.GqlQuery("SELECT * FROM Video1, Video2 ORDER BY views DESC").fetch(1000)
Can I do this in GQL directly?
...
I have this code to find all the nodes where property branches is empty.
nobranches=TreeNode.all()
for tree in nobranches:
if tree.branches==[]:
I wanted to find a better, more efficient way to do this. A meathod where I don't have to retrieve all the TreeNodes. I have tried TreeNode.all().filter(branches=[]) but this gi...