Quantcast
Viewing all articles
Browse latest Browse all 295775

Add a way to "disable" a database query condition

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.


Viewing all articles
Browse latest Browse all 295775


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>