Skip to content
Permalink
Browse files

revert not in pr

  • Loading branch information...
taylorotwell committed Apr 18, 2019
1 parent 91a6afe commit 04a547ee25f78ddd738610cdbda2cb393c6795e9
Showing with 0 additions and 21 deletions.
  1. +0 −11 src/Illuminate/Database/Query/Builder.php
  2. +0 −10 tests/Database/DatabaseQueryBuilderTest.php
@@ -616,17 +616,6 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
return $this->whereNested($column, $boolean);
}
// If the operator is a literal string 'in' or 'not in', we will assume that
// the developer wants to use the "whereIn / whereNotIn" methods for this
// operation and proxy the query through those methods from this point.
if ($operator == 'in') {
return $this->whereIn($column, $value, $boolean);
}
if ($operator == 'not in') {
return $this->whereNotIn($column, $value, $boolean);
}
// If the given operator is not found in the list of valid operators we will
// assume that the developer is just short-cutting the '=' operators and
// we will set the operators to '=' and set the values appropriately.
@@ -644,11 +644,6 @@ public function testBasicWhereIns()
$this->assertEquals('select * from "users" where "id" in (?, ?, ?)', $builder->toSql());
$this->assertEquals([0 => 1, 1 => 2, 2 => 3], $builder->getBindings());
$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('id', 'in', [1, 2, 3]);
$this->assertEquals('select * from "users" where "id" in (?, ?, ?)', $builder->toSql());
$this->assertEquals([0 => 1, 1 => 2, 2 => 3], $builder->getBindings());
$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('id', '=', 1)->orWhereIn('id', [1, 2, 3]);
$this->assertEquals('select * from "users" where "id" = ? or "id" in (?, ?, ?)', $builder->toSql());
@@ -662,11 +657,6 @@ public function testBasicWhereNotIns()
$this->assertEquals('select * from "users" where "id" not in (?, ?, ?)', $builder->toSql());
$this->assertEquals([0 => 1, 1 => 2, 2 => 3], $builder->getBindings());
$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('id', 'not in', [1, 2, 3]);
$this->assertEquals('select * from "users" where "id" not in (?, ?, ?)', $builder->toSql());
$this->assertEquals([0 => 1, 1 => 2, 2 => 3], $builder->getBindings());
$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('id', '=', 1)->orWhereNotIn('id', [1, 2, 3]);
$this->assertEquals('select * from "users" where "id" = ? or "id" not in (?, ?, ?)', $builder->toSql());

1 comment on commit 04a547e

@pns2050

This comment has been minimized.

Copy link

commented on 04a547e Apr 19, 2019

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