From 51f953e2fd6e43bba7957d48cfd89c250543aade Mon Sep 17 00:00:00 2001
From: Letharion <Letharion@373603.no-reply.drupal.org>
Date: Sun, 12 Aug 2012 18:43:08 +0200
Subject: [PATCH] Issue #1718956 by Letharion: Document that add_where() takes
 DatabaseCondition as an argument.

---
 plugins/views_plugin_query_default.inc | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/plugins/views_plugin_query_default.inc b/plugins/views_plugin_query_default.inc
index 9398a96427c0..0c3c1e003ed6 100644
--- a/plugins/views_plugin_query_default.inc
+++ b/plugins/views_plugin_query_default.inc
@@ -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
-- 
GitLab