Problem/Motivation
Entity query has a use case for "disabling" a db query condition (i.e. a kill switch on the condition). The current implementation does not work if we decide to escape all identifiers/fields of a condition by default, as discussed in #2966523: MySQL 8 Support.
Contrib also has this use case, for example in the Tree module.
Proposed resolution
Add a alwaysFalse()
method to \Drupal\Core\Database\Query\ConditionInterface
and implement it in \Drupal\Core\Database\Query\QueryConditionTrait
.
Remaining tasks
Review, etc.
User interface changes
Nope.
API changes
API addition, a new method on ConditionInterface
.
Data model changes
Nope.