Commit 5d7d3c8e authored by Steve Müller's avatar Steve Müller

Merge pull request #887 from janschoenherr/master

use REGEXP operator for sqlite
parents 933f6355 6782f30a
...@@ -45,7 +45,7 @@ class SqlitePlatform extends AbstractPlatform ...@@ -45,7 +45,7 @@ class SqlitePlatform extends AbstractPlatform
*/ */
public function getRegexpExpression() public function getRegexpExpression()
{ {
return 'RLIKE'; return 'REGEXP';
} }
/** /**
......
...@@ -31,7 +31,7 @@ class SqlitePlatformTest extends AbstractPlatformTestCase ...@@ -31,7 +31,7 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
public function testGeneratesSqlSnippets() public function testGeneratesSqlSnippets()
{ {
$this->assertEquals('RLIKE', $this->_platform->getRegexpExpression(), 'Regular expression operator is not correct'); $this->assertEquals('REGEXP', $this->_platform->getRegexpExpression(), 'Regular expression operator is not correct');
$this->assertEquals('SUBSTR(column, 5, LENGTH(column))', $this->_platform->getSubstringExpression('column', 5), 'Substring expression without length is not correct'); $this->assertEquals('SUBSTR(column, 5, LENGTH(column))', $this->_platform->getSubstringExpression('column', 5), 'Substring expression without length is not correct');
$this->assertEquals('SUBSTR(column, 0, 5)', $this->_platform->getSubstringExpression('column', 0, 5), 'Substring expression with length is not correct'); $this->assertEquals('SUBSTR(column, 0, 5)', $this->_platform->getSubstringExpression('column', 0, 5), 'Substring expression with length is not correct');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment