#77 SVN Trunk Rev. 716: selectBy() does not accept id constraint

closed-fixed
nobody
General (125)
5
2005-04-11
2005-04-05
No

For example: MyTable.selectBy(id=5) does not work,
since _SO_columnClause looks up columns by key and 'id'
is not in soClass.sqlmeta._columnDict.

I've attached a fixed version of the latest
dbconnection.py (from SVN trunk revision 716). Probably
not the best one, but handles id and a bit faster due
to less name lookups. I've fixed only _SO_columnClause().

I know, that MyTable.get(id_value) can be used instead
of MyTable.select(id=id_value), but the later could be
handy in some cases where constraints created dinamically.

Note: ops = {None: "IS"} is a nice trick, anyway.

Greetings: Complex

Discussion

  • Viktor Ferenczi

    Viktor Ferenczi - 2005-04-05

    selectBy() fixed, now accepts id constraint.

     
  • David M. Cook

    David M. Cook - 2005-04-06

    Logged In: YES
    user_id=668544

    I modified my selectBy patch [1176359] to handle this case.

     
  • Oleg Broytman

    Oleg Broytman - 2005-04-08

    Logged In: YES
    user_id=4799

    Please do not attch entire files - attach context diffs.

     
  • Oleg Broytman

    Oleg Broytman - 2005-04-11
    • status: open --> closed-fixed
     
  • Oleg Broytman

    Oleg Broytman - 2005-04-11

    Logged In: YES
    user_id=4799

    Fixed at revision 721 (patch 1176359).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks