Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DDC-1360 - Add support for quoting dot chained identifiers.
- Loading branch information
Showing
4 changed files
with
57 additions
and
13 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
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 |
---|---|---|
|
@@ -171,8 +171,23 @@ public function testModifyLimitQueryWithDescOrderBy() | |
$this->assertEquals('SELECT TOP 10 * FROM user ORDER BY username DESC', $sql); | ||
} | ||
|
||
/** | ||
* @group DDC-1360 | ||
*/ | ||
public function testQuoteIdentifier() | ||
{ | ||
$this->assertEquals('[fo][o]', $this->_platform->quoteIdentifier('fo]o')); | ||
$this->assertEquals('[test]', $this->_platform->quoteIdentifier('test')); | ||
$this->assertEquals('[test].[test]', $this->_platform->quoteIdentifier('test.test')); | ||
} | ||
} | ||
|
||
/** | ||
* @group DDC-1360 | ||
*/ | ||
public function testQuoteSingleIdentifier() | ||
{ | ||
$this->assertEquals('[fo][o]', $this->_platform->quoteSingleIdentifier('fo]o')); | ||
$this->assertEquals('[test]', $this->_platform->quoteSingleIdentifier('test')); | ||
$this->assertEquals('[test.test]', $this->_platform->quoteSingleIdentifier('test.test')); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
beberlei
Author
Member
|
||
} | ||
} |
This can never happen.
It must detect for schema separator (which I suggest to be a platform constant) and call quote multiple or single accordingly.