Browse Source

Implement ILIKE for sqlite

tags/v8.0.0alpha1
Robin Appelman 9 years ago
parent
commit
67b1ec1faf
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      lib/private/db/adaptersqlite.php

+ 1
- 1
lib/private/db/adaptersqlite.php 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 );

Loading…
Cancel
Save