Skip to content

Commit

Permalink
Where: Add method resetWhere()
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Jun 11, 2021
1 parent 9fd567c commit e3c190b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,18 +474,6 @@ public function resetUnion()
return $this;
}

/**
* Reset the WHERE part of the query
*
* @return $this
*/
public function resetWhere()
{
$this->where = null;

return $this;
}

/**
* Get the count query
*
Expand Down
7 changes: 7 additions & 0 deletions src/Where.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public function orNotWhere($condition, ...$args)
return $this;
}

public function resetWhere()
{
$this->where = null;

return $this;
}

/**
* Make $condition an array and build an array like this: [$operator, [$condition]]
*
Expand Down
7 changes: 7 additions & 0 deletions src/WhereInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,11 @@ public function notWhere($condition, ...$args);
* @return $this
*/
public function orNotWhere($condition, ...$args);

/**
* Reset the WHERE part of the query
*
* @return $this
*/
public function resetWhere();
}

0 comments on commit e3c190b

Please sign in to comment.