Commit 2bd2232a authored by janschoenherr's avatar janschoenherr Committed by Steve Müller

use REGEXP operator for sqlite

parent d2a24c00
...@@ -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';
} }
/** /**
......
...@@ -33,7 +33,7 @@ class SqlitePlatformTest extends AbstractPlatformTestCase ...@@ -33,7 +33,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