by request

This commit is contained in:
Miroslav Stampar 2011-08-23 21:45:01 +00:00
parent 606debe55c
commit 01014eca17

View File

@ -281,13 +281,13 @@ class Agent:
# SQLite version 2 does not support neither CAST() nor IFNULL(), # SQLite version 2 does not support neither CAST() nor IFNULL(),
# introduced only in SQLite version 3 # introduced only in SQLite version 3
if Backend.isDbms(DBMS.SQLITE): if Backend.isDbms(DBMS.SQLITE) or conf.noCast:
return field return field
if field.startswith("(CASE") or field.startswith("(IIF"): if field.startswith("(CASE") or field.startswith("(IIF"):
nulledCastedField = field nulledCastedField = field
else: else:
nulledCastedField = (queries[Backend.getIdentifiedDbms()].cast.query % field) if not conf.noCast else field nulledCastedField = queries[Backend.getIdentifiedDbms()].cast.query % field
if Backend.isDbms(DBMS.ACCESS): if Backend.isDbms(DBMS.ACCESS):
nulledCastedField = queries[Backend.getIdentifiedDbms()].isnull.query % (nulledCastedField, nulledCastedField) nulledCastedField = queries[Backend.getIdentifiedDbms()].isnull.query % (nulledCastedField, nulledCastedField)
else: else: