MCPcopy
hub / github.com/django/django / _raw_delete

Method _raw_delete

django/db/models/query.py:1349–1356  ·  view source on GitHub ↗

Delete objects found from the given queryset in single direct SQL query. No signals are sent and there is no protection for cascades.

(self, using)

Source from the content-addressed store, hash-verified

1347 adelete.queryset_only = True
1348
1349 def _raw_delete(self, using):
1350 """
1351 Delete objects found from the given queryset in single direct SQL
1352 query. No signals are sent and there is no protection for cascades.
1353 """
1354 query = self.query.clone()
1355 query.__class__ = sql.DeleteQuery
1356 return query.get_compiler(using).execute_sql(ROW_COUNT)
1357
1358 _raw_delete.alters_data = True
1359

Callers 1

deleteMethod · 0.80

Calls 3

get_compilerMethod · 0.80
cloneMethod · 0.45
execute_sqlMethod · 0.45

Tested by

no test coverage detected