Changeset 25835 for trunk/ippTools/src/pxchip.c
- Timestamp:
- Oct 14, 2009, 11:06:18 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pxchip.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pxchip.c
r25800 r25835 192 192 } 193 193 194 bool pxchipRunSetLabel(pxConfig *config, psS64 chip_id, const char *label)195 {196 PS_ASSERT_PTR_NON_NULL(config, false);197 // note label == NULL should be explicitly allowed198 199 char *query = "UPDATE chipRun SET label = '%s' WHERE chip_id = %" PRId64;200 if (!p_psDBRunQueryF(config->dbh, query, label, chip_id)) {201 psError(PS_ERR_UNKNOWN, false,202 "failed to change state for chip_id %" PRId64, chip_id);203 return false;204 }205 206 return true;207 }208 209 210 bool pxchipRunSetLabelByQuery(pxConfig *config, psMetadata *where, const char *label)211 {212 PS_ASSERT_PTR_NON_NULL(config, false);213 // note label == NULL should be explicitly allowed214 215 psString query = psStringCopy("UPDATE chipRun JOIN rawExp USING(exp_id) SET label = '%s'");216 217 if (where && psListLength(where->list) > 0) {218 psString whereClause = psDBGenerateWhereSQL(where, NULL);219 psStringAppend(&query, " %s", whereClause);220 psFree(whereClause);221 }222 223 if (!p_psDBRunQueryF(config->dbh, query, label)) {224 psFree(query);225 psError(PS_ERR_UNKNOWN, false, "database error");226 return false;227 }228 229 psFree(query);230 231 return true;232 }233 234 194 bool pxchipProcessedImfileSetStateByQuery(pxConfig *config, psMetadata *where, const char *state) 235 195 { … … 276 236 const char *workdir, 277 237 const char *label, 238 const char *data_group, 239 const char *dist_group, 278 240 const char *reduction, 279 241 const char *expgroup, 280 242 const char *dvodb, 281 243 const char *tess_id, 282 const char *end_stage) 244 const char *end_stage, 245 const char *note) 283 246 { 284 247 PS_ASSERT_PTR_NON_NULL(config, false); … … 298 261 "dirty", // workdir_state 299 262 label, 263 data_group, 264 dist_group, 300 265 reduction, 301 266 expgroup, … … 303 268 tess_id, 304 269 end_stage, 305 0 // magicked 270 0, // magicked 271 note 306 272 ) 307 273 ) {
Note:
See TracChangeset
for help on using the changeset viewer.
