Changeset 7351 for trunk/ippTools/src/dettool.c
- Timestamp:
- Jun 5, 2006, 2:37:36 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r7335 r7351 1390 1390 // check det_id, exp_id, & class_id against the input rawImfiles 1391 1391 1392 // XXX what we really want here is to do a join but psDB doesn't support 1393 // that type of operation 1392 1394 // we have to generate our own where claus as we want to exclude -stats 1393 1395 // from the search … … 1404 1406 return false; 1405 1407 } 1406 if (!psMetadataAddStr(where, PS_LIST_TAIL, "class_id", 0, "==", class_id)) {1407 psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");1408 psFree(where);1409 return false;1410 }1411 1408 1412 1409 psArray *rawImfiles = searchRawImfiles(config, where); … … 1419 1416 } 1420 1417 1421 // database sanity check 1422 if (psArrayLength(rawImfiles) > 1) { 1423 // abort 1418 // iterate through rawImfiles looking for a match to our class_id 1419 bool found = false; 1420 for (long i = 0; i < psArrayLength(rawImfiles); i++) { 1421 if (strcmp(class_id, 1422 ((rawImfileRow *)rawImfiles->data[i])->class_id) == 0) { 1423 found = true; 1424 break; 1425 } 1426 } 1427 1428 if (!found) { 1429 psError(PS_ERR_UNKNOWN, true, 1430 "det_id %s, exp_id %s, class_id %s does not corespond to an input imfile", 1431 det_id, exp_id, class_id); 1432 return false; 1433 } 1434 1435 // create a new detResidImfileRow and insert it 1436 detResidImfileAnalysisRow *residImfile = detResidImfileAnalysisRowAlloc( 1437 (psS32)atol(det_id), 1438 exp_id, 1439 class_id, 1440 stats, 1441 recipe 1442 ); 1443 1444 if (!detResidImfileAnalysisInsertObject(config->dbh, residImfile)) { 1445 psError(PS_ERR_UNKNOWN, false, "database error"); 1446 return false; 1424 1447 } 1425 1448
Note:
See TracChangeset
for help on using the changeset viewer.
