(self, compiler, connection)
| 174 | ) |
| 175 | |
| 176 | def as_sql(self, compiler, connection): |
| 177 | # e.g.: (a, b, c) is None as SQL: |
| 178 | # WHERE a IS NULL OR b IS NULL OR c IS NULL |
| 179 | # e.g.: (a, b, c) is not None as SQL: |
| 180 | # WHERE a IS NOT NULL AND b IS NOT NULL AND c IS NOT NULL |
| 181 | rhs = self.rhs |
| 182 | lookups = [IsNull(col, rhs) for col in self.lhs] |
| 183 | root = WhereNode(lookups, connector=OR if rhs else AND) |
| 184 | return root.as_sql(compiler, connection) |
| 185 | |
| 186 | |
| 187 | class TupleGreaterThan(TupleLookupMixin, GreaterThan): |
no test coverage detected