mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix #1202 allow REGEXP operator in XML query
This commit is contained in:
parent
b1e01b0fc5
commit
5ddf928869
1 changed files with 27 additions and 20 deletions
|
|
@ -122,18 +122,19 @@ class Condition
|
|||
case 'more' :
|
||||
case 'excess' :
|
||||
case 'less' :
|
||||
case 'below' :
|
||||
case 'gte' :
|
||||
case 'gt' :
|
||||
case 'lte' :
|
||||
case 'lt' :
|
||||
case 'below' :
|
||||
case 'gte' :
|
||||
case 'gt' :
|
||||
case 'lte' :
|
||||
case 'lt' :
|
||||
case 'like_tail' :
|
||||
case 'like_prefix' :
|
||||
case 'like' :
|
||||
case 'notlike_tail' :
|
||||
case 'notlike_prefix' :
|
||||
case 'notlike' :
|
||||
case 'not_like' :
|
||||
case 'regexp' :
|
||||
case 'notregexp' :
|
||||
case 'in' :
|
||||
case 'notin' :
|
||||
case 'not_in' :
|
||||
|
|
@ -142,7 +143,7 @@ class Condition
|
|||
case 'xor':
|
||||
case 'not':
|
||||
case 'notequal' :
|
||||
case 'not_equal' :
|
||||
case 'not_equal' :
|
||||
// if variable is not set or is not string or number, return
|
||||
if(!isset($this->_value))
|
||||
{
|
||||
|
|
@ -173,7 +174,7 @@ class Condition
|
|||
break;
|
||||
}
|
||||
case 'null':
|
||||
case 'notnull':
|
||||
case 'notnull':
|
||||
case 'not_null':
|
||||
break;
|
||||
default:
|
||||
|
|
@ -197,23 +198,23 @@ class Condition
|
|||
|
||||
switch($operation)
|
||||
{
|
||||
case 'equal' :
|
||||
case 'equal' :
|
||||
return $name . ' = ' . $value;
|
||||
break;
|
||||
case 'more' :
|
||||
case 'gte' :
|
||||
case 'more' :
|
||||
case 'gte' :
|
||||
return $name . ' >= ' . $value;
|
||||
break;
|
||||
case 'excess' :
|
||||
case 'gt' :
|
||||
case 'excess' :
|
||||
case 'gt' :
|
||||
return $name . ' > ' . $value;
|
||||
break;
|
||||
case 'less' :
|
||||
case 'lte' :
|
||||
case 'less' :
|
||||
case 'lte' :
|
||||
return $name . ' <= ' . $value;
|
||||
break;
|
||||
case 'below' :
|
||||
case 'lt' :
|
||||
case 'below' :
|
||||
case 'lt' :
|
||||
return $name . ' < ' . $value;
|
||||
break;
|
||||
case 'like_tail' :
|
||||
|
|
@ -223,9 +224,15 @@ class Condition
|
|||
case 'notlike_tail' :
|
||||
case 'notlike_prefix' :
|
||||
case 'notlike' :
|
||||
case 'not_like' :
|
||||
case 'not_like' :
|
||||
return $name . ' NOT LIKE ' . $value;
|
||||
break;
|
||||
case 'regexp' :
|
||||
return $name . ' REGEXP ' . $value;
|
||||
break;
|
||||
case 'notregexp' :
|
||||
return $name . ' NOT REGEXP ' . $value;
|
||||
break;
|
||||
case 'in' :
|
||||
return $name . ' IN ' . $value;
|
||||
break;
|
||||
|
|
@ -233,11 +240,11 @@ class Condition
|
|||
case 'not_in' :
|
||||
return $name . ' NOT IN ' . $value;
|
||||
break;
|
||||
case 'notequal' :
|
||||
case 'notequal' :
|
||||
case 'not_equal' :
|
||||
return $name . ' <> ' . $value;
|
||||
break;
|
||||
case 'notnull' :
|
||||
case 'notnull' :
|
||||
case 'not_null' :
|
||||
return $name . ' IS NOT NULL ';
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue