IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14065


Ignore:
Timestamp:
Jul 6, 2007, 5:42:07 PM (19 years ago)
Author:
jhoblitt
Message:

remove chipInputImfile table

Location:
trunk
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/chip.md

    r14023 r14065  
    1 #
    2 #  We are dependant on the assumption that there is only ever one exp_id in a
    3 #  chipRun although the database does not enforce this.
    4 #
    5 
    61chipRun METADATA
    72    chip_id     S64         0       # Primary Key AUTO_INCREMENT
    8     state       STR         64      # key
     3    exp_id      S64         64      # Primary Key fkey (exp_id) ref rawExp(exp_id)
     4    state       STR         64      # Key
    95    workdir     STR         255
    10     workdir_state STR       64      # key
    11     label       STR         64      # key
     6    workdir_state STR       64      # Key
     7    label       STR         64      # Key
    128    reduction   STR         64      # Reduction class
    13     expgroup    STR         64      # key
     9    expgroup    STR         64      # Key
    1410    dvodb       STR         255
    1511END
    1612
    17 chipInputImfile METADATA
    18     chip_id     S64         0       # Primary Key fkey (chip_id) ref chipRun(chip_id)
    19     exp_id      S64         64      # Primary Key fkey (exp_id, class_id) ref rawImfile (exp_id, class_id)
    20     class_id    STR         64      # Primary Key
    21 END
    22 
    2313chipProcessedImfile METADATA
    24     chip_id     S64         0       # Primary Key fkey (chip_id, exp_id, class_id) ref chipInputImfile(chip_id, exp_id, class_id)
    25     exp_id     S64         64      # Primary Key
     14    chip_id         S64     0       # Primary Key fkey (chip_id, exp_id) ref chipRun(chip_id, exp_id)
     15    exp_id          S64     64      # Primary Key fkey (exp_id, class_id) ref rawImfile(exp_id, class_id)
    2616    class_id        STR     64      # Primary Key
    2717    uri             STR     255
  • trunk/ippTools/share/Makefile.am

    r14059 r14065  
    99        chiptool_pendingimfile.sql \
    1010        chiptool_processedimfile.sql \
    11         chiptool_queuerawimfile.sql \
    1211        detselect_search.sql \
    1312        detselect_select.sql \
  • trunk/ippTools/share/chiptool_completely_processed_exp.sql

    r14058 r14065  
    22SELECT DISTINCT
    33    chip_id,
     4    exp_id,
    45    state,
    56    workdir,
     
    1516        chipProcessedImfile.class_id
    1617    FROM chipRun
    17     JOIN chipInputImfile
    18         USING(chip_id)
    19     JOIN rawExp
    20         ON chipInputImfile.exp_id = rawExp.exp_id
    2118    JOIN rawImfile
    22         ON rawExp.exp_id = rawImfile.exp_id
     19        USING(exp_id)
    2320    LEFT JOIN chipProcessedImfile
    24         ON chipInputImfile.chip_id = chipProcessedImfile.chip_id
    25         AND chipInputImfile.exp_id = chipProcessedImfile.exp_id
    26         AND chipInputImfile.class_id = chipProcessedImfile.class_id
     21        ON chipRun.chip_id = chipProcessedImfile.chip_id
     22        AND rawImfile.exp_id = chipProcessedImfile.exp_id
     23        AND rawImfile.class_id = chipProcessedImfile.class_id
    2724    WHERE
    2825        chipRun.state = 'run'
    2926        AND chipProcessedImfile.fault = 0
    3027    GROUP BY
    31         chipInputImfile.chip_id,
    32         chipInputImfile.exp_id
     28        chipRun.chip_id,
     29        chipRun.exp_id
    3330    HAVING COUNT(rawImfile.class_id) = COUNT(chipProcessedImfile.class_id)
    3431    ) as Foo
  • trunk/ippTools/share/chiptool_pendingimfile.sql

    r14025 r14065  
    11SELECT
    22    chipRun.*,
    3     chipInputImfile.exp_id,
    4     chipInputImfile.class_id,
     3    rawImfile.class_id,
    54    rawImfile.uri,
    65    rawExp.exp_tag,
     
    109    rawExp.filelevel
    1110FROM chipRun
    12 JOIN chipInputImfile
    13     USING(chip_id)
     11JOIN rawExp
     12    USING(exp_id)
     13JOIN rawImfile
     14    USING(exp_id)
    1415LEFT JOIN chipProcessedImfile
    15     ON chipInputImfile.chip_id = chipProcessedImfile.chip_id
    16     AND chipInputImfile.exp_id = chipProcessedImfile.exp_id
    17     AND chipInputImfile.class_id = chipProcessedImfile.class_id
    18 JOIN rawImfile
    19     ON chipInputImfile.exp_id = rawImfile.exp_id
    20     AND chipInputImfile.class_id = rawImfile.class_id
    21 JOIN rawExp
    22     ON rawImfile.exp_id = rawExp.exp_id
     16    ON chipRun.chip_id = chipProcessedImfile.chip_id
     17    AND rawImfile.exp_id = chipProcessedImfile.exp_id
     18    AND rawImfile.class_id = chipProcessedImfile.class_id
    2319LEFT JOIN chipMask
    2420    ON chipRun.label = chipMask.label
  • trunk/ippTools/src/pxchip.c

    r14023 r14065  
    7575    if (!chipRunInsert(config->dbh,
    7676            0x0,
     77            (psS64)atoll(exp_id),
    7778            "run",      // state               
    7879            workdir,
     
    9192    }
    9293
    93 #if 0
    94     // get the chip_id
    95     long chip_id = psDBLastInsertID(config->dbh);
    96 #endif
    97 
    98     // populate the chipInputImfile table from rawImfile based on exp_id,
    99     // where the coresponding newExp.state entry is set to stop
    100     psString query = pxDataGetCached("chiptool_queuerawimfile.sql");
    101     if (!query) {
    102         psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
    103         return false;
    104     }
    105 
    106     // queue the imfiles for the exp_id
    107     if (!p_psDBRunQuery(config->dbh, query, exp_id)) {
    108         psError(PS_ERR_UNKNOWN, false, "database error");
    109         return false;
    110     }
    111 
    112     // just to be safe, we should have changed at least one row
    113     if (psDBAffectedRows(config->dbh) < 1) {
    114         psError(PS_ERR_UNKNOWN, false,
    115                 "no rows affected - should have changed at least one row");
    116         return false;
    117     }
    118 
    11994    // point of no return
    12095    if (!psDBCommit(config->dbh)) {
  • trunk/ippTools/src/pxtables.c

    r14023 r14065  
    6363    CREATE_TABLE(guidePendingExpCreateTable);
    6464    CREATE_TABLE(chipRunCreateTable);
    65     CREATE_TABLE(chipInputImfileCreateTable);
     65//    CREATE_TABLE(chipInputImfileCreateTable);
    6666    CREATE_TABLE(chipProcessedImfileCreateTable);
    6767    CREATE_TABLE(chipMaskCreateTable);
     
    144144    DROP_TABLE(guidePendingExpDropTable);
    145145    DROP_TABLE(chipRunDropTable);
    146     DROP_TABLE(chipInputImfileDropTable);
     146//    DROP_TABLE(chipInputImfileDropTable);
    147147    DROP_TABLE(chipProcessedImfileDropTable);
    148148    DROP_TABLE(chipMaskDropTable);
Note: See TracChangeset for help on using the changeset viewer.