IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9406


Ignore:
Timestamp:
Oct 8, 2006, 12:57:23 PM (20 years ago)
Author:
eugene
Message:

added joins to get the class in output list; temporarily force match of detRun.det_type = rawDetrendExp.object

File:
1 edited

Legend:

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

    r9404 r9406  
    6969    PS_ASSERT_PTR_NON_NULL(config, false);
    7070
     71# define JOSH_SQL 0
     72# if (JOSH_SQL)
    7173    psString query = psStringCopy(
    7274        "SELECT"
     
    9092        "   AND detRunSummary.accept = 1"
    9193    );
     94# else
     95    psString query = psStringCopy(
     96        "SELECT DISTINCT"
     97        "   detRunSummary.det_id,"
     98        "   detRunSummary.iteration,"
     99        "   rawImfile.class,"
     100        "   detRun.det_type"
     101        // "   detRun.state,"
     102        // "   detRunSummary.accept,"
     103        // "   rawDetrendExp.camera"
     104        "  FROM detRun"
     105        "  JOIN detRunSummary "
     106        "    ON detRun.position = detRunSummary.det_id"
     107        "  JOIN detInputExp"
     108        "    ON detRunSummary.det_id = detInputExp.det_id"
     109        "   AND detRunSummary.iteration = detInputExp.iteration"
     110        "  JOIN rawImfile"
     111        "    ON detInputExp.exp_tag = rawImfile.exp_tag"
     112        "  JOIN rawDetrendExp"
     113        "    ON detInputExp.exp_tag = rawDetrendExp.exp_tag"
     114        " WHERE detRun.state = 'stop'"
     115        "   AND detRunSummary.accept = 1"
     116        // XXX the following entry is needed to exclude db mismatched
     117        // XXX these are caused by an error upstream and should be fixed
     118        "   AND detRun.det_type = rawDetrendExp.object"
     119    );
     120# endif
    92121
    93122    if (config->where) {
     
    105134    }
    106135
    107     psStringAppend(&query, " LIMIT 1");
     136    // psStringAppend(&query, " LIMIT 1");
    108137
    109138    if (!p_psDBRunQuery(config->dbh, query)) {
Note: See TracChangeset for help on using the changeset viewer.