              # then we can use INNER for the join. For example:
              #     (rel_a__col__icontains=Alex | rel_a__col__icontains=Russell)
              # then if rel_a doesn't produce any rows, the whole condition
              # can't match. Hence we can safely use INNER join.
              if self.effective_connector == "AND" or (
                  self.effective_connector == "OR" and votes == self.num_children
              ):
                  to_demote.add(table)
              # Finally, what happens in cases where we have:
              #    (rel_a__col=1|rel_b__col=2) & rel_a__col__gte=0
              # Now, we first generate the OR clause, and promote joins for it
 
</s> remove             if self.effective_connector == "OR" and votes < self.num_children:
 </s> add             if 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         w.connector = "OR"
 </s> add         w.connector = OR </s> remove         self.assertEqual(kwargs, {"_connector": "XOR"})
 </s> add         self.assertEqual(kwargs, {"_connector": Q.XOR})
            if self.effective_connector == AND or (
                self.effective_connector == OR and votes == self.num_children
              # then we can use INNER for the join. For example:
              #     (rel_a__col__icontains=Alex | rel_a__col__icontains=Russell)
              # then if rel_a doesn't produce any rows, the whole condition
              # can't match. Hence we can safely use INNER join.
            if self.effective_connector == AND or (
                self.effective_connector == OR and votes == self.num_children
            if self.effective_connector == AND or (
                self.effective_connector == OR and votes == self.num_children
              ):
                  to_demote.add(table)
              # Finally, what happens in cases where we have:
              #    (rel_a__col=1|rel_b__col=2) & rel_a__col__gte=0
              # Now, we first generate the OR clause, and promote joins for it
keep keep keep keep replace replace keep keep keep keep keep
 Used AND, OR, XOR constants instead of hard-coded values. 
django/db/models/sql/query.py