Skip to content
Permalink
Browse files

Use whereInList() and whereNotInList().

  • Loading branch information...
dereuromark committed Mar 15, 2018
1 parent 9a1e49e commit 81edbac8898fdce093991f683970f98aa33a70c1
Showing with 6 additions and 6 deletions.
  1. +2 −2 src/Database/Query.php
  2. +4 −4 tests/TestCase/Database/QueryTest.php
@@ -906,7 +906,7 @@ public function where($conditions = null, $types = [], $overwrite = false)
* @param array $options Options
* @return $this
*/
public function whereInArray($field, array $values, array $options = [])
public function whereInList($field, array $values, array $options = [])
{
$options += [
'types' => [],
@@ -933,7 +933,7 @@ public function whereInArray($field, array $values, array $options = [])
* @param array $options Options
* @return $this
*/
public function whereNotInArray($field, array $values, array $options = [])
public function whereNotInList($field, array $values, array $options = [])
{
$options += [
'types' => [],
@@ -1724,7 +1724,7 @@ public function testWhereInArray()
$query = new Query($this->connection);
$query->select(['id'])
->from('articles')
->whereInArray('id', [2, 3])
->whereInList('id', [2, 3])
->execute();
$sql = $query->sql();
@@ -1749,7 +1749,7 @@ public function testWhereInArrayEmpty()
$query = new Query($this->connection);
$query->select(['id'])
->from('articles')
->whereInArray('id', [], ['allowEmpty' => true])
->whereInList('id', [], ['allowEmpty' => true])
->execute();
$sql = $query->sql();
@@ -1774,7 +1774,7 @@ public function testWhereNotInArray()
$query = new Query($this->connection);
$query->select(['id'])
->from('articles')
->whereNotInArray('id', [1, 3])
->whereNotInList('id', [1, 3])
->execute();
$sql = $query->sql();
@@ -1799,7 +1799,7 @@ public function testWhereNotInArrayEmpty()
$query = new Query($this->connection);
$query->select(['id'])
->from('articles')
->whereNotInArray('id', [], ['allowEmpty' => true])
->whereNotInList('id', [], ['allowEmpty' => true])
->execute();
$sql = $query->sql();

0 comments on commit 81edbac

Please sign in to comment.
You can’t perform that action at this time.