1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-18 20:02:20 +02:00

Add support for escapeLike without % on any side (#346) (BC break)

This commit is contained in:
Ashus
2019-11-25 13:53:33 +01:00
committed by David Grudl
parent 9d4bef53d3
commit 294787a26e
11 changed files with 24 additions and 14 deletions

View File

@@ -71,3 +71,9 @@ Assert::truthy($conn->fetchSingle('SELECT ? LIKE %~like~', 'baa', 'aa'));
Assert::truthy($conn->fetchSingle('SELECT ? LIKE %~like~', 'aab', 'aa'));
Assert::falsey($conn->fetchSingle('SELECT ? LIKE %~like~', 'bba', '%a'));
Assert::truthy($conn->fetchSingle('SELECT ? LIKE %~like~', 'b%a', '%a'));
// matches
Assert::truthy($conn->fetchSingle('SELECT ? LIKE %like', 'a', 'a'));
Assert::falsey($conn->fetchSingle('SELECT ? LIKE %like', 'a', 'aa'));
Assert::falsey($conn->fetchSingle('SELECT ? LIKE %like', 'a', 'b'));