Changeset 28320 for trunk/ippTools/src/pubtool.c
- Timestamp:
- Jun 14, 2010, 5:11:02 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pubtool.c (modified) (3 diffs)
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;
Note:
See TracChangeset
for help on using the changeset viewer.
