Changeset 27838 for branches/tap_branches/ippTools/src/pxchip.c
- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/pxchip.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/ippTools/src
- Property svn:ignore
-
old new 16 16 difftool 17 17 disttool 18 dqstatstool 18 19 faketool 19 20 flatcorr
-
- Property svn:ignore
-
branches/tap_branches/ippTools/src/pxchip.c
r25835 r27838 96 96 PXOPT_COPY_STR(config->args, where, "-exp_type", "rawExp.exp_type", "=="); 97 97 PXOPT_COPY_STR(config->args, where, "-filelevel", "rawExp.filelevel", "=="); 98 PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", " ==");98 PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "LIKE"); 99 99 PXOPT_COPY_F64(config->args, where, "-airmass_min", "rawExp.airmass", ">="); 100 100 PXOPT_COPY_F64(config->args, where, "-airmass_max", "rawExp.airmass", "<"); … … 125 125 PXOPT_COPY_F32(config->args, where, "-sun_angle_max", "rawExp.sun_angle", "<"); 126 126 PXOPT_COPY_STR(config->args, where, "-comment", "rawExp.comment", "LIKE"); 127 PXOPT_COPY_STR(config->args, where, "-obs_mode", "rawExp.obs_mode", " ==");128 return true; 129 } 130 131 bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state, const boolmagicked)127 PXOPT_COPY_STR(config->args, where, "-obs_mode", "rawExp.obs_mode", "LIKE"); 128 return true; 129 } 130 131 bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state, const psS64 magicked) 132 132 { 133 133 PS_ASSERT_PTR_NON_NULL(config, false); … … 140 140 } 141 141 142 char *query = "UPDATE chipRun SET state = '%s', magicked = % dWHERE chip_id = %" PRId64;142 char *query = "UPDATE chipRun SET state = '%s', magicked = %" PRId64 " WHERE chip_id = %" PRId64; 143 143 if (!p_psDBRunQueryF(config->dbh, query, state, magicked, chip_id)) { 144 144 psError(PS_ERR_UNKNOWN, false, … … 174 174 175 175 psString query = psStringCopy("UPDATE chipRun JOIN rawExp USING(exp_id) SET state = '%s'"); 176 177 if (!strcmp(state, "cleaned") || !strcmp(state, "purged")) { 178 // if magicked is non-zero set it to -1 179 psStringAppend(&query, ", chipRun.magicked = IF(chipRun.magicked = 0, 0, -1)"); 180 } 176 181 177 182 if (where && psListLength(where->list) > 0) { … … 213 218 /* } */ 214 219 215 psString query = psStringCopy("UPDATE chipProcessedImfile JOIN chipRun USING(chip_id) JOIN rawExp ON chipRun.exp_id = rawExp.exp_id SET state = '%s'");220 psString query = psStringCopy("UPDATE chipProcessedImfile JOIN chipRun USING(chip_id) JOIN rawExp ON chipRun.exp_id = rawExp.exp_id SET data_state = '%s'"); 216 221 217 222 if (where && psListLength(where->list) > 0) { … … 219 224 psStringAppend(&query, " %s", whereClause); 220 225 psFree(whereClause); 226 } else { 227 psError(PS_ERR_UNKNOWN, true, "search parameters are required"); 228 return false; 221 229 } 222 230
Note:
See TracChangeset
for help on using the changeset viewer.
