[Formed-commits] r427 - in trunk: . formed/formed/plugins/export

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 24 18:02:05 CET 2010


Author: bh
Date: 2010-11-24 18:02:05 +0100 (Wed, 24 Nov 2010)
New Revision: 427

Modified:
   trunk/ChangeLog
   trunk/formed/formed/plugins/export/rules_sh.py
Log:
* formed/formed/plugins/export/rules_sh.py (sql_OperatorUnary):
Put parentheses around the comparison for the KNOWN operator in
the generated SQL to ensure correct evaluation order.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-11-24 16:58:10 UTC (rev 426)
+++ trunk/ChangeLog	2010-11-24 17:02:05 UTC (rev 427)
@@ -1,5 +1,11 @@
 2010-11-24  Bernhard Herzog  <bh at intevation.de>
 
+	* formed/formed/plugins/export/rules_sh.py (sql_OperatorUnary):
+	Put parentheses around the comparison for the KNOWN operator in
+	the generated SQL to ensure correct evaluation order.
+
+2010-11-24  Bernhard Herzog  <bh at intevation.de>
+
 	* formed/formed/plugins/export/rules_sh.py (binary_operator_map):
 	New.  Map binary formed expr operators to their SQL counterparts.
 	(sql_OperatorBinary): Use binary_operator_map instead of a cascade

Modified: trunk/formed/formed/plugins/export/rules_sh.py
===================================================================
--- trunk/formed/formed/plugins/export/rules_sh.py	2010-11-24 16:58:10 UTC (rev 426)
+++ trunk/formed/formed/plugins/export/rules_sh.py	2010-11-24 17:02:05 UTC (rev 427)
@@ -103,7 +103,7 @@
             ukv = '-9999999'
         elif isinstance(n, data.TextLeaf):
             ukv = "'unbekannt'"
-        out.append("%s != %s" % (recursive_parse(node.a, document), ukv))
+        out.append("(%s != %s)" % (recursive_parse(node.a, document), ukv))
     else:
         print "Unkown OperatorUnary %s" % node.operator.__name__
         out.append(recursive_parse(node.a, document))



More information about the Formed-commits mailing list