Major bugfix to avoid "IFNULL and CAST" on CASE

This commit is contained in:
Bernardo Damele 2009-01-19 21:27:51 +00:00
parent 96db179ffe
commit c25b49e80e
2 changed files with 7 additions and 3 deletions

View File

@ -184,6 +184,9 @@ class Agent:
@rtype: C{str} @rtype: C{str}
""" """
if field.startswith("(CASE"):
nulledCastedField = field
else:
nulledCastedField = queries[kb.dbms].cast % field nulledCastedField = queries[kb.dbms].cast % field
nulledCastedField = queries[kb.dbms].isnull % nulledCastedField nulledCastedField = queries[kb.dbms].isnull % nulledCastedField

View File

@ -83,7 +83,8 @@ SQL_STATEMENTS = {
" limit ", " limit ",
" offset ", " offset ",
" union all ", " union all ",
" rownum as ", ), " rownum as ",
"(case ", ),
"SQL data definition": ( "SQL data definition": (
"create ", "create ",