Skip to content

Commit c712a11

Browse files
NaktibaldaDavertMik
authored andcommitted
[Db] Remove generateWhereClause method from SqlSrv (#5451)
Because it has no meaningful differences from the same functionality in the parent class. This removal allows to use more comparison operators in where condtions.
1 parent 01f8a49 commit c712a11

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/Codeception/Lib/Driver/SqlSrv.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,6 @@ public function cleanup()
4848
);
4949
}
5050

51-
protected function generateWhereClause(array &$criteria)
52-
{
53-
if (empty($criteria)) {
54-
return '';
55-
}
56-
57-
$params = [];
58-
foreach ($criteria as $k => $v) {
59-
if ($v === null) {
60-
$params[] = $this->getQuotedName($k) . " IS NULL ";
61-
unset($criteria[$k]);
62-
continue;
63-
}
64-
65-
if (strpos(strtolower($k), ' like') > 0) {
66-
$k = str_replace(' like', '', strtolower($k));
67-
$params[] = $this->getQuotedName($k) . " LIKE ? ";
68-
} else {
69-
$params[] = $this->getQuotedName($k) . " = ? ";
70-
}
71-
}
72-
73-
return 'WHERE ' . implode('AND ', $params);
74-
}
75-
7651
public function getQuotedName($name)
7752
{
7853
return '[' . str_replace('.', '].[', $name) . ']';

0 commit comments

Comments
 (0)