Skip to content
Snippets Groups Projects
Commit 51f953e2 authored by Claes Gyllensvärd's avatar Claes Gyllensvärd Committed by Tim Plunkett
Browse files

Issue #1718956 by Letharion: Document that add_where() takes DatabaseCondition as an argument.

parent 29be73c2
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -859,7 +859,19 @@ function clear_fields() {
* options such as IN, LIKE, or BETWEEN. Defaults to IN if $value is an array
* = otherwise. If $field is a string you have to use 'formula' here.
*
* @see QueryConditionInterface::condition()
* The $field, $value and $operator arguments can also be passed in with a
* single DatabaseCondition object, like this:
* @code
* $this->query->add_where(
* $this->options['group'],
* db_or()
* ->condition($field, $value, 'NOT IN')
* ->condition($field, $value, 'IS NULL')
* );
* @endcode
*
* @see Drupal\Core\Database\Query\ConditionInterface::condition()
* @see Drupal\Core\Database\Query\Condition
*/
function add_where($group, $field, $value = NULL, $operator = NULL) {
// Ensure all variants of 0 are actually 0. Thus '', 0 and NULL are all
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment