Skip to content

Commit 04a547e

Browse files
committed
revert not in pr
1 parent 91a6afe commit 04a547e

2 files changed

Lines changed: 0 additions & 21 deletions

File tree

src/Illuminate/Database/Query/Builder.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -616,17 +616,6 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
616616
return $this->whereNested($column, $boolean);
617617
}
618618

619-
// If the operator is a literal string 'in' or 'not in', we will assume that
620-
// the developer wants to use the "whereIn / whereNotIn" methods for this
621-
// operation and proxy the query through those methods from this point.
622-
if ($operator == 'in') {
623-
return $this->whereIn($column, $value, $boolean);
624-
}
625-
626-
if ($operator == 'not in') {
627-
return $this->whereNotIn($column, $value, $boolean);
628-
}
629-
630619
// If the given operator is not found in the list of valid operators we will
631620
// assume that the developer is just short-cutting the '=' operators and
632621
// we will set the operators to '=' and set the values appropriately.

tests/Database/DatabaseQueryBuilderTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,6 @@ public function testBasicWhereIns()
644644
$this->assertEquals('select * from "users" where "id" in (?, ?, ?)', $builder->toSql());
645645
$this->assertEquals([0 => 1, 1 => 2, 2 => 3], $builder->getBindings());
646646

647-
$builder = $this->getBuilder();
648-
$builder->select('*')->from('users')->where('id', 'in', [1, 2, 3]);
649-
$this->assertEquals('select * from "users" where "id" in (?, ?, ?)', $builder->toSql());
650-
$this->assertEquals([0 => 1, 1 => 2, 2 => 3], $builder->getBindings());
651-
652647
$builder = $this->getBuilder();
653648
$builder->select('*')->from('users')->where('id', '=', 1)->orWhereIn('id', [1, 2, 3]);
654649
$this->assertEquals('select * from "users" where "id" = ? or "id" in (?, ?, ?)', $builder->toSql());
@@ -662,11 +657,6 @@ public function testBasicWhereNotIns()
662657
$this->assertEquals('select * from "users" where "id" not in (?, ?, ?)', $builder->toSql());
663658
$this->assertEquals([0 => 1, 1 => 2, 2 => 3], $builder->getBindings());
664659

665-
$builder = $this->getBuilder();
666-
$builder->select('*')->from('users')->where('id', 'not in', [1, 2, 3]);
667-
$this->assertEquals('select * from "users" where "id" not in (?, ?, ?)', $builder->toSql());
668-
$this->assertEquals([0 => 1, 1 => 2, 2 => 3], $builder->getBindings());
669-
670660
$builder = $this->getBuilder();
671661
$builder->select('*')->from('users')->where('id', '=', 1)->orWhereNotIn('id', [1, 2, 3]);
672662
$this->assertEquals('select * from "users" where "id" = ? or "id" not in (?, ?, ?)', $builder->toSql());

0 commit comments

Comments
 (0)