IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30540


Ignore:
Timestamp:
Feb 9, 2011, 10:48:08 AM (15 years ago)
Author:
eugene
Message:

enable filtering of the pendingimfile list by date range

Location:
tags/ipp-20101215/ippTools/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20101215/ippTools/src/pztool.c

    r30049 r30540  
    112112    PXOPT_LOOKUP_STR(telescope, config->args, "-telescope", true, false);
    113113    PXOPT_LOOKUP_STR(uri, config->args, "-uri", true, false);
    114    
     114
    115115    if (!pzDataStoreInsert(config->dbh,
    116116            camera,
     
    294294
    295295    psMetadata *where = psMetadataAlloc();
    296     PXOPT_COPY_STR(config->args, where,  "-exp_name",     "exp_name", "==");
    297     PXOPT_COPY_STR(config->args, where,  "-inst",         "camera", "==");
    298     PXOPT_COPY_STR(config->args, where,  "-telescope",    "telescope", "==");
    299     PXOPT_COPY_STR(config->args, where,  "-exp_type",     "exp_type", "==");
     296    PXOPT_COPY_STR(config->args, where,  "-exp_name",      "exp_name", "==");
     297    PXOPT_COPY_STR(config->args, where,  "-inst",          "camera", "==");
     298    PXOPT_COPY_STR(config->args, where,  "-telescope",     "telescope", "==");
     299    PXOPT_COPY_STR(config->args, where,  "-exp_type",      "exp_type", "==");
     300    PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "dateobs",  ">=");
     301    PXOPT_COPY_TIME(config->args, where, "-dateobs_end",   "dateobs",  "<=");
    300302
    301303    PXOPT_LOOKUP_BOOL(desc, config->args, "-desc", false);
     
    325327
    326328        if (psListLength(where->list)) {
    327             psString whereClause = psDBGenerateWhereConditionSQL(where, "pzDownloadImfile");
     329            psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    328330            psStringAppend(&query, " AND %s", whereClause);
    329331            psFree(whereClause);
  • tags/ipp-20101215/ippTools/src/pztoolConfig.c

    r27082 r30540  
    7777    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-telescope", 0,            "define telescope ID", NULL);
    7878    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-exp_type", 0,            "define exposure type", NULL);
     79    psMetadataAddTime(pendingimfileArgs, PS_LIST_TAIL, "-dateobs_begin", 0,  "search for exposures by time (>=)", NULL);
     80    psMetadataAddTime(pendingimfileArgs, PS_LIST_TAIL, "-dateobs_end", 0,  "search for exposures by time (<=)", NULL);
    7981    psMetadataAddBool(pendingimfileArgs, PS_LIST_TAIL, "-desc", 0,            "sort ouput in descending format", false);
    8082    psMetadataAddU64(pendingimfileArgs, PS_LIST_TAIL, "-limit",  0,            "limit result set to N items", 0);
Note: See TracChangeset for help on using the changeset viewer.