Changeset 8285
- Timestamp:
- Aug 10, 2006, 4:10:52 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/regtool.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/regtool.c
r8281 r8285 62 62 PS_ASSERT_PTR_NON_NULL(config, false); 63 63 64 // return only exps that are not in rawScienceExp or rawDetrendExp and have 65 // ALL of their imfiles in rawImfile (by count) and have no associated 66 // imfiles left in newImfile 64 // return only exps that: 65 // are not in rawScienceExp 66 // are not in rawDetrendExp 67 // have ALL of their imfiles in rawImfile (by count) 68 // and have no associated imfiles left in newImfile 67 69 68 70 char *query = … … 116 118 PS_ASSERT_PTR_NON_NULL(config, false); 117 119 118 // select newImfiles who's exp_id is in newExp AND don't have their exp_id 119 // in rawScienceExp or rawDetrendExp 120 // select newImfiles that: 121 // exp_id is in newExp 122 // don't have their exp_id in rawScienceExp 123 // don't have their exp_id in rawDetrendExp 120 124 // XXX having the same exp_id in newExp and raw*Exp is probably an error 121 125 // that should be checked for … … 328 332 psArray *rawImfiles = NULL; 329 333 { 334 // build a query to search by exp_id 330 335 psMetadata *where = psMetadataAlloc(); 331 336 if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", 0, "==", newExp->exp_id)) { … … 343 348 psFree(where); 344 349 } 345 // sanity check th e number of rawImfilesfound350 // sanity check that least results were found 346 351 if (!rawImfiles) { 347 352 // rollback … … 354 359 return false; 355 360 } 361 // sanity check the number of rawImfiles found 356 362 if (psArrayLength(rawImfiles) != newExp->imfiles) { 357 363 // rollback … … 416 422 char *whereClaus = NULL; 417 423 { 424 // build a query to search by exp_id, class, class_id 418 425 psMetadata *where = psMetadataAlloc(); 419 426 bool status = false; … … 485 492 486 493 for (long i = 0; i < psArrayLength(newImfiles); i++) { 494 // convert newImfile metadata -> newImfile object 487 495 newImfileRow *object = newImfileObjectFromMetadata(newImfiles->data[i]); 496 // convert newImfile object -> rawImfile object 488 497 rawImfileRow *imfile = newToRawImfile(config, object); 489 498 if (!imfile) { … … 497 506 return false; 498 507 } 508 // insert the rawImfile object into the database 499 509 if (!rawImfileInsertObject(config->dbh, imfile)) { 500 510 // rollback … … 509 519 } 510 520 psFree(imfile); 521 // remove the neImfile object from the database 511 522 if (!newImfileDeleteObject(config->dbh, object)) { 512 523 // rollback … … 539 550 PS_ASSERT_PTR_NON_NULL(config, false); 540 551 552 // find all rawImfiles matching the default query 541 553 psArray *rawImfiles = rawImfileSelectRowObjects(config->dbh, config->where, 0); 542 554 if (!rawImfiles) {
Note:
See TracChangeset
for help on using the changeset viewer.
