1
0
mirror of synced 2024-12-14 07:06:04 +03:00

[2.0][DDC-458] Fixed issue with IN () support when providing numeric values separated by comma without spaces.

This commit is contained in:
guilhermeblanco 2010-03-23 17:42:34 +00:00
parent fcbe01f800
commit b175427043
2 changed files with 6 additions and 1 deletions

View File

@ -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_]+'
); );

View File

@ -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)');