The belongs is fine but I have a couple of problems:

1) adding __key__ in extra is not backward compatible because it
changes the way records in Rows is acceessed

2) if you say db(db.table.id<1000) it does not actually select records
if id<1000 but Key(id)<Key(1000).

Did I misunderstand the source?

On Jun 9, 10:54 pm, Christian Foster Howes <how...@umich.edu> wrote:
> Hi all,
>
> attached is a patch for gql.py.  Please review and Massimo, if people
> like this, can we add it to trunk?
>
> what does it do?  it allows you to do key queries on Google App Engine.
>   this means that you can now perform all ID queries on tables in google
> app engine.  for example:
>
>      belongs = db(db.test_tbl.id.belongs([69126,69127])).select()
>      eq = db(db.test_tbl.id==69126).select()
>      neq = db(db.test_tbl.id!=69126).select()
>      lt = db(db.test_tbl.id<69126).select()
>      gt = db(db.test_tbl.id>69126).select()
>      lte = db(db.test_tbl.id<=69126).select()
>      gte = db(db.test_tbl.id>=69126).select()
>      all = db(db.test_tbl.id>0).select()
>
> it also adds "__key__" to _extra on each row in the result...just in
> case you really wanted to see that google key.
>
> if i missed some test cases please let me know and i'll verify them as well.
>
> thanks!
>
> Christian
>
>  gql_key_query_patch.diff
> 3KViewDownload

Reply via email to