Changeset 29082
- Timestamp:
- Aug 31, 2010, 1:48:37 PM (16 years ago)
- Location:
- trunk/ippToPsps/perl
- Files:
-
- 2 edited
-
checkOdmStatus.pl (modified) (1 diff)
-
ippToPsps/IppToPspsDb.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/perl/checkOdmStatus.pl
r29047 r29082 72 72 my $numOfBatches; 73 73 74 if (defined $singleBatch ) { $numOfBatches = $ippToPspsDb->getSingleBatch ($singleBatch, \$batches);}75 else { $numOfBatches = $ippToPspsDb->get BatchList(\$batches, $fromTime, $toTime);}74 if (defined $singleBatch ) { $numOfBatches = $ippToPspsDb->getSingleBatchOnDatastore($singleBatch, \$batches);} 75 else { $numOfBatches = $ippToPspsDb->getListOfBatchesOnDatastore(\$batches, $fromTime, $toTime);} 76 76 77 77 if ($numOfBatches < 1) {return 0;} -
trunk/ippToPsps/perl/ippToPsps/IppToPspsDb.pm
r28952 r29082 15 15 # 16 16 ########################################################################### 17 sub get BatchList{18 my ($self, $ exposures, $fromTime, $toTime) = @_;17 sub getListOfBatchesOnDatastore { 18 my ($self, $batches, $fromTime, $toTime) = @_; 19 19 20 20 my $query = $self->{_db}->prepare(<<SQL); … … 29 29 # TODO remove date restriction 30 30 $query->execute; 31 ${$ exposures} = $query->fetchall_arrayref();32 my $count = scalar @{${$ exposures}};31 ${$batches} = $query->fetchall_arrayref(); 32 my $count = scalar @{${$batches}}; 33 33 34 34 printf( "* Found %d batch%s\n", $count, ($count==1) ? "" : "es"); … … 41 41 # 42 42 ########################################################################### 43 sub getSingleBatch {44 my ($self, $batch_id, $ exposures) = @_;43 sub getSingleBatchOnDatastore{ 44 my ($self, $batch_id, $batches) = @_; 45 45 46 46 my $query = $self->{_db}->prepare(<<SQL); … … 53 53 54 54 $query->execute; 55 ${$ exposures} = $query->fetchall_arrayref();56 my $count = scalar @{${$ exposures}};55 ${$batches} = $query->fetchall_arrayref(); 56 my $count = scalar @{${$batches}}; 57 57 58 58 printf( "* Found %d batch%s\n", $count, ($count==1) ? "" : "es"); … … 424 424 return $row[0]; 425 425 } 426 427 sub insetDetection { 428 my ($self, $expId, $imageID, $objID,$ippObjID, $ippDetectID) = @_; 429 430 my $query = $self->{_db}->prepare(<<SQL); 431 INSERT INTO detections 432 (expId, imageID, objID, ippObjID, ippDetectID) 433 VALUES 434 ($expId, $imageID, $objID,$ippObjID, $ippDetectID); 435 SQL 436 437 $query->execute; 438 439 } 440 426 441 1
Note:
See TracChangeset
for help on using the changeset viewer.
