IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 28, 2007, 6:44:37 PM (19 years ago)
Author:
jhoblitt
Message:

rename all *_version fields to be *_id
change chip* tables to use a chip_id
change cam* tables to use a cam_id
change all *_id fields to be S64

File:
1 edited

Legend:

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

    r12096 r12131  
    4141// static guidePendingExpRow *newToP1PendingExp(newExpRow *newExp);
    4242static chipPendingExpRow *newTochipPendingExp(pxConfig *config, newExpRow *newExp);
    43 static chipPendingImfileRow *rawImfileTochipPendingImfile(pxConfig *config, rawImfileRow *rawImfile);
     43static chipPendingImfileRow *rawImfileTochipPendingImfile(pxConfig *config, psS64 chip_id, rawImfileRow *rawImfile);
    4444
    4545static rawExpRow *newToRawExp(pxConfig *config, newExpRow *exp);
     
    664664            return false;
    665665        }
     666
     667        // get the chip_id for the imfiles
     668        psS64 chip_id = psDBLastInsertID(config->dbh);
    666669        psFree(chipPendingExp);
    667670
     
    712715        for (long i = 0; i < psArrayLength(rawImfiles); i++) {
    713716            rawImfileRow *rawImfile = rawImfiles->data[i];
    714             chipPendingImfileRow *pendingImfile = rawImfileTochipPendingImfile(config, rawImfile);
     717            chipPendingImfileRow *pendingImfile = rawImfileTochipPendingImfile(config, chip_id, rawImfile);
    715718            if (!chipPendingImfileInsertObject(config->dbh, pendingImfile)){
    716719                // rollback
     
    890893
    891894    chipPendingExpRow *chipExp = chipPendingExpRowAlloc(
    892         exp->exp_tag,
    893         0x0,            // chip version XXX calc version number
    894         0xdeadbeef,     // guide version
    895         label,
    896         "my recipe",
    897         NULL,           // groupa
    898         NULL            // dvodb
     895            0,              // chip ID, assigned by db
     896            exp->exp_tag,
     897            0xdeadbeef,     // guide version
     898            label,
     899            "my recipe",    // recipe
     900            NULL,           // expgroup
     901            NULL            // dvodb
    899902    );
    900903
     
    903906
    904907
    905 static chipPendingImfileRow *rawImfileTochipPendingImfile(pxConfig *config, rawImfileRow *rawImfile)
     908static chipPendingImfileRow *rawImfileTochipPendingImfile(pxConfig *config, psS64 chip_id, rawImfileRow *rawImfile)
    906909{
    907910    return chipPendingImfileRowAlloc(
    908         rawImfile->exp_tag,
    909         0x0,          // chip version XXX calc version number
    910         0xdeadbeef,   // guide version
    911         rawImfile->class_id,
    912         "my recipe",
    913         rawImfile->uri
     911            chip_id,
     912            rawImfile->exp_tag,
     913            0xdeadbeef,     // guide version
     914            rawImfile->class_id,
     915            "my recipe",    // recipe
     916            rawImfile->uri
    914917    );
    915918}
Note: See TracChangeset for help on using the changeset viewer.