              # there is a matching row in rel_b with col=2, then an INNER join
              # to rel_a would remove a valid match from the query. So, we need
              # to promote any existing INNER to LOUTER (it is possible this
              # promotion in turn will be demoted later on).
              if self.effective_connector == "OR" and votes < self.num_children:
                  to_promote.add(table)
              # If connector is AND and there is a filter that can match only
              # when there is a joinable row, then use INNER. For example, in
              # rel_a__col=1 & rel_b__col=2, if either of the rels produce NULL
              # as join output, then the col=1 or col=2 can't match (as
 
</s> remove             if self.effective_connector == "AND" or (
                self.effective_connector == "OR" and votes == self.num_children
 </s> add             if self.effective_connector == AND or (
                self.effective_connector == OR and votes == self.num_children </s> remove         node = Node(["a", "b"], "OR")
        self.assertEqual(node.add("a", "AND"), "a")
        self.assertEqual(node, Node([Node(["a", "b"], "OR"), "a"], "AND"))
 </s> add         node = Node(["a", "b"], OR)
        self.assertEqual(node.add("a", AND), "a")
        self.assertEqual(node, Node([Node(["a", "b"], OR), "a"], AND)) </s> remove             self.query.where.add(RawSQL("%s = %s" % (lhs_sql, rhs), lhs_params), "AND")
 </s> add             self.query.where.add(RawSQL("%s = %s" % (lhs_sql, rhs), lhs_params), AND) </s> remove from django.db.models.sql.where import NothingNode, WhereNode
 </s> add from django.db.models.sql.where import AND, OR, NothingNode, WhereNode
            if self.effective_connector == OR and votes < self.num_children:
              # there is a matching row in rel_b with col=2, then an INNER join
              # to rel_a would remove a valid match from the query. So, we need
              # to promote any existing INNER to LOUTER (it is possible this
              # promotion in turn will be demoted later on).
            if self.effective_connector == OR and votes < self.num_children:
                  to_promote.add(table)
              # If connector is AND and there is a filter that can match only
              # when there is a joinable row, then use INNER. For example, in
              # rel_a__col=1 & rel_b__col=2, if either of the rels produce NULL
              # as join output, then the col=1 or col=2 can't match (as
keep keep keep keep replace keep keep keep keep keep
 Used AND, OR, XOR constants instead of hard-coded values. 
django/db/models/sql/query.py