#21 Support None objects in where clauses via where Col IS NULL

closed-out-of-date
nobody
None
5
2005-08-10
2005-08-05
No

Currently, SQLObject handles None objects in select WHERE
clauses slightly incorrectly; dbconnection.py generates statements
like the following:

SELECT * FROM Table WHERE Col = NULL;

However, this doesn't actually match columns that are NULL. For
that, you need:

SELECT * FROM Table WHERE Col IS NULL;

This patch, against SQLObject 0.6.1, implements this functionality
for all SELECTs generated by dbconnection.py when one of the
values is None.

However, we don't bother doing this for SELCT tests against 'id'
columns (which probably should never be NULL).

Discussion

  • Ben Gertzfield

    Ben Gertzfield - 2005-08-05

    Implement 'WHERE Col IS NULL' in SELECT clause generation

     
  • Oleg Broytman

    Oleg Broytman - 2005-08-10

    Logged In: YES
    user_id=4799

    This has been implemented and applied in the Subversion
    repository long ago.

     
  • Oleg Broytman

    Oleg Broytman - 2005-08-10
    • status: open --> closed-out-of-date
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks