Skip to content

Commit

Permalink
Added docstring to DeleteQuery.delete_qs()
Browse files Browse the repository at this point in the history
  • Loading branch information
akaariai committed Oct 25, 2012
1 parent f64a5ef commit 11b8712
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions django/db/models/sql/subqueries.py
Expand Up @@ -48,6 +48,11 @@ def delete_batch(self, pk_list, using, field=None):
self.do_query(self.model._meta.db_table, where, using=using) self.do_query(self.model._meta.db_table, where, using=using)


def delete_qs(self, query, using): def delete_qs(self, query, using):
"""
Delete the queryset in one SQL query (if possible). For simple queries
this is done by copying the query.query.where to self.query, for
complex queries by using subquery.
"""
innerq = query.query innerq = query.query
# Make sure the inner query has at least one table in use. # Make sure the inner query has at least one table in use.
innerq.get_initial_alias() innerq.get_initial_alias()
Expand Down

0 comments on commit 11b8712

Please sign in to comment.