IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 30, 2009, 1:59:14 PM (17 years ago)
Author:
bills
Message:

Added some new search arguments for -sumskyfile mode (list sumSkyfiles)
-label -filter -fault and require -all if no search args are provided.
Disabled exp_id, exp_name, and warp_id since they are incompatible with the
query.

File:
1 edited

Legend:

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

    r25437 r25691  
    859859
    860860    psMetadata *where = psMetadataAlloc();
    861     PXOPT_COPY_S64(config->args, where, "-warp_id", "warpRun.warp_id", "==");
    862861    PXOPT_COPY_S64(config->args, where, "-stack_id", "stackSumSkyfile.stack_id", "==");
    863     PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "==");
    864     PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "==");
    865862    PXOPT_COPY_STR(config->args, where, "-tess_id", "stackRun.tess_id", "==");
    866863    PXOPT_COPY_STR(config->args, where, "-skycell_id", "stackRun.skycell_id", "==");
     864    PXOPT_COPY_STR(config->args, where, "-filter", "stackRun.filter", "LIKE");
     865    PXOPT_COPY_STR(config->args, where, "-label", "stackRun.label", "==");
     866    PXOPT_COPY_S16(config->args, where, "-fault", "stackSumSkyfile.fault", "==");
     867
     868//  The following three selectors are incompatible with the sql so omit them
     869//    PXOPT_COPY_S64(config->args, where, "-warp_id", "warpRun.warp_id", "==");
     870//     PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "==");
     871//    PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "==");
     872
     873    PXOPT_LOOKUP_BOOL(all, config->args, "-all", false);
    867874
    868875    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     
    879886        psStringAppend(&query, " WHERE %s", whereClause);
    880887        psFree(whereClause);
    881     }
     888    } else if (!all) {
     889        psError(PXTOOLS_ERR_DATA, true, "search parameters or -all are required");
     890        return false;
     891    }
     892
    882893    psFree(where);
    883894
Note: See TracChangeset for help on using the changeset viewer.