Changeset 13849
- Timestamp:
- Jun 15, 2007, 2:33:47 PM (19 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 2 edited
-
dettool.c (modified) (4 diffs)
-
dettoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r13723 r13849 2955 2955 PS_ASSERT_PTR_NON_NULL(config, false); 2956 2956 2957 char *value = NULL; 2957 2958 bool status = false; 2959 2958 2960 psU64 limit = psMetadataLookupU64(&status, config->args, "-limit"); 2959 2961 if (!status) { … … 2980 2982 " AND detProcessedImfile.exp_tag = detInputExp.exp_tag" 2981 2983 " WHERE" 2982 " detRun.state = 'run'"2983 " AND detRun.mode = 'master'"2984 2984 ); 2985 // NOTE the above WHERE is completed with the following line: 2986 2987 // add the two required restrictions: detRun.state and detRun.mode 2988 if ((value = psMetadataLookupStr(&status, config->args, "-select_state"))) { 2989 psStringAppend(&query, " detRun.state = '%s'", value); 2990 } else { 2991 psStringAppend(&query, " detRun.state = 'run'"); 2992 } 2993 if ((value = psMetadataLookupStr(&status, config->args, "-select_mode"))) { 2994 psStringAppend(&query, " AND detRun.mode = '%s'", value); 2995 } else { 2996 psStringAppend(&query, " AND detRun.mode = 'master'"); 2997 } 2985 2998 2986 2999 if (config->where) { … … 3011 3024 } 3012 3025 3013 if (!p_psDBRunQuery(config->dbh, query)) {3014 psError(PS_ERR_UNKNOWN, false, "database error");3015 psFree(query);3016 return false;3017 }3018 psFree(query);3019 3020 3026 // treat limit == 0 as "no limit" 3021 3027 if (limit) { … … 3024 3030 psFree(limitString); 3025 3031 } 3032 3033 if (!p_psDBRunQuery(config->dbh, query)) { 3034 psError(PS_ERR_UNKNOWN, false, "database error"); 3035 psFree(query); 3036 return false; 3037 } 3038 psFree(query); 3026 3039 3027 3040 psArray *output = p_psDBFetchResult(config->dbh); -
trunk/ippTools/src/dettoolConfig.c
r13723 r13849 356 356 psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-class_id", 0, 357 357 "search for class ID", NULL); 358 psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-select_state", 0, 359 "search for state", NULL); 360 psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-select_mode", 0, 361 "search for mode", NULL); 358 362 psMetadataAddBool(processedimfileArgs, PS_LIST_TAIL, "-chip", 0, 359 363 "restrict results to completed 'chip' sets", false);
Note:
See TracChangeset
for help on using the changeset viewer.
