Add handling of NOT IN and =\[\] and \!\[\]

This commit is contained in:
Isaac Connor 2022-02-15 18:51:54 -05:00 committed by Ben Dailey
parent e523777ece
commit b32164e992
1 changed files with 2 additions and 1 deletions

View File

@ -174,6 +174,7 @@ class FilterTerm {
case 'IN' : case 'IN' :
return ' IN '; return ' IN ';
case '![]' : case '![]' :
case 'NOT IN' :
return ' NOT IN '; return ' NOT IN ';
case 'EXISTS' : case 'EXISTS' :
return ' EXISTS '; return ' EXISTS ';
@ -303,7 +304,7 @@ class FilterTerm {
} }
$sql .= $this->sql_operator(); $sql .= $this->sql_operator();
$values = $this->sql_values(); $values = $this->sql_values();
if ( (count($values) > 1) or ($this->op == 'IN') or ($this->op == 'NOT IN') ) { if ((count($values) > 1) or ($this->op == 'IN') or ($this->op == 'NOT IN') or ($this->op == '=[]') or ($this->op == '![]')) {
$sql .= '('.join(',', $values).')'; $sql .= '('.join(',', $values).')';
} else { } else {
$sql .= $values[0]; $sql .= $values[0];