Changeset 12096
- Timestamp:
- Feb 27, 2007, 2:19:32 PM (19 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 4 added
- 2 edited
-
share/chiptool_completely_processed_exp.sql (added)
-
share/chiptool_find_unprocessed_imfile.pl (added)
-
share/chiptool_pendingimfile.sql (added)
-
share/chiptool_processedimfile.sql (added)
-
src/chiptool.c (modified) (5 diffs)
-
src/regtool.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/chiptool.c
r12093 r12096 27 27 28 28 #include "pxtools.h" 29 #include "pxdata.h" 29 30 #include "chiptool.h" 30 31 … … 221 222 // XXX does this need to be constrained so that it won't return any results 222 223 // if a match chipPendingExp hasn't been registered? 223 psString query = psStringCopy( 224 "SELECT" 225 " chipPendingImfile.*," 226 " rawExp.camera," 227 " rawExp.workdir" 228 " FROM chipPendingImfile" 229 " JOIN chipPendingExp" 230 " USING(exp_tag)" 231 " JOIN rawExp" 232 " USING(exp_tag)" 233 " LEFT JOIN chipMask" 234 " ON chipPendingExp.label = chipMask.label" 235 " WHERE" 236 " chipMask.label IS NULL" 237 ); 224 psString query = pxDataGet("chiptool_pendingimfile.sql"); 225 if (!query) { 226 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 227 return false; 228 } 238 229 239 230 if (config->where) { … … 307 298 // if so move the chipPendingExp(s) to chipProcessedExp 308 299 309 psString query = psStringCopy( 310 "SELECT DISTINCT" 311 " chipPendingImfile.*" 312 " FROM chipPendingImfile " 313 " LEFT JOIN chipProcessedImfile" 314 " USING(exp_tag, class_id)" 315 " WHERE" 316 " chipProcessedImfile.exp_tag IS NULL" 317 " AND chipProcessedImfile.class_id IS NULL" 318 ); 300 psString query = pxDataGet("chiptool_find_unprocessed_imfile.pl"); 301 if (!query) { 302 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 303 return false; 304 } 305 319 306 { 320 307 psMetadata *where = psMetadataAlloc(); … … 475 462 // XXX does this need to be constrained so that it won't return any results 476 463 // if a match chipPendingExp hasn't been registered? 477 psString query = psStringCopy( 478 "SELECT" 479 " chipProcessedImfile.*," 480 " rawExp.camera," 481 " rawExp.workdir" 482 " FROM chipProcessedImfile" 483 " JOIN rawExp" 484 " USING(exp_tag)" 485 " WHERE " 486 " chipProcessedImfile.exp_tag is NOT NULL" // bogus test -- just here so there there is a 'WHERE' stmt to append conditionals too 487 ); 464 psString query = pxDataGet("chiptool_processedimfile.sql"); 465 if (!query) { 466 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 467 return false; 468 } 488 469 489 470 if (config->where) { … … 673 654 // look for completed chipPendingExp 674 655 // migrate them to chipProccessedExp & camPendingExp 675 676 // select * from chipPendingExp 677 // where exp_tag is not in chipProcessedExp 678 // where exp_tag is not in chipPendingImfile 679 // where the number of entries in chipProccessedImfile matches the .imfiles 680 // entry in rawExp 681 psString query = psStringCopy( 682 "SELECT DISTINCT" 683 " chipPendingExp.*," 684 " rawExp.imfiles," 685 " chipProcessedImfile.class_id" 686 " FROM chipPendingExp" 687 " JOIN rawExp" 688 " ON chipPendingExp.exp_tag = rawExp.exp_tag" 689 " LEFT JOIN chipProcessedExp" 690 " ON chipPendingExp.exp_tag = chipProcessedExp.exp_tag" 691 " LEFT JOIN chipPendingImfile" 692 " ON chipPendingExp.exp_tag = chipPendingImfile.exp_tag" 693 " LEFT JOIN chipProcessedImfile" 694 " ON chipPendingExp.exp_tag = chipProcessedImfile.exp_tag" 695 " WHERE" 696 " chipProcessedExp.exp_tag IS NULL" 697 " AND chipPendingImfile.exp_tag IS NULL" 698 " AND chipProcessedImfile.exp_tag IS NOT NULL" 699 " GROUP BY" 700 " chipPendingExp.exp_tag" 701 " HAVING rawExp.imfiles = COUNT(chipProcessedImfile.class_id)" 702 ); 656 psString query = pxDataGet("chiptool_completely_processed_exp.sql"); 657 if (!query) { 658 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 659 return false; 660 } 703 661 704 662 if (!p_psDBRunQuery(config->dbh, query)) { -
trunk/ippTools/src/regtool.c
r12092 r12096 115 115 psString query = pxDataGet("regtool_pendingimfile.sql"); 116 116 if (!query) { 117 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL stat ment");117 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 118 118 return false; 119 119 } … … 180 180 psString query = pxDataGet("regtool_find_unprocessed_imfile.sql"); 181 181 if (!query) { 182 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL stat ment");182 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 183 183 return false; 184 184 } … … 352 352 psString query = pxDataGet("regtool_processedimfile.sql"); 353 353 if (!query) { 354 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL stat ment");354 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 355 355 return false; 356 356 } … … 466 466 psString query = pxDataGet("regtool_pendingexp.sql"); 467 467 if (!query) { 468 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL stat ment");468 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 469 469 return false; 470 470 } … … 553 553 psString query = pxDataGet("regtool_find_unprocessed_exp.sql"); 554 554 if (!query) { 555 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL stat ment");555 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 556 556 return false; 557 557 } … … 559 559 if (!p_psDBRunQuery(config->dbh, query, exp_tag)) { 560 560 psError(PS_ERR_UNKNOWN, false, "database error"); 561 return false; 562 } 561 psFree(query); 562 return false; 563 } 564 psFree(query); 563 565 564 566 psArray *output = p_psDBFetchResult(config->dbh); … … 758 760 psString query = pxDataGet("regtool_processedexp.sql"); 759 761 if (!query) { 760 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL stat ment");762 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 761 763 return false; 762 764 }
Note:
See TracChangeset
for help on using the changeset viewer.
