Changeset 14023 for trunk/ippTools/src/pzgetexp.c
- Timestamp:
- Jul 5, 2007, 3:16:08 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pzgetexp.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pzgetexp.c
r12093 r14023 68 68 { 69 69 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) 71 71 bool haveLastFileSet = false; 72 72 psString lastFileSet = NULL; … … 90 90 haveLastFileSet = true; 91 91 bool status = false; 92 lastFileSet = psStringCopy(psMetadataLookupStr(&status, output->data[0], "exp_ id"));92 lastFileSet = psStringCopy(psMetadataLookupStr(&status, output->data[0], "exp_name")); 93 93 psFree(output); 94 94 } … … 142 142 { 143 143 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))" 145 145 " ENGINE=MEMORY"; 146 146 if (!p_psDBRunQuery(config->dbh, query)) { … … 156 156 157 157 { 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 (?, ?, ?, ?, ?, ?)"; 159 159 160 160 long inserted = p_psDBRunQueryPrepared(config->dbh, newSummitExps, query); … … 188 188 "INSERT INTO pzPendingExp" 189 189 " SElECT" 190 " incoming.exp_ id,"190 " incoming.exp_name," 191 191 " incoming.camera," 192 192 " incoming.telescope" 193 193 " FROM incoming" 194 194 " LEFT JOIN summitExp" 195 " USING(exp_ id, camera, telescope)"195 " USING(exp_name, camera, telescope)" 196 196 " WHERE" 197 " summitExp.exp_ idis NULL"197 " summitExp.exp_name is NULL" 198 198 " AND summitExp.camera is NULL" 199 199 " AND summitExp.telescope is NULL"; … … 218 218 " FROM incoming" 219 219 " LEFT JOIN summitExp" 220 " USING(exp_ id, camera, telescope)"220 " USING(exp_name, camera, telescope)" 221 221 " WHERE" 222 " summitExp.exp_ idis NULL"222 " summitExp.exp_name is NULL" 223 223 " AND summitExp.camera is NULL" 224 224 " AND summitExp.telescope is NULL"; … … 296 296 psListIterator *tokenCursor = psListIteratorAlloc(tokens, 0, false); 297 297 char *uri = psListGetAndIncrement(tokenCursor); 298 char *exp_ id= psListGetAndIncrement(tokenCursor); // fileset298 char *exp_name = psListGetAndIncrement(tokenCursor); // fileset 299 299 char *dateobsStr= psListGetAndIncrement(tokenCursor); // datetime 300 300 char *exp_type = psListGetAndIncrement(tokenCursor); // type … … 302 302 // create a new metadata to represent this line and it's values 303 303 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"); 306 306 psFree(md); 307 307 psFree(tokenCursor);
Note:
See TracChangeset
for help on using the changeset viewer.
