[2.0][DDC-458] Fixed issue with IN () support when providing numeric values separated by comma without spaces.
This commit is contained in:
parent
fcbe01f800
commit
b175427043
@ -124,7 +124,7 @@ class Lexer extends \Doctrine\Common\Lexer
|
|||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'[a-z_][a-z0-9_\:\\\]*[a-z0-9_]{1}',
|
'[a-z_][a-z0-9_\:\\\]*[a-z0-9_]{1}',
|
||||||
'(?:[0-9]+(?:[,\.][0-9]+)*)(?:e[+-]?[0-9]+)?',
|
'(?:[0-9]+(?:[\.][0-9]+)*)(?:e[+-]?[0-9]+)?',
|
||||||
"'(?:[^']|'')*'",
|
"'(?:[^']|'')*'",
|
||||||
'\?[1-9][0-9]*|:[a-z][a-z0-9_]+'
|
'\?[1-9][0-9]*|:[a-z][a-z0-9_]+'
|
||||||
);
|
);
|
||||||
|
@ -124,6 +124,11 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
|
|||||||
$this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id IN (1, 2)');
|
$this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id IN (1, 2)');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testInExpressionWithoutSpacesSupportedInWherePart()
|
||||||
|
{
|
||||||
|
$this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id IN (1,2,3)');
|
||||||
|
}
|
||||||
|
|
||||||
public function testNotInExpressionSupportedInWherePart()
|
public function testNotInExpressionSupportedInWherePart()
|
||||||
{
|
{
|
||||||
$this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id NOT IN (1)');
|
$this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id NOT IN (1)');
|
||||||
|
Loading…
Reference in New Issue
Block a user