[web2py] Re: Keys and GAE

2011-03-01 Thread Matt
Hey Christian, After adding your suggested changes (with a minor tweak) I'm happy to say that it worked perfectly. So it needed in dal.py around 2810: elif filter.name=='__key__' and filter.op=='=': if filter.value==0: items = [] elif i

[web2py] Re: Keys and GAE

2011-03-01 Thread Matt
Thanks Christian for that code. I'll test it and get back to you. Cheers, Matt On Feb 3, 12:32 pm, howesc wrote: > Matt, > > sorry for the delay.  Since i don't have use for the key queries yet i'm > gonna ask you to try something, and then we can ask massimo to include > it > > * grab the

[web2py] Re: Keys and GAE

2011-02-02 Thread howesc
Matt, sorry for the delay. Since i don't have use for the key queries yet i'm gonna ask you to try something, and then we can ask massimo to include it * grab the latest web2py source from trunk, i have mercurial commit #1572 * in gluon/dal,py find line 2697. it should look like:

[web2py] Re: Keys and GAE

2011-01-18 Thread Matt
Hi cfn, Yes your suggestion would be preferable (and more workable). This would be a great addition to the GAE support included with web2py. Matt On Jan 14, 6:39 pm, howesc wrote: > Matt, > > given the arbitrary depth of the keys, perhaps it would be better to have > the user construct the key

[web2py] Re: Keys and GAE

2011-01-13 Thread howesc
Matt, given the arbitrary depth of the keys, perhaps it would be better to have the user construct the key, and then have some form of operator to indicate that you desire to run a key query? what are your thoughts on that? would that be better or worse from your perspective? cfh

[web2py] Re: Keys and GAE

2011-01-10 Thread Matt
Sorry that should have been: a = db(db.A.id == ['A:1', 'B:2', 'C:3', ''D:4') Matt On Jan 11, 4:39 pm, Matt wrote: > Thanks Christian, > > Your suggestion looks good. > > Could potentially specify the "tablename" like: > > db(db.address.id == ['user:21', 'address:96']) > > NB: this would need t

[web2py] Re: Keys and GAE

2011-01-10 Thread Matt
Thanks Christian, Your suggestion looks good. Could potentially specify the "tablename" like: db(db.address.id == ['user:21', 'address:96']) NB: this would need to support full recurvsive key generation so that you could specify: Assuming: C.parent = D.id = 4

Re: [web2py] Re: Keys and GAE

2011-01-10 Thread Christian Foster Howes
Matt, so now i understand completely. thanks for the clarification. this may be crazy talk, so hopefully those closer to the DAL will weigh in here, but take a look at line select_raw of dal.py (i don't have a line number since i have all modified versions, it's around 2670): el

[web2py] Re: Keys and GAE

2011-01-10 Thread Matt
Hi Christian, Thanks for your response. In order to save my entities (as part of an entity group) I've had to set the parent of the 'address' to be the 'user'. That way I can use a transaction to persist these multiple entities in one go. I.e. assuming: db.define_table('user',

[web2py] Re: Keys and GAE

2011-01-10 Thread howesc
I must admit i'm not following your example. why do you need to query by GAE __key__ rather than by ID? (i have not used ancestors in GAE so maybe that is why i'm mis-understanding). but your reference to my previous exchange made me look at this in the new DAL - and the !=, <, >, <=, and >=