IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40290


Ignore:
Timestamp:
Dec 13, 2017, 8:53:30 AM (8 years ago)
Author:
eugene
Message:

add -data_state and -comment-skip as options to chiptool; define new db comparison NOTLKE (NOT LIKE) in psDB code

Location:
trunk
Files:
2 edited

Legend:

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

    r35789 r40290  
    4343    psMetadataAddStr(md,  PS_LIST_TAIL, "-exp_tag",            0, "search by exp_tag", NULL);
    4444    psMetadataAddStr(md,  PS_LIST_TAIL, "-exp_type",           0, "search by exp_type", NULL);
     45    psMetadataAddStr(md,  PS_LIST_TAIL, "-data_state",         0, "search by data_state", NULL);
    4546    psMetadataAddStr(md,  PS_LIST_TAIL, "-filelevel",          0, "search by filelevel", NULL);
    4647    psMetadataAddStr(md,  PS_LIST_TAIL, "-filter",             0, "search for filter", NULL);
     
    7374    psMetadataAddStr(md,  PS_LIST_TAIL, "-object",             0, "search by exposure object (LIKE comparison)", NULL);
    7475    psMetadataAddStr(md,  PS_LIST_TAIL, "-comment",            0, "search by comment field (LIKE comparison)", NULL);
     76    psMetadataAddStr(md,  PS_LIST_TAIL, "-comment-skip",       0, "exclude by comment field (NOT LIKE comparison)", NULL);
    7577    psMetadataAddStr(md,  PS_LIST_TAIL, "-obs_mode",           0, "search by observation mode", NULL);
    7678    return true;
     
    9597    PXOPT_COPY_STR(config->args, where, "-exp_tag", "rawExp.exp_tag", "==");
    9698    PXOPT_COPY_STR(config->args, where, "-exp_type", "rawExp.exp_type", "==");
     99    PXOPT_COPY_STR(config->args, where, "-data_state", "rawExp.state", "==");
    97100    PXOPT_COPY_STR(config->args, where, "-filelevel", "rawExp.filelevel", "==");
    98101    PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "LIKE");
     
    125128    PXOPT_COPY_F32(config->args, where, "-sun_angle_max", "rawExp.sun_angle", "<");
    126129    PXOPT_COPY_STR(config->args, where, "-comment", "rawExp.comment", "LIKE");
     130    PXOPT_COPY_STR(config->args, where, "-comment-skip", "rawExp.comment", "NOTLKE");
    127131    PXOPT_COPY_STR(config->args, where, "-obs_mode", "rawExp.obs_mode", "LIKE");
    128132    return true;
  • trunk/psLib/src/db/psDB.c

    r31435 r40290  
    24252425                // used in a where clause...
    24262426                psStringAppend(&query, "%s LIKE '%s'", itemName, item->data.str);
     2427            } else if (item->comment && psStrcasestr(item->comment, "NOTLKE")) {
     2428                // XXX ASC NOTE: we should have a better match for
     2429                // char & varchar columns than this.  LIKE is OK for
     2430                // very large TEXT columns that really shouldn't be
     2431                // used in a where clause...
     2432                psStringAppend(&query, "%s NOT LIKE '%s'", itemName, item->data.str);
    24272433            } else {
    24282434                psStringAppend(&query, "%s %s '%s'", itemName, opStr, item->data.str);
Note: See TracChangeset for help on using the changeset viewer.