This method is similar to
QueryTrait::where. The main difference is that this method will
remove [[isEmpty()|empty query operands]]. As a result, this method is best suited
for building query conditions based on filter values entered by users.
The following code shows the difference between this method and
QueryTrait::where:
php
WHERE age
=:age
$query->filterWhere(['name' => null, 'age' => 20]);
WHERE age
=:age
$query->where(['age' => 20]);
WHERE name
IS NULL AND age
=:age
$query->where(['name' => null, 'age' => 20]);
Note that unlike
QueryTrait::where, you cannot pass binding parameters to this method.