mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-13 16:34:52 +09:00
Added support for CUBRID 8.4.1. "RLIKE" statement.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10070 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
353a842d68
commit
2ceea18a77
5 changed files with 52 additions and 7 deletions
|
|
@ -23,13 +23,27 @@
|
|||
|
||||
switch($operation) {
|
||||
case 'like_prefix' :
|
||||
$this->value = $value.'%';
|
||||
if(defined('__CUBRID_VERSION__')
|
||||
&& __CUBRID_VERSION__ >= '8.4.1') {
|
||||
$this->value = '^' . str_replace('%', '(.*)', preg_quote($value));
|
||||
}
|
||||
else
|
||||
$this->value = $value.'%';
|
||||
break;
|
||||
case 'like_tail' :
|
||||
$this->value = '%'.$value;
|
||||
if(defined('__CUBRID_VERSION__')
|
||||
&& __CUBRID_VERSION__ >= '8.4.1')
|
||||
$this->value = str_replace('%', '(.*)', preg_quote($value)) . '$';
|
||||
else
|
||||
$this->value = '%'.$value;
|
||||
break;
|
||||
case 'like' :
|
||||
$this->value = '%'.$value.'%';
|
||||
if(defined('__CUBRID_VERSION__')
|
||||
&& __CUBRID_VERSION__ >= '8.4.1') {
|
||||
$this->value = str_replace('%', '(.*)', preg_quote($value));
|
||||
}
|
||||
else
|
||||
$this->value = '%'.$value.'%';
|
||||
break;
|
||||
case 'notlike' :
|
||||
$this->value = '%'.$value.'%';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue