Implement ILIKE for sqlite

This commit is contained in:
Robin Appelman 2014-09-17 13:47:55 +02:00
parent 60587e9dcd
commit 67b1ec1faf
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ namespace OC\DB;
class AdapterSqlite extends Adapter {
public function fixupStatement($statement) {
$statement = str_replace(' ILIKE ', ' LIKE ', $statement);
$statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement);
$statement = str_replace( '`', '"', $statement );
$statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement );
$statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement );