mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-15 01:09:57 +09:00
Issue 62: xml Query Supported Not Like
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9621 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
abae1ca3b0
commit
84e7cb3e2f
7 changed files with 161 additions and 0 deletions
|
|
@ -143,4 +143,52 @@
|
|||
and (`group_srl` >= 1 or `group_srl` = -1 or `group_srl` = -2) group by `module_srl`';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
function test_Like_Clause(){
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/opage.getOpageList.like.xml";
|
||||
$argsString = '$args->s_mid = "test";';
|
||||
$expected = 'select *
|
||||
from `xe_modules` as `modules`
|
||||
where `module` = \'opage\'
|
||||
and (`mid` like \'%test%\')
|
||||
order by `module_srl` desc
|
||||
limit 0, 20';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
function test_NotLike_Clause(){
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/opage.getOpageList.notlike.xml";
|
||||
$argsString = '$args->s_mid = "test";';
|
||||
$expected = 'select *
|
||||
from `xe_modules` as `modules`
|
||||
where `module` = \'opage\'
|
||||
and (`mid` not like \'%test%\')
|
||||
order by `module_srl` desc
|
||||
limit 0, 20';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
function test_NotLikeTail_Clause(){
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/opage.getOpageList.notliketail.xml";
|
||||
$argsString = '$args->s_mid = "test";';
|
||||
$expected = 'select *
|
||||
from `xe_modules` as `modules`
|
||||
where `module` = \'opage\'
|
||||
and (`mid` not like \'%test\')
|
||||
order by `module_srl` desc
|
||||
limit 0, 20';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
function test_NotLikePrefix_Clause(){
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/opage.getOpageList.notlikeprefix.xml";
|
||||
$argsString = '$args->s_mid = "test";';
|
||||
$expected = 'select *
|
||||
from `xe_modules` as `modules`
|
||||
where `module` = \'opage\'
|
||||
and (`mid` not like \'test%\')
|
||||
order by `module_srl` desc
|
||||
limit 0, 20';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue