MCPcopy
hub / github.com/django/django / _get_condition_sql

Method _get_condition_sql

django/db/models/indexes.py:177–184  ·  view source on GitHub ↗
(self, model, schema_editor)

Source from the content-addressed store, hash-verified

175 return errors
176
177 def _get_condition_sql(self, model, schema_editor):
178 if self.condition is None:
179 return None
180 query = Query(model=model, alias_cols=False)
181 where = query.build_where(self.condition)
182 compiler = query.get_compiler(connection=schema_editor.connection)
183 sql, params = where.as_sql(compiler, schema_editor.connection)
184 return sql % tuple(schema_editor.quote_value(p) for p in params)
185
186 def create_sql(self, model, schema_editor, using="", **kwargs):
187 include = [

Callers 1

create_sqlMethod · 0.95

Calls 5

build_whereMethod · 0.95
get_compilerMethod · 0.95
QueryClass · 0.90
as_sqlMethod · 0.45
quote_valueMethod · 0.45

Tested by

no test coverage detected