Index: Common.pm =================================================================== --- Common.pm (revision 779) +++ Common.pm (revision 780) @@ -177,11 +177,14 @@ $mode = $negation ? 'IS NOT' : 'IS'; return "$field $mode NULL", []; } elsif (ref($value) eq 'ARRAY' and @$value) { - my $values_string = '?, 'x(scalar (@$value)-1).'?'; - return " ($field $mode ($values_string)) ", $value; - } elsif (ref($value) eq 'ARRAY') { - # skip empty array - return ($negation ? ' TRUE ' : ' FALSE '), []; + my $values_string = '?, 'x(scalar (@$value)-1).'?'; + return " ($field $mode ($values_string)) ", $value; + } elsif (ref($value) eq 'ARRAY') { + # skip empty array + return ($negation ? ' TRUE ' : ' FALSE '), []; + } elsif ( $value eq 'positive' || $value eq 'negative' ) { + $mode = $value eq 'positive' ? '>' : '<'; + return "$field $mode 0", []; } else { return " ($field $mode (?)) ", [$value]; }