IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37385 for trunk/ippTools


Ignore:
Timestamp:
Sep 10, 2014, 5:52:55 PM (12 years ago)
Author:
watersc1
Message:

Fix updaterun to handle sass_id constraint.

File:
1 edited

Legend:

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

    r37384 r37385  
    758758    PXOPT_COPY_STR(config->args, where, "-data_group", "stackRun.data_group", "==");
    759759    PXOPT_COPY_STR(config->args, where, "-state",     "stackRun.state",     "==");
    760     PXOPT_COPY_S64(config->args, where, "-sass_id",   "stackAssociationMap.sass_id",  "==");
     760
    761761    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     762    PXOPT_LOOKUP_S64(sass_id, config->args, "-sass_id", false, false);
     763
     764    if (sass_id) {
     765      PXOPT_COPY_S64(config->args, where, "-sass_id",   "stackAssociationMap.sass_id",  "==");
     766    }
     767   
    762768    if (!psListLength(where->list)) {
    763769        psFree(where);
     
    773779        PXOPT_COPY_S16(config->args, where, "-fault", "stackSumSkyfile.fault", "==");
    774780    }
    775 
     781    if (sass_id) {
     782      psStringAppend(&query, " JOIN stackAssociationMap USING(stack_id)");
     783    }
     784   
    776785    // pxUpdateRun gets parameters from config->args and updates
    777786    bool result = pxUpdateRun(config, where, &query, "stackRun", "stack_id", "stackSumSkyfile", true, false);
Note: See TracChangeset for help on using the changeset viewer.