IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 16, 2015, 4:37:38 PM (11 years ago)
Author:
heather
Message:

addtool multi pending

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/addtool.c

    r38359 r38478  
    992992    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    993993    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
     994    PXOPT_LOOKUP_BOOL(multi, config->args, "-multiadd", false);
    994995   
    995996    psString query = NULL;
     
    10411042    if (strcmp(stage, "diff") == 0) {
    10421043      //this group by is needed to join against all the warps (to get camera)
     1044      if (multi) {
     1045        psStringAppend(&query, " GROUP BY %s", "diff_id");
     1046      } else {
    10431047      psStringAppend(&query, " GROUP BY %s", "diff_id, stage_extra1");
     1048      }
    10441049    }
    10451050    if (strcmp(stage, "fullforce") == 0) {
    10461051      //this group by is needed to join against all the warps (to get camera)
    1047       psStringAppend(&query, " GROUP BY %s", "ff_id, stage_extra1");
    1048     }
    1049 
     1052      if (multi) {
     1053        psStringAppend(&query, "GROUP BY %s", "ff_id");
     1054      } else {
     1055        psStringAppend(&query, " GROUP BY %s", "ff_id, stage_extra1");
     1056      }
     1057    }
     1058
     1059    //    if (multi) {
     1060    //  psStringAppend(&query, " , %s", "stage_id");
     1061    //}
    10501062
    10511063
     
    10611073        return false;
    10621074    }
     1075    printf ("%s\n", query);
    10631076    psTrace("addtool.c", PS_LOG_INFO, "used this query:\n %s\n",query);
    10641077    psFree(query);
     
    11011114    PXOPT_LOOKUP_S16(fault,         config->args, "-fault", false, false);
    11021115    PXOPT_LOOKUP_S64(stage_extra1, config->args, "-stage_extra1", false, false);
    1103 
     1116    PXOPT_LOOKUP_BOOL(multi, config->args, "-multi", false);
    11041117    // generate restrictions
    11051118    psMetadata *where = psMetadataAlloc();
     
    11191132    }
    11201133    psFree(where);
     1134
     1135    if (multi) {
     1136      psStringAppend(&query, "group by  %s", "stage_extra1");
     1137    }
    11211138
    11221139    if (!p_psDBRunQuery(config->dbh, query)) {
Note: See TracChangeset for help on using the changeset viewer.