[Bio] / Sprout / ERDB.pm Repository:
ViewVC logotype

Diff of /Sprout/ERDB.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.35, Sat Jan 28 09:57:43 2006 UTC revision 1.36, Mon Jan 30 03:46:34 2006 UTC
# Line 1183  Line 1183 
1183              my $stmt = "DELETE FROM $target";              my $stmt = "DELETE FROM $target";
1184              # If there's more than just the one table, we need a USING clause.              # If there's more than just the one table, we need a USING clause.
1185              if (@pathTables > 1) {              if (@pathTables > 1) {
1186                  $stmt .= " USING " . join(", ", @pathTables[0 .. ($#pathTables - 1)]);                  $stmt .= " USING " . join(", ", @pathTables);
1187              }              }
1188              # Now start the WHERE. The first thing is the ID field from the starting table. That              # Now start the WHERE. The first thing is the ID field from the starting table. That
1189              # starting table will either be the entity relation or one of the entity's              # starting table will either be the entity relation or one of the entity's
# Line 1209  Line 1209 
1209              } else {              } else {
1210                  # Here we can delete. Note that the SQL method dies with a confessing                  # Here we can delete. Note that the SQL method dies with a confessing
1211                  # if an error occurs, so we just go ahead and do it.                  # if an error occurs, so we just go ahead and do it.
1212                  Trace("Executing delete: $stmt") if T(3);                  Trace("Executing delete from $target using '$objectID'.") if T(3);
1213                  my $rv = $db->SQL($stmt, 0, [$objectID]);                  my $rv = $db->SQL($stmt, 0, $objectID);
1214                  # Accumulate the statistics for this delete. The only rows deleted                  # Accumulate the statistics for this delete. The only rows deleted
1215                  # are from the target table, so we use its name to record the                  # are from the target table, so we use its name to record the
1216                  # statistic.                  # statistic.

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3