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/chiptool.c

    r12096 r12131  
    169169            "INSERT INTO chipPendingExp\n"
    170170            "   SElECT\n"
     171            "       0\n"            // chip_id
    171172            "       exp_tag,\n"
    172173            "       'my recipe',\n"  // recipe
     
    269270    }
    270271
     272    if (!convertIdToStr(output)) {
     273        psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");
     274        psFree(output);
     275        return false;
     276    }
     277
    271278    // negative simple so the default is true
    272279    if (!ippdbPrintMetadatas(stdout, output, "chipPendingImfile", !simple)) {
     
    307314        psMetadata *where = psMetadataAlloc();
    308315        bool status = false;
    309         psString exp_tag = psMetadataLookupStr(&status, config->args, "-exp_tag");        if (!status) {
    310             psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_tag");
     316        psString chip_id = psMetadataLookupStr(&status, config->args, "-chip_id");        if (!status) {
     317            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -chip_id");
    311318            psFree(query);
    312319            return false;
    313320        }
    314         if (exp_tag) {
    315             if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_tag", 0, "==", exp_tag)) {
    316                 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag");
     321        if (chip_id) {
     322            if (!psMetadataAddStr(where, PS_LIST_TAIL, "chip_id", 0, "==", chip_id)) {
     323                psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
    317324                psFree(where);
    318325                psFree(query);
     
    320327            }
    321328        }
     329
    322330        psString class_id = psMetadataLookupStr(&status, config->args, "-class_id");
    323331        if (!status) {
     
    517525    }
    518526
     527    if (!convertIdToStr(output)) {
     528        psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");
     529        psFree(output);
     530        return false;
     531    }
     532
    519533    // negative simple so the default is true
    520534    if (!ippdbPrintMetadatas(stdout, output, "chipProcessedImfile", !simple)) {
     
    606620            return false;
    607621        }
     622    }
     623
     624    if (!convertIdToStr(output)) {
     625        psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");
     626        psFree(output);
     627        return false;
    608628    }
    609629
     
    799819
    800820    return chipProcessedImfileRowAlloc(
     821        imfile->chip_id,
    801822        imfile->exp_tag,
    802         imfile->chip_version,
    803         imfile->guide_version,
     823        imfile->guide_id,
    804824        imfile->class_id,
    805825        recipe,
     
    819839 
    820840    return chipProcessedExpRowAlloc(
     841        pendingExp->chip_id,
    821842        pendingExp->exp_tag,
    822         pendingExp->chip_version,
    823         pendingExp->guide_version,
     843        pendingExp->guide_id,
    824844        pendingExp->label,
    825845        pendingExp->expgroup,
     
    834854
    835855    return camPendingExpRowAlloc(
    836         pendingExp->exp_tag,
    837         0x0,        // cam version
    838         pendingExp->chip_version,
     856        0,                      // cam version, assigned by db
     857        pendingExp->chip_id,
    839858        pendingExp->label,
    840859        pendingExp->expgroup,
Note: See TracChangeset for help on using the changeset viewer.