Hi all,

Now that the dust has settled on the descriptor work, I've turned back
to bulk delete.

I've attached a new patch to the original ticket -
http://code.djangoproject.com/ticket/1219 - which is updated to
reflect the descriptor changes.

Notes:

1) As with the last version, the joins_allowed parameter to
_get_sql_clause is no longer required.

2) The DELETE_ALL protection mechanism has been removed. Rather than
have a special keyword, I have opted to remove the delete method from
the manager. The accidental obliteration case of
'Articles.objects.delete()' is no longer possible - you would need to
execute 'Articles.objects.all().delete()' to destroy everything. Since
this pretty much reads as an explicit 'destroy all', I didn't think
the safety is required.

3) As noted in the last attempt, the SQL that is generated for a
single object delete is almost identical to the SQL that is generated
for a bulk delete. The changes to manipulators mean that the
manipulator is no longer a good place for the common implementation,
so it now sits in a utility method in query.py.

Comments? Have I got it right this time?

Russ Magee %-)

Reply via email to