IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 5, 2007, 3:16:08 PM (19 years ago)
Author:
jhoblitt
Message:

rename exp_id -> exp_name
rename exp_tag -> exp_id
add add rawExp.exp_tag for use as an external name only

File:
1 edited

Legend:

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

    r12093 r14023  
    6868{
    6969    PS_ASSERT_PTR_NON_NULL(config, NULL);
    70     // find last fileset/exp_id (if we have one)
     70    // find last fileset/exp_name (if we have one)
    7171    bool haveLastFileSet = false;
    7272    psString lastFileSet = NULL;
     
    9090            haveLastFileSet = true;
    9191            bool status = false;
    92             lastFileSet = psStringCopy(psMetadataLookupStr(&status, output->data[0], "exp_id"));
     92            lastFileSet = psStringCopy(psMetadataLookupStr(&status, output->data[0], "exp_name"));
    9393            psFree(output);
    9494        }
     
    142142    {
    143143        char *query = "CREATE TEMPORARY TABLE incoming"
    144             " (exp_id VARCHAR(64), camera VARCHAR(64), telescope VARCHAR(64), dateobs DATETIME, exp_type VARCHAR(64), uri VARCHAR(255), PRIMARY KEY(exp_id, camera, telescope))"
     144            " (exp_name VARCHAR(64), camera VARCHAR(64), telescope VARCHAR(64), dateobs DATETIME, exp_type VARCHAR(64), uri VARCHAR(255), PRIMARY KEY(exp_name, camera, telescope))"
    145145           " ENGINE=MEMORY";
    146146        if (!p_psDBRunQuery(config->dbh, query)) {
     
    156156
    157157    {
    158         char *query = "INSERT INTO incoming (exp_id, camera, telescope, dateobs, exp_type, uri) VALUES (?, ?, ?, ?, ?, ?)";
     158        char *query = "INSERT INTO incoming (exp_name, camera, telescope, dateobs, exp_type, uri) VALUES (?, ?, ?, ?, ?, ?)";
    159159
    160160        long inserted = p_psDBRunQueryPrepared(config->dbh, newSummitExps, query);
     
    188188            "INSERT INTO pzPendingExp"
    189189            "   SElECT"
    190             "       incoming.exp_id,"
     190            "       incoming.exp_name,"
    191191            "       incoming.camera,"
    192192            "       incoming.telescope"
    193193            "   FROM incoming"
    194194            "   LEFT JOIN summitExp"
    195             "       USING(exp_id, camera, telescope)"
     195            "       USING(exp_name, camera, telescope)"
    196196            "   WHERE"
    197             "       summitExp.exp_id is NULL"
     197            "       summitExp.exp_name is NULL"
    198198            "       AND summitExp.camera is NULL"
    199199            "       AND summitExp.telescope is NULL";
     
    218218            "   FROM incoming"
    219219            "   LEFT JOIN summitExp"
    220             "       USING(exp_id, camera, telescope)"
     220            "       USING(exp_name, camera, telescope)"
    221221            "   WHERE"
    222             "       summitExp.exp_id is NULL"
     222            "       summitExp.exp_name is NULL"
    223223            "       AND summitExp.camera is NULL"
    224224            "       AND summitExp.telescope is NULL";
     
    296296        psListIterator *tokenCursor = psListIteratorAlloc(tokens, 0, false);
    297297        char *uri       = psListGetAndIncrement(tokenCursor);
    298         char *exp_id    = psListGetAndIncrement(tokenCursor); // fileset
     298        char *exp_name    = psListGetAndIncrement(tokenCursor); // fileset
    299299        char *dateobsStr= psListGetAndIncrement(tokenCursor); // datetime
    300300        char *exp_type  = psListGetAndIncrement(tokenCursor); // type
     
    302302        // create a new metadata to represent this line and it's values
    303303        psMetadata *md = psMetadataAlloc();
    304         if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, exp_id)) {
    305             psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
     304        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_name", 0, NULL, exp_name)) {
     305            psError(PS_ERR_UNKNOWN, false, "failed to add item exp_name");
    306306            psFree(md);
    307307            psFree(tokenCursor);
Note: See TracChangeset for help on using the changeset viewer.