Changeset 9272
- Timestamp:
- Oct 4, 2006, 4:03:21 PM (20 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 2 edited
-
camtool.c (modified) (3 diffs)
-
camtoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/camtool.c
r9271 r9272 58 58 // and have no associated imfiles left in newImfile 59 59 60 char *query = 61 "SELECT newExp.*" 62 " FROM newExp" 63 " LEFT JOIN newImfile USING(exp_tag)" 64 " LEFT JOIN rawScienceExp USING(exp_tag)" 65 " LEFT JOIN rawDetrendExp USING(exp_tag)" 66 " WHERE" 67 " newExp.exp_tag IS NOT NULL" 68 " AND newImfile.exp_tag IS NULL" 69 " AND rawScienceExp.exp_tag IS NULL" 70 " AND newExp.imfiles =" 71 " (SELECT COUNT(exp_tag) FROM rawImfile" 72 " WHERE rawImfile.exp_tag = newExp.exp_tag)" 73 ; 60 psString query = psStringCopy("SELECT * FROM p3PendingExp"); 61 62 if (config->where) { 63 psString whereClause = psDBGenerateWhereSQL(config->where, NULL); 64 psStringAppend(&query, " %s", whereClause); 65 psFree(whereClause); 66 } 74 67 75 68 if (!p_psDBRunQuery(config->dbh, query)) { 76 69 psError(PS_ERR_UNKNOWN, false, "database error"); 70 psFree(query); 77 71 return false; 78 72 } 73 psFree(query); 79 74 80 75 psArray *output = p_psDBFetchResult(config->dbh); … … 85 80 if (!psArrayLength(output)) { 86 81 // XXX check psError here 87 psError(PS_ERR_UNKNOWN, false, "no p ending newExp rows found");82 psError(PS_ERR_UNKNOWN, false, "no p3PendingExp rows found"); 88 83 psFree(output); 89 84 return true; … … 101 96 102 97 // negate simple so the default is true 103 if (!ippdbPrintMetadatas(stdout, output, " newImfile", !simple)) {98 if (!ippdbPrintMetadatas(stdout, output, "p3PendingExp", !simple)) { 104 99 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 105 100 psFree(output); -
trunk/ippTools/src/camtoolConfig.c
r9271 r9272 24 24 // -pendingexp 25 25 psMetadata *pendingexpArgs = psMetadataAlloc(); 26 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_tag", 0,26 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_tag", 0, 27 27 "search by exposure ID", NULL); 28 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-inst", 0, 29 "search by camera", NULL); 30 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-telescope", 0, 31 "search by telescope", NULL); 32 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_type", 0, 33 "search by exposure type", NULL); 34 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-imfiles", 0, 35 "search for exps with N imfiles", NULL); 36 psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-simple", 0, 28 psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-p2_version", 0, 29 "search for exposures with this p2 version", -1); 30 psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-p3_version", 0, 31 "search for exposures with this p3 version", -1); 32 psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-simple", 0, 37 33 "use the simple output format", false); 38 34
Note:
See TracChangeset
for help on using the changeset viewer.
