forked from beberlei/DoctrineExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed exception that is thrown when combining the sqlite CONCAT_WS ex…
…tension with a LimitSubqueryOutputWalker
- Loading branch information
1 parent
fccc6a9
commit af72c4a
Showing
2 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace DoctrineExtensions\Tests\Query\Sqlite; | ||
|
||
use DoctrineExtensions\Tests\Query\SqliteTestCase; | ||
|
||
class ConcatWsTest extends SqliteTestCase | ||
{ | ||
public function testConcatWs() | ||
{ | ||
$dql = "SELECT CONCAT_WS(',', p.id, p.name) FROM DoctrineExtensions\\Tests\\Entities\\Product p"; | ||
|
||
$this->assertEquals( | ||
"SELECT (IFNULL(p0_.id, '') || ',' || IFNULL(p0_.name, '')) AS {$this->columnAlias} FROM Product p0_", | ||
$this->entityManager->createQuery($dql)->getSql() | ||
); | ||
} | ||
} |