Changeset 18561 for trunk/ippTools/src/detselect.c
- Timestamp:
- Jul 15, 2008, 10:30:59 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/detselect.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/detselect.c
r16170 r18561 81 81 82 82 psMetadata *where = psMetadataAlloc(); 83 84 PXOPT_COPY_STR(config->args, where, "-inst", "camera", "=="); 85 PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "=="); 86 PXOPT_COPY_STR(config->args, where, "-det_type", "det_type", "=="); 87 PXOPT_COPY_STR(config->args, where, "-type", "det_type", "=="); 88 PXOPT_COPY_STR(config->args, where, "-filter", "filter", "=="); 83 89 84 90 // airmass_min < airmass < airmass_max … … 111 117 } 112 118 113 if (config->where) { 114 psString whereClause = psDBGenerateWhereConditionSQL(config->where, NULL); 115 psStringAppend(&query, " AND %s", whereClause); 116 psFree(whereClause); 117 } 118 119 { 119 // use psDBGenerateWhereConditionalSQL with AND ... because the SQL ends in a WHERE 120 if (where && psListLength(where->list)) { 120 121 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 121 psFree(where); 122 if (whereClause) { 123 psStringAppend(&query, " AND %s", whereClause); 124 psFree(whereClause); 125 } 126 } 122 psStringAppend(&query, " AND %s", whereClause); 123 psFree(whereClause); 124 } 125 psFree(where); 127 126 128 127 // we choose the single detrend image which matches all criteria and has … … 171 170 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 172 171 172 psMetadata *where = psMetadataAlloc(); 173 PXOPT_COPY_STR(config->args, where, "-det_id", "det_id", "=="); 174 PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "=="); 175 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 176 173 177 psString query = pxDataGet("detselect_select.sql"); 174 178 if (!query) { … … 177 181 } 178 182 179 180 if ( config->where) {181 psString whereClause = psDBGenerateWhereConditionSQL( config->where, NULL);183 // use psDBGenerateWhereConditionalSQL with AND ... because the SQL ends in a WHERE 184 if (where && psListLength(where->list)) { 185 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 182 186 psStringAppend(&query, " AND %s", whereClause); 183 187 psFree(whereClause); 184 188 } 189 psFree(where); 185 190 186 191 if (!p_psDBRunQuery(config->dbh, query)) {
Note:
See TracChangeset
for help on using the changeset viewer.
