Skip to content

Commit

Permalink
Issue #6: Use REGEXP for REGEXP BINARY, even though it doesn't ignore…
Browse files Browse the repository at this point in the history
… case correctly. Add a note about this limitation to the README.md file.
  • Loading branch information
jlfranklin committed May 19, 2018
1 parent ae5b860 commit c7fc637
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ This driver contains the SQLite database driver for Silkscreen CMS.
To enable this driver, place it in the `drivers` directory in the root of the
Silkscreen CMS site or in the sites/[yoursite]/drivers directory.

Limitations
-----------

The SQLite driver has some limitations that keep it from being fully compatible
with the other Silkscreen database drivers.

* REGEXP BINARY is not supported by SQLite, so the case-insensitive REGEXP is
used instead.

License
-------

Expand Down
2 changes: 2 additions & 0 deletions database.inc
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ class DatabaseConnection_sqlite extends DatabaseConnection {
'NOT LIKE' => array('postfix' => " ESCAPE '\\'"),
'LIKE BINARY' => array('postfix' => " ESCAPE '\\'", 'operator' => 'GLOB'),
'NOT LIKE BINARY' => array('postfix' => " ESCAPE '\\'", 'operator' => 'NOT GLOB'),
'REGEXP BINARY' => array('postfix' => " ESCAPE '\\'", 'operator' => 'REGEXP'),
'NOT REGEXP BINARY' => array('postfix' => " ESCAPE '\\'", 'operator' => 'NOT REGEXP'),
);
return isset($specials[$operator]) ? $specials[$operator] : NULL;
}
Expand Down

0 comments on commit c7fc637

Please sign in to comment.