Changeset 28320
- Timestamp:
- Jun 14, 2010, 5:11:02 PM (16 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 2 edited
-
pubtool.c (modified) (3 diffs)
-
pubtoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pubtool.c
r28319 r28320 165 165 166 166 PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false); 167 PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false); 168 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 169 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 167 170 168 171 psString query = pxDataGet("pubtool_definerun.sql"); // Query to run … … 174 177 175 178 if (!rerun) { 176 psStringAppend(&query, "WHERE publishRun.client_id IS NULL"); 179 psStringAppend(&query, "\nWHERE publishRun.client_id IS NULL"); 180 } 181 182 if (limit) { 183 psString limitString = psDBGenerateLimitSQL(limit); 184 psStringAppend(&query, "\n%s", limitString); 185 psFree(limitString); 177 186 } 178 187 … … 213 222 if (!psArrayLength(output)) { 214 223 psTrace("pubtool", PS_LOG_INFO, "No rows found"); 224 psFree(output); 225 return true; 226 } 227 228 if (pretend) { 229 if (!ippdbPrintMetadatas(stdout, output, "publishRun", !simple)) { 230 psError(psErrorCodeLast(), false, "Failed to print array"); 231 psFree(output); 232 return false; 233 } 215 234 psFree(output); 216 235 return true; -
trunk/ippTools/src/pubtoolConfig.c
r28319 r28320 65 65 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "set and search by label", NULL); 66 66 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-data_group", PS_META_DUPLICATE_OK, "search by data_group", NULL); 67 psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-rerun", 0, "Re-run publish?", false);68 67 psMetadataAddTime(definerunArgs, PS_LIST_TAIL, "-dateobs_begin", 0, "search for exposures by time (>=)", NULL); 69 68 psMetadataAddTime(definerunArgs, PS_LIST_TAIL, "-dateobs_end", 0, "search for exposures by time (<=)", NULL); 70 69 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-filter", 0, "search for filter", NULL); 71 70 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-obs_mode", 0, "search by observation mode", NULL); 72 71 psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-rerun", 0, "Re-run publish?", false); 72 psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-pretend", 0, "Pretend to define?", false); 73 psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-simple", 0, "use simple output format?", false); 74 psMetadataAddU64(definerunArgs, PS_LIST_TAIL, "-limit", 0, "limit result set", 0); 73 75 74 76 // -pending
Note:
See TracChangeset
for help on using the changeset viewer.
