Changeset 12086 for trunk/ippTools/src
- Timestamp:
- Feb 27, 2007, 12:06:18 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/regtool.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/regtool.c
r12025 r12086 25 25 26 26 #include "pxtools.h" 27 #include "pxdata.h" 27 28 #include "regtool.h" 28 29 … … 112 113 // that should be checked for 113 114 114 psString query = psStringCopy( 115 "SELECT\n" 116 " newImfile.*,\n" 117 " newExp.workdir\n" 118 " FROM newImfile\n" 119 " LEFT JOIN newExp\n" 120 " USING(exp_tag)\n" 121 " LEFT JOIN rawExp\n" 122 " USING(exp_tag)\n" 123 " WHERE\n" 124 " newExp.exp_tag is NOT NULL\n" 125 " AND rawExp.exp_tag IS NULL\n" 126 ); 115 psString query = pxDataGet("regtool_pendingimfile.sql"); 116 if (!query) { 117 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statment"); 118 return false; 119 } 127 120 128 121 // treat limit == 0 as "no limit" … … 184 177 PS_ASSERT_PTR_NON_NULL(config, false); 185 178 186 // XXX search by the whole frame some imfiles without a newExp don't get 187 // processed -- this may not be the correct thing to do 188 psString query = psStringCopy( 189 "SELECT\n" 190 " *\n" 191 " FROM\n" 192 " (SELECT newImfile.* FROM newImfile\n" 193 " LEFT JOIN newExp USING(exp_tag)\n" 194 " LEFT JOIN rawExp USING(exp_tag)\n" 195 " WHERE newExp.exp_tag IS NOT NULL\n" 196 " AND rawExp.exp_tag IS NULL) as Foo\n" 197 ); // WHERE class is generated from exp_tag, class, & class_id 179 psString query = pxDataGet("regtool_find_unprocessed_imfile.sql"); 180 if (!query) { 181 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statment"); 182 return false; 183 } 198 184 199 185 { … … 363 349 } 364 350 365 // find all rawImfiles matching the default query 366 psString query = psStringCopy( 367 "SELECT\n" 368 " *\n" 369 " FROM rawImfile\n" 370 " WHERE rawImfile.exp_tag is NOT NULL\n" //bogus conditional so there is a where clause to append to 371 ); 351 psString query = pxDataGet("regtool_processedimfile.sql"); 352 if (!query) { 353 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statment"); 354 return false; 355 } 372 356 373 357 if (config->where) { … … 479 463 // have ALL of their imfiles in rawImfile (by count) 480 464 // and have no associated imfiles left in newImfile 481 482 psString query = psStringCopy( 483 "SELECT" 484 " newExp.*" 485 " FROM newExp" 486 " LEFT JOIN newImfile" 487 " USING(exp_tag)" 488 " LEFT JOIN rawExp" 489 " USING(exp_tag)" 490 " WHERE" 491 " newImfile.exp_tag IS NULL" 492 " AND rawExp.exp_tag IS NULL" 493 " AND newExp.imfiles =" 494 " (SELECT COUNT(exp_tag) FROM rawImfile" 495 " WHERE" 496 " rawImfile.exp_tag = newExp.exp_tag" 497 " AND rawImfile.fault = 0)" 498 ); 465 psString query = pxDataGet("regtool_pendingexp.sql"); 466 if (!query) { 467 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statment"); 468 return false; 469 } 499 470 500 471 // treat limit == 0 as "no limit" … … 578 549 } 579 550 580 char *query = 581 "SELECT" 582 " newExp.*" 583 " FROM newExp" 584 " LEFT JOIN newImfile" 585 " USING(exp_tag)" 586 " LEFT JOIN rawExp" 587 " USING(exp_tag)" 588 " WHERE" 589 " newExp.exp_tag IS NOT NULL" 590 " AND newImfile.exp_tag IS NULL" 591 " AND rawExp.exp_tag IS NULL" 592 " AND newExp.imfiles =" 593 " (SELECT COUNT(exp_tag) FROM rawImfile" 594 " WHERE rawImfile.exp_tag = newExp.exp_tag)" 595 " AND newExp.exp_tag = '%s'"; 551 psString query = pxDataGet("regtool_find_unprocessed_exp.sql"); 552 if (!query) { 553 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statment"); 554 return false; 555 } 596 556 597 557 if (!p_psDBRunQuery(config->dbh, query, exp_tag)) { … … 794 754 } 795 755 796 // find all rawImfiles matching the default query 797 psString query = psStringCopy( 798 "SELECT\n" 799 " *\n" 800 " FROM rawExp\n" 801 " WHERE\n" 802 " rawExp.exp_tag IS NOT NULL\n" // bogus where clause 803 ); 756 psString query = pxDataGet("regtool_processedexp.sql"); 757 if (!query) { 758 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statment"); 759 return false; 760 } 804 761 805 762 if (config->where) {
Note:
See TracChangeset
for help on using the changeset viewer.
