Changeset 12189 for trunk/ippTools/src/camtool.c
- Timestamp:
- Mar 2, 2007, 2:08:14 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/camtool.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/camtool.c
r12188 r12189 94 94 } 95 95 96 psString query = psStringCopy( 97 "SELECT" 98 " camPendingExp.*," 99 " rawExp.camera," 100 " rawExp.workdir" 101 " FROM camPendingExp" 102 " JOIN chipProcessedExp" 103 " USING(chip_id)" 104 " JOIN rawExp" 105 " ON chipProcessedExp.exp_tag = rawExp.exp_tag" 106 " LEFT JOIN camProcessedExp" 107 " on camPendingExp.cam_id = camPendingExp.cam_id" 108 " LEFT JOIN camMask" 109 " ON camPendingExp.label = camMask.label" 110 " WHERE" 111 " camProcessedExp.cam_id IS NULL" 112 " AND camMask.label IS NULL" 113 ); 96 psString query = pxDataGet("camtool_find_pendingexp.sql"); 97 if (!query) { 98 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 99 return false; 100 } 114 101 115 102 if (config->where) { … … 176 163 PS_ASSERT_PTR_NON_NULL(config, false); 177 164 178 psString query = psStringCopy( 179 "SELECT" 180 " camPendingExp.cam_id," 181 " chipProcessedImfile.*," 182 " rawExp.camera," 183 " rawExp.workdir" 184 " FROM camPendingExp" 185 " JOIN chipProcessedExp" 186 " USING(chip_id)" 187 " JOIN chipProcessedImfile" 188 " USING(chip_id)" 189 " JOIN rawExp" 190 " ON chipProcessedExp.exp_tag = rawExp.exp_tag" 191 " LEFT JOIN camProcessedExp" 192 " ON camPendingExp.cam_id = camProcessedExp.cam_id" 193 " LEFT JOIN camMask" 194 " ON camPendingExp.label = camMask.label" 195 " WHERE" 196 " camProcessedExp.cam_id IS NULL" 197 " AND camMask.label IS NULL" 198 ); 165 psString query = pxDataGet("camtool_find_pendingimfile.sql"); 166 if (!query) { 167 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 168 return false; 169 } 199 170 200 171 if (config->where) { … … 238 209 } 239 210 240 if (!convertIdToStr(output)) {241 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");242 psFree(output);243 return false;244 }245 246 if (!convertIdToStr(output)) {247 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");248 psFree(output);249 return false;250 }251 252 if (!convertIdToStr(output)) {253 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");254 psFree(output);255 return false;256 }257 258 211 // negate simple so the default is true 259 212 if (!ippdbPrintMetadatas(stdout, output, "chipProcessedImfile", !simple)) { … … 375 328 } 376 329 377 psString query = psStringCopy( 378 "SELECT camPendingExp.*" 379 " FROM camPendingExp" 380 " LEFT JOIN camProcessedExp" 381 " USING(cam_id)" 382 " WHERE" 383 " camProcessedExp.cam_id IS NULL" 384 " AND camPendingExp.cam_id = '%s'" 385 ); 330 psString query = pxDataGet("camtool_find_pendingexp.sql"); 331 if (!query) { 332 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 333 return false; 334 } 386 335 387 336 if (!p_psDBRunQuery(config->dbh, query, cam_id)) { … … 487 436 } 488 437 489 psString query = psStringCopy( 490 "SELECT" 491 " camProcessedExp.*," 492 " rawExp.camera," 493 " rawExp.workdir" 494 " FROM camProcessedExp" 495 " JOIN chipProcessedExp" 496 " USING(chip_id)" 497 " JOIN rawExp" 498 " chipProcessedExp.exp_tag = rawExp.exp_tag" 499 " WHERE" 500 " camProcessedExp.cam_id IS NOT NULL" // bongus 501 ); 438 psString query = pxDataGet("camtool_find_processedexp.sql"); 439 if (!query) { 440 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 441 return false; 442 } 502 443 503 444 if (config->where) { … … 556 497 } 557 498 558 if (!convertIdToStr(output)) {559 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");560 psFree(output);561 return false;562 }563 564 if (!convertIdToStr(output)) {565 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");566 psFree(output);567 return false;568 }569 570 if (!convertIdToStr(output)) {571 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");572 psFree(output);573 return false;574 }575 576 499 // negate simple so the default is true 577 500 if (!ippdbPrintMetadatas(stdout, output, "camProcessedExp", !simple)) {
Note:
See TracChangeset
for help on using the changeset viewer.
