(self)
| 3623 | return connection.ops.quote_name(name) |
| 3624 | |
| 3625 | def test_empty_full_handling_conjunction(self): |
| 3626 | compiler = WhereNodeTest.MockCompiler() |
| 3627 | w = WhereNode(children=[NothingNode()]) |
| 3628 | with self.assertRaises(EmptyResultSet): |
| 3629 | w.as_sql(compiler, connection) |
| 3630 | w.negate() |
| 3631 | with self.assertRaises(FullResultSet): |
| 3632 | w.as_sql(compiler, connection) |
| 3633 | w = WhereNode(children=[self.DummyNode(), self.DummyNode()]) |
| 3634 | self.assertEqual(w.as_sql(compiler, connection), ("(dummy AND dummy)", [])) |
| 3635 | w.negate() |
| 3636 | self.assertEqual(w.as_sql(compiler, connection), ("NOT (dummy AND dummy)", [])) |
| 3637 | w = WhereNode(children=[NothingNode(), self.DummyNode()]) |
| 3638 | with self.assertRaises(EmptyResultSet): |
| 3639 | w.as_sql(compiler, connection) |
| 3640 | w.negate() |
| 3641 | with self.assertRaises(FullResultSet): |
| 3642 | w.as_sql(compiler, connection) |
| 3643 | |
| 3644 | def test_empty_full_handling_disjunction(self): |
| 3645 | compiler = WhereNodeTest.MockCompiler() |
nothing calls this directly
no test coverage detected