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

Method as_sql

django/db/models/lookups.py:543–551  ·  view source on GitHub ↗
(self, compiler, connection)

Source from the content-addressed store, hash-verified

541 return "IN %s" % rhs
542
543 def as_sql(self, compiler, connection):
544 max_in_list_size = connection.ops.max_in_list_size()
545 if (
546 self.rhs_is_direct_value()
547 and max_in_list_size
548 and len(self.rhs) > max_in_list_size
549 ):
550 return self.split_parameter_list_as_sql(compiler, connection)
551 return super().as_sql(compiler, connection)
552
553 def split_parameter_list_as_sql(self, compiler, connection):
554 # This is a special case for databases which limit the number of

Callers 8

as_oracleMethod · 0.45
as_sqlMethod · 0.45
as_sqlMethod · 0.45
as_sqlMethod · 0.45
_get_condition_sqlMethod · 0.45
as_sqliteMethod · 0.45
_get_check_sqlMethod · 0.45
_get_condition_sqlMethod · 0.45

Calls 3

rhs_is_direct_valueMethod · 0.80
max_in_list_sizeMethod · 0.45

Tested by

no test coverage detected