Changeset 35397 for trunk/ippTools/src/releasetool.c
- Timestamp:
- Apr 12, 2013, 11:01:10 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/releasetool.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/releasetool.c
r35358 r35397 975 975 psMetadata *where = psMetadataAlloc(); 976 976 977 PXOPT_COPY_S64(config->args, where, "-relstack_id", "relStack.relstack_id", "=="); 978 PXOPT_COPY_S64(config->args, where, "-stack_id", "relStack.stack_id", "=="); 979 PXOPT_COPY_S64(config->args, where, "-skycal_id", "relStack.skycal_id", "=="); 980 PXOPT_COPY_S64(config->args, where, "-relstack_id", "relStack.relstack_id", "=="); 977 981 PXOPT_COPY_STR(config->args, where, "-release_name", "ippRelease.release_name", "LIKE"); 978 982 pxAddLabelSearchArgs(config, where, "-release_state","ippRelease.state", "=="); 979 PXOPT_COPY_STR(config->args, where, "-state", "rel Exp.state", "==");980 PXOPT_COPY_STR(config->args, where, "-filter", "r awExp.filter", "LIKE");981 PXOPT_COPY_ TIME(config->args, where, "-dateobs_begin","rawExp.dateobs", ">=");982 PXOPT_COPY_ TIME(config->args, where, "-dateobs_end", "rawExp.dateobs", "<=");983 PXOPT_COPY_F32(config->args, where, "-fwhm_min", "skycalResult.fwhm_m ajor", ">=");983 PXOPT_COPY_STR(config->args, where, "-state", "relStack.state", "=="); 984 PXOPT_COPY_STR(config->args, where, "-filter", "relStack.filter", "LIKE"); 985 PXOPT_COPY_F32(config->args, where, "-mjd_min", "stackSumSkyfile.mjd_obs", ">="); 986 PXOPT_COPY_F32(config->args, where, "-mjd_max", "stackSumSkyfile.mjd_obs", "<="); 987 PXOPT_COPY_F32(config->args, where, "-fwhm_min", "skycalResult.fwhm_minor", ">="); 984 988 PXOPT_COPY_F32(config->args, where, "-fwhm_max", "skycalresult.fwhm_major", "<="); 985 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_ame", "=="); 986 PXOPT_COPY_S64(config->args, where, "-exp_id", "relExp.exp_id", "=="); 987 PXOPT_COPY_S64(config->args, where, "-chip_id", "relExp.chip_id", "=="); 988 PXOPT_COPY_S64(config->args, where, "-cam_id", "relExp.cam_id", "=="); 989 PXOPT_COPY_S64(config->args, where, "-warp_id", "warpRun.warp_id", "=="); 990 PXOPT_COPY_STR(config->args, where, "-chip_data_group", "chipRun.data_group", "LIKE"); 991 PXOPT_COPY_STR(config->args, where, "-cam_data_group", "camRun.data_group", "LIKE"); 992 PXOPT_COPY_STR(config->args, where, "-warp_data_group", "warpRun.data_group", "LIKE"); 989 PXOPT_COPY_STR(config->args, where, "-tess_id", "relStack.tess_id", "=="); 990 PXOPT_COPY_STR(config->args, where, "-skycell_id", "relStack.skycell_id", "LIKE"); 991 PXOPT_COPY_STR(config->args, where, "-stack_data_group", "stackRun.data_group", "LIKE"); 992 PXOPT_COPY_STR(config->args, where, "-skycal_data_group", "skycalRun.data_group", "LIKE"); 993 993 994 994 PXOPT_COPY_STR(config->args, where, "-surveyName", "survey.surveyName", "LIKE"); 995 995 PXOPT_COPY_S32(config->args, where, "-rel_id", "relExp.rel_id", "=="); 996 pxskycellAddWhere(config, where); 996 997 997 998 PXOPT_LOOKUP_BOOL(priority_order, config->args, "-priority_order", false); … … 1000 1001 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 1001 1002 1002 psString query = pxDataGet("releasetool_listrel exp.sql");1003 psString query = pxDataGet("releasetool_listrelstack.sql"); 1003 1004 if (!query) { 1004 1005 psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement"); 1005 return false;1006 }1007 1008 psString where2 = NULL;1009 if (!pxspaceAddWhere(config, &where2, "rawExp")) {1010 psError(psErrorCodeLast(), false, "pxspaceAddWhere failed");1011 1006 return false; 1012 1007 } … … 1016 1011 psStringAppend(&query, "\nWHERE %s", whereClause); 1017 1012 psFree(whereClause); 1018 } else if (where2) {1019 psStringAppend(&query, "\nWHERE ");1020 1013 } else { 1021 1014 psError(PXTOOLS_ERR_CONFIG, false, "search parameters are required\n"); … … 1024 1017 } 1025 1018 1026 if (where2) {1027 psStringAppend(&query, "\n%s", where2);1028 psFree(where2);1029 }1030 1031 1019 if (priority_order) { 1032 psStringAppend(&query, "\nAND priority > 0 order by exp_id, priority");1020 psStringAppend(&query, "\nAND priority > 0 order by stack_id, priority"); 1033 1021 } 1034 1022 … … 1058 1046 } 1059 1047 1060 if (!ippdbPrintMetadatas(stdout, output, "rel Exp", !simple)) {1048 if (!ippdbPrintMetadatas(stdout, output, "relStack", !simple)) { 1061 1049 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 1062 1050 psFree(output);
Note:
See TracChangeset
for help on using the changeset viewer.
