Implement ILIKE for sqlite

remotes/origin/fix-10825
Robin Appelman 2014-09-17 13:47:55 +07:00
parent 60587e9dcd
commit 67b1ec1faf
1 changed files with 1 additions and 1 deletions

@ -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 );