Log Message: |
* 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
of if-statements with lots of code duplication. Also, put
parentheses around the resulting SQL expression to make sure the
expression is correctly. This fixes a problem with WASKO tagging
rules, where the a FormEd expression of the form like "2 1 1980
date 1 1 1980 date - 93 *" would be incorrectly converted to the
SQL expression "93 * '1980-01-02'::date - '1980-01-01'::date"
|