MCPcopy
hub / github.com/django/django / as_sql

Method as_sql

django/db/models/fields/tuple_lookups.py:176–184  ·  view source on GitHub ↗
(self, compiler, connection)

Source from the content-addressed store, hash-verified

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
187class TupleGreaterThan(TupleLookupMixin, GreaterThan):

Callers 8

as_sqliteMethod · 0.45
as_sqlMethod · 0.45
get_fallback_sqlMethod · 0.45
get_fallback_sqlMethod · 0.45
get_fallback_sqlMethod · 0.45
get_fallback_sqlMethod · 0.45
get_fallback_sqlMethod · 0.45
get_fallback_sqlMethod · 0.45

Calls 3

as_sqlMethod · 0.95
IsNullClass · 0.90
WhereNodeClass · 0.90

Tested by

no test coverage detected