[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.36, Mon Jan 30 03:46:34 2006 UTC revision 1.37, Mon Jan 30 04:04:32 2006 UTC
# Line 1178  Line 1178 
1178          while (my $path = pop @pathList) {          while (my $path = pop @pathList) {
1179              # Get the table whose rows are to be deleted.              # Get the table whose rows are to be deleted.
1180              my @pathTables = @{$path};              my @pathTables = @{$path};
1181              # Start the DELETE statement.              # Start the DELETE statement. We need to call DBKernel because the
1182                # syntax of a DELETE-USING varies among DBMSs.
1183              my $target = $pathTables[$#pathTables];              my $target = $pathTables[$#pathTables];
1184              my $stmt = "DELETE FROM $target";              my $stmt = $db->SetUsing(@pathTables);
             # If there's more than just the one table, we need a USING clause.  
             if (@pathTables > 1) {  
                 $stmt .= " USING " . join(", ", @pathTables);  
             }  
1185              # 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
1186              # 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
1187              # sub-relations.              # sub-relations.

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3