MCPcopy
hub / github.com/django/django / _get_check_sql

Method _get_check_sql

django/db/models/constraints.py:194–199  ·  view source on GitHub ↗
(self, model, schema_editor)

Source from the content-addressed store, hash-verified

192 return errors
193
194 def _get_check_sql(self, model, schema_editor):
195 query = Query(model=model, alias_cols=False)
196 where = query.build_where(self.condition)
197 compiler = query.get_compiler(connection=schema_editor.connection)
198 sql, params = where.as_sql(compiler, schema_editor.connection)
199 return sql % tuple(schema_editor.quote_value(p) for p in params)
200
201 def constraint_sql(self, model, schema_editor):
202 check = self._get_check_sql(model, schema_editor)

Callers 2

constraint_sqlMethod · 0.95
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