[PATCH] testbot: Document Collection::DeleteItem().

Francois Gouget fgouget at codeweavers.com
Thu Dec 7 21:20:24 CST 2017


In particular note that it cascades to other tables that have foreign
keys to the row being deleted.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/ObjectModel/Collection.pm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index f31a7133..d4418603 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -550,6 +550,20 @@ sub GetMasterCols($)
   return ($self->{MasterColNames}, $self->{MasterColValues});
 }
 
+=pod
+=over 12
+
+=item C<DeleteItem()>
+
+Deletes the specified Item from the Collection and the database backing it.
+
+Note that if there are other tables with a foreign key referencing this item
+the corresponding rows will be deleted too. So for instance deleting a Job
+will also delete the Steps and Tasks it is composed of.
+
+=back
+=cut
+
 sub DeleteItem($$)
 {
   my ($self, $Item) = @_;
-- 
2.15.0




More information about the wine-devel mailing list