google-code-export / ibm-db

Automatically exported from code.google.com/p/ibm-db
1 stars 0 forks source link

sql.true() does not work for IBM DB2 #157

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Details are here:

https://bitbucket.org/zzzeek/sqlalchemy/issue/3120/sqltrue-does-not-work-for-ibm
-db2

What version of the product are you using? On what operating system?

ibm-db-sa at this commit: a945be56a4ff07f14b944bd654babbde79539a17

Original issue reported on code.google.com by mattrie...@gmail.com on 10 Jul 2014 at 12:09

GoogleCodeExporter commented 9 years ago
We're running against sqlalchemy 0.7.9 and RHEL 6.5.

Original comment by mattrie...@gmail.com on 10 Jul 2014 at 12:43

GoogleCodeExporter commented 9 years ago
Hitting this on sqla 0.8.4 too.  I discussed this with Mike Bayer in openstack 
IRC and it sounds like any sa backend that doesn't support native boolean will 
fail on a construct like this if using sqla < 0.9.

So my solution is to just patch the DB2Compiler class to override 
visit_true/visit_false.  The patch is attached.

The patch is based on commit a945be56a4ff07f14b944bd654babbde79539a17.

Original comment by mattrie...@gmail.com on 11 Jul 2014 at 7:18

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by rahul.pr...@in.ibm.com on 15 Jul 2014 at 12:16