IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 21, 2008, 2:14:23 PM (18 years ago)
Author:
eugene
Message:

adding -label option to -masked

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080219/ippTools/src/chiptool.c

    r16253 r16571  
    504504
    505505    if (psDBAffectedRows(config->dbh) < 1) {
    506         psError(PS_ERR_UNKNOWN, false, "should have affected atleast 1 row");
     506        psError(PS_ERR_UNKNOWN, false, "should have affected at least 1 row");
    507507        return false;
    508508    }
     
    545545    PS_ASSERT_PTR_NON_NULL(config, false);
    546546
     547    psMetadata *where = psMetadataAlloc();
     548
     549    PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     550
     551    if (where->list->n < 1) {
     552        psFree(where);
     553        where = NULL;
     554    }
     555
    547556    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    548557
    549558    psString query = psStringCopy("SELECT * FROM chipMask");
     559
     560    if (where) {
     561        psString whereClause = psDBGenerateWhereSQL(where, NULL);
     562        psFree(where);
     563        psStringAppend(&query, " %s", whereClause);
     564        psFree(whereClause);
     565    }
    550566
    551567    if (!p_psDBRunQuery(config->dbh, query)) {
Note: See TracChangeset for help on using the changeset viewer.