IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2013, 2:34:49 PM (13 years ago)
Author:
eugene
Message:

merging changes from trunk

Location:
branches/eam_branches/ipp-20121219
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219

  • branches/eam_branches/ipp-20121219/ippTools/src

  • branches/eam_branches/ipp-20121219/ippTools/src/staticskytool.c

    r34815 r35096  
    503503    PXOPT_COPY_S64(config->args, whereMD, "-sky_id", "sky_id", "==");
    504504    pxAddLabelSearchArgs (config, whereMD, "-label", "staticskyRun.label", "==");
     505    pxskycellAddWhere(config, whereMD);
    505506
    506507    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     
    736737    PXOPT_COPY_S16(config->args, where, "-fault", "staticskyResult.fault", "==");
    737738
     739    if (!pxskycellAddWhere(config, where)) {
     740        psError(PXTOOLS_ERR_CONFIG, false, "failed to add skycell search arguments");
     741        return false;
     742    }
     743
    738744    if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) {
    739745        psFree(where);
     
    10661072    psFree(whereMD);
    10671073
     1074    psString labelHook = psStringCopy("");
    10681075    if (!rerun) {
    10691076        if (label)  {
    1070             psStringAppend(&query, "\nAND (skycalRun.label IS NULL OR skycalRun.label = '%s')", label);
     1077            psStringAppend(&labelHook, "\nAND skycalRun.label = '%s'", label);
    10711078        }
    10721079        psStringAppend(&query, "\nAND skycal_id IS NULL");
    10731080    }
    10741081
    1075     if (!p_psDBRunQuery(config->dbh, query)) {
     1082
     1083    if (!p_psDBRunQueryF(config->dbh, query, labelHook)) {
    10761084        psError(PS_ERR_UNKNOWN, false, "database error");
     1085        psFree(labelHook);
    10771086        psFree(query);
    10781087        return false;
    10791088    }
     1089    psFree(labelHook);
    10801090    psFree(query);
    10811091
     
    13921402    PXOPT_COPY_STR(config->args, where, "-label",      "skycalRun.label", "==");
    13931403    PXOPT_COPY_STR(config->args, where, "-data_group", "skycalRun.data_group", "LIKE");
     1404    PXOPT_COPY_S16(config->args, where, "-quality",     "skycalResult.quality", "==");
    13941405    PXOPT_COPY_S16(config->args, where, "-fault",      "skycalResult.fault", "==");
     1406
     1407    if (!pxskycellAddWhere(config, where)) {
     1408        psError(PXTOOLS_ERR_CONFIG, false, "failed to add skycell search arguments");
     1409        return false;
     1410    }
    13951411
    13961412    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     
    14681484    pxAddLabelSearchArgs(config, where, "-filter", "stackRun.filter", "==");
    14691485    PXOPT_COPY_S16(config->args, where, "-fault", "skycalResult.fault", "==");
     1486    if (!pxskycellAddWhere(config, where)) {
     1487        psError(PXTOOLS_ERR_CONFIG, false, "failed to add skycell search arguments");
     1488        return false;
     1489    }
    14701490
    14711491    if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) {
Note: See TracChangeset for help on using the changeset viewer.