Changeset 12130 for trunk/ippdb/src/ippdb.c
- Timestamp:
- Feb 28, 2007, 6:43:37 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.c (modified) (193 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.c
r12061 r12130 4950 4950 static void guidePendingExpRowFree(guidePendingExpRow *object); 4951 4951 4952 guidePendingExpRow *guidePendingExpRowAlloc( const char *exp_tag, psS32 guide_version, const char *recipe)4952 guidePendingExpRow *guidePendingExpRowAlloc(psS64 guide_id, const char *exp_tag, const char *recipe) 4953 4953 { 4954 4954 guidePendingExpRow *_object; … … 4957 4957 psMemSetDeallocator(_object, (psFreeFunc)guidePendingExpRowFree); 4958 4958 4959 _object->guide_id = guide_id; 4959 4960 _object->exp_tag = psStringCopy(exp_tag); 4960 _object->guide_version = guide_version;4961 4961 _object->recipe = psStringCopy(recipe); 4962 4962 … … 4973 4973 { 4974 4974 psMetadata *md = psMetadataAlloc(); 4975 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Primary Key", "64")) { 4975 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, "Primary Key AUTO_INCREMENT", 0)) { 4976 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 4977 psFree(md); 4978 return false; 4979 } 4980 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Key", "64")) { 4976 4981 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 4977 psFree(md);4978 return false;4979 }4980 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, "Primary Key", 0)) {4981 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version");4982 4982 psFree(md); 4983 4983 return false; … … 5001 5001 } 5002 5002 5003 bool guidePendingExpInsert(psDB * dbh, const char *exp_tag, psS32 guide_version, const char *recipe)5003 bool guidePendingExpInsert(psDB * dbh, psS64 guide_id, const char *exp_tag, const char *recipe) 5004 5004 { 5005 5005 psMetadata *md = psMetadataAlloc(); 5006 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, guide_id)) { 5007 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 5008 psFree(md); 5009 return false; 5010 } 5006 5011 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, exp_tag)) { 5007 5012 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 5008 psFree(md);5009 return false;5010 }5011 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, guide_version)) {5012 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version");5013 5013 psFree(md); 5014 5014 return false; … … 5042 5042 bool guidePendingExpInsertObject(psDB *dbh, guidePendingExpRow *object) 5043 5043 { 5044 return guidePendingExpInsert(dbh, object-> exp_tag, object->guide_version, object->recipe);5044 return guidePendingExpInsert(dbh, object->guide_id, object->exp_tag, object->recipe); 5045 5045 } 5046 5046 … … 5115 5115 { 5116 5116 psMetadata *md = psMetadataAlloc(); 5117 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, object->guide_id)) { 5118 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 5119 psFree(md); 5120 return false; 5121 } 5117 5122 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, object->exp_tag)) { 5118 5123 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 5120 5125 return false; 5121 5126 } 5122 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, object->guide_version)) {5123 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version");5124 psFree(md);5125 return false;5126 }5127 5127 if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, object->recipe)) { 5128 5128 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 5139 5139 5140 5140 bool status = false; 5141 psS64 guide_id = psMetadataLookupS64(&status, md, "guide_id"); 5142 if (!status) { 5143 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_id"); 5144 return false; 5145 } 5141 5146 char* exp_tag = psMetadataLookupPtr(&status, md, "exp_tag"); 5142 5147 if (!status) { … … 5144 5149 return false; 5145 5150 } 5146 psS32 guide_version = psMetadataLookupS32(&status, md, "guide_version");5147 if (!status) {5148 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_version");5149 return false;5150 }5151 5151 char* recipe = psMetadataLookupPtr(&status, md, "recipe"); 5152 5152 if (!status) { … … 5155 5155 } 5156 5156 5157 return guidePendingExpRowAlloc( exp_tag, guide_version, recipe);5157 return guidePendingExpRowAlloc(guide_id, exp_tag, recipe); 5158 5158 } 5159 5159 psArray *guidePendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 5267 5267 static void chipPendingExpRowFree(chipPendingExpRow *object); 5268 5268 5269 chipPendingExpRow *chipPendingExpRowAlloc( const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *label, const char *recipe, const char *expgroup, const char *dvodb)5269 chipPendingExpRow *chipPendingExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *label, const char *recipe, const char *expgroup, const char *dvodb) 5270 5270 { 5271 5271 chipPendingExpRow *_object; … … 5274 5274 psMemSetDeallocator(_object, (psFreeFunc)chipPendingExpRowFree); 5275 5275 5276 _object->chip_id = chip_id; 5276 5277 _object->exp_tag = psStringCopy(exp_tag); 5277 _object->chip_version = chip_version; 5278 _object->guide_version = guide_version; 5278 _object->guide_id = guide_id; 5279 5279 _object->label = psStringCopy(label); 5280 5280 _object->recipe = psStringCopy(recipe); … … 5297 5297 { 5298 5298 psMetadata *md = psMetadataAlloc(); 5299 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, "Primary Key AUTO_INCREMENT", 0)) { 5300 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 5301 psFree(md); 5302 return false; 5303 } 5299 5304 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Primary Key", "64")) { 5300 5305 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 5302 5307 return false; 5303 5308 } 5304 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, "Primary Key", 0)) { 5305 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 5306 psFree(md); 5307 return false; 5308 } 5309 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, 0)) { 5310 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 5309 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, "Not NULL", 0)) { 5310 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 5311 5311 psFree(md); 5312 5312 return false; … … 5345 5345 } 5346 5346 5347 bool chipPendingExpInsert(psDB * dbh, const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *label, const char *recipe, const char *expgroup, const char *dvodb)5347 bool chipPendingExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *label, const char *recipe, const char *expgroup, const char *dvodb) 5348 5348 { 5349 5349 psMetadata *md = psMetadataAlloc(); 5350 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) { 5351 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 5352 psFree(md); 5353 return false; 5354 } 5350 5355 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, exp_tag)) { 5351 5356 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 5353 5358 return false; 5354 5359 } 5355 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, chip_version)) { 5356 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 5357 psFree(md); 5358 return false; 5359 } 5360 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, guide_version)) { 5361 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 5360 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, guide_id)) { 5361 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 5362 5362 psFree(md); 5363 5363 return false; … … 5406 5406 bool chipPendingExpInsertObject(psDB *dbh, chipPendingExpRow *object) 5407 5407 { 5408 return chipPendingExpInsert(dbh, object-> exp_tag, object->chip_version, object->guide_version, object->label, object->recipe, object->expgroup, object->dvodb);5408 return chipPendingExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->label, object->recipe, object->expgroup, object->dvodb); 5409 5409 } 5410 5410 … … 5479 5479 { 5480 5480 psMetadata *md = psMetadataAlloc(); 5481 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, object->chip_id)) { 5482 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 5483 psFree(md); 5484 return false; 5485 } 5481 5486 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, object->exp_tag)) { 5482 5487 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 5484 5489 return false; 5485 5490 } 5486 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, object->chip_version)) { 5487 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 5488 psFree(md); 5489 return false; 5490 } 5491 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, object->guide_version)) { 5492 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 5491 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, object->guide_id)) { 5492 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 5493 5493 psFree(md); 5494 5494 return false; … … 5523 5523 5524 5524 bool status = false; 5525 psS64 chip_id = psMetadataLookupS64(&status, md, "chip_id"); 5526 if (!status) { 5527 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_id"); 5528 return false; 5529 } 5525 5530 char* exp_tag = psMetadataLookupPtr(&status, md, "exp_tag"); 5526 5531 if (!status) { … … 5528 5533 return false; 5529 5534 } 5530 psS32 chip_version = psMetadataLookupS32(&status, md, "chip_version"); 5531 if (!status) { 5532 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_version"); 5533 return false; 5534 } 5535 psS32 guide_version = psMetadataLookupS32(&status, md, "guide_version"); 5536 if (!status) { 5537 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_version"); 5535 psS64 guide_id = psMetadataLookupS64(&status, md, "guide_id"); 5536 if (!status) { 5537 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_id"); 5538 5538 return false; 5539 5539 } … … 5559 5559 } 5560 5560 5561 return chipPendingExpRowAlloc( exp_tag, chip_version, guide_version, label, recipe, expgroup, dvodb);5561 return chipPendingExpRowAlloc(chip_id, exp_tag, guide_id, label, recipe, expgroup, dvodb); 5562 5562 } 5563 5563 psArray *chipPendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 5671 5671 static void chipPendingImfileRowFree(chipPendingImfileRow *object); 5672 5672 5673 chipPendingImfileRow *chipPendingImfileRowAlloc( const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *class_id, const char *recipe, const char *uri)5673 chipPendingImfileRow *chipPendingImfileRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *class_id, const char *recipe, const char *uri) 5674 5674 { 5675 5675 chipPendingImfileRow *_object; … … 5678 5678 psMemSetDeallocator(_object, (psFreeFunc)chipPendingImfileRowFree); 5679 5679 5680 _object->chip_id = chip_id; 5680 5681 _object->exp_tag = psStringCopy(exp_tag); 5681 _object->chip_version = chip_version; 5682 _object->guide_version = guide_version; 5682 _object->guide_id = guide_id; 5683 5683 _object->class_id = psStringCopy(class_id); 5684 5684 _object->recipe = psStringCopy(recipe); … … 5699 5699 { 5700 5700 psMetadata *md = psMetadataAlloc(); 5701 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, "Primary Key", 0)) { 5702 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 5703 psFree(md); 5704 return false; 5705 } 5701 5706 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Primary Key", "64")) { 5702 5707 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 5704 5709 return false; 5705 5710 } 5706 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, "Primary Key", 0)) { 5707 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 5708 psFree(md); 5709 return false; 5710 } 5711 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, 0)) { 5712 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 5711 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, "Not NULL", 0)) { 5712 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 5713 5713 psFree(md); 5714 5714 return false; … … 5742 5742 } 5743 5743 5744 bool chipPendingImfileInsert(psDB * dbh, const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *class_id, const char *recipe, const char *uri)5744 bool chipPendingImfileInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *class_id, const char *recipe, const char *uri) 5745 5745 { 5746 5746 psMetadata *md = psMetadataAlloc(); 5747 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) { 5748 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 5749 psFree(md); 5750 return false; 5751 } 5747 5752 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, exp_tag)) { 5748 5753 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 5750 5755 return false; 5751 5756 } 5752 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, chip_version)) { 5753 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 5754 psFree(md); 5755 return false; 5756 } 5757 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, guide_version)) { 5758 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 5757 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, guide_id)) { 5758 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 5759 5759 psFree(md); 5760 5760 return false; … … 5798 5798 bool chipPendingImfileInsertObject(psDB *dbh, chipPendingImfileRow *object) 5799 5799 { 5800 return chipPendingImfileInsert(dbh, object-> exp_tag, object->chip_version, object->guide_version, object->class_id, object->recipe, object->uri);5800 return chipPendingImfileInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->class_id, object->recipe, object->uri); 5801 5801 } 5802 5802 … … 5871 5871 { 5872 5872 psMetadata *md = psMetadataAlloc(); 5873 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, object->chip_id)) { 5874 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 5875 psFree(md); 5876 return false; 5877 } 5873 5878 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, object->exp_tag)) { 5874 5879 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 5876 5881 return false; 5877 5882 } 5878 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, object->chip_version)) { 5879 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 5880 psFree(md); 5881 return false; 5882 } 5883 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, object->guide_version)) { 5884 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 5883 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, object->guide_id)) { 5884 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 5885 5885 psFree(md); 5886 5886 return false; … … 5910 5910 5911 5911 bool status = false; 5912 psS64 chip_id = psMetadataLookupS64(&status, md, "chip_id"); 5913 if (!status) { 5914 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_id"); 5915 return false; 5916 } 5912 5917 char* exp_tag = psMetadataLookupPtr(&status, md, "exp_tag"); 5913 5918 if (!status) { … … 5915 5920 return false; 5916 5921 } 5917 psS32 chip_version = psMetadataLookupS32(&status, md, "chip_version"); 5918 if (!status) { 5919 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_version"); 5920 return false; 5921 } 5922 psS32 guide_version = psMetadataLookupS32(&status, md, "guide_version"); 5923 if (!status) { 5924 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_version"); 5922 psS64 guide_id = psMetadataLookupS64(&status, md, "guide_id"); 5923 if (!status) { 5924 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_id"); 5925 5925 return false; 5926 5926 } … … 5941 5941 } 5942 5942 5943 return chipPendingImfileRowAlloc( exp_tag, chip_version, guide_version, class_id, recipe, uri);5943 return chipPendingImfileRowAlloc(chip_id, exp_tag, guide_id, class_id, recipe, uri); 5944 5944 } 5945 5945 psArray *chipPendingImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 6053 6053 static void chipProcessedExpRowFree(chipProcessedExpRow *object); 6054 6054 6055 chipProcessedExpRow *chipProcessedExpRowAlloc( const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *label, const char *expgroup, const char *dvodb)6055 chipProcessedExpRow *chipProcessedExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *label, const char *expgroup, const char *dvodb) 6056 6056 { 6057 6057 chipProcessedExpRow *_object; … … 6060 6060 psMemSetDeallocator(_object, (psFreeFunc)chipProcessedExpRowFree); 6061 6061 6062 _object->chip_id = chip_id; 6062 6063 _object->exp_tag = psStringCopy(exp_tag); 6063 _object->chip_version = chip_version; 6064 _object->guide_version = guide_version; 6064 _object->guide_id = guide_id; 6065 6065 _object->label = psStringCopy(label); 6066 6066 _object->expgroup = psStringCopy(expgroup); … … 6081 6081 { 6082 6082 psMetadata *md = psMetadataAlloc(); 6083 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, "Primary Key", 0)) { 6084 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 6085 psFree(md); 6086 return false; 6087 } 6083 6088 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Primary Key", "64")) { 6084 6089 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 6086 6091 return false; 6087 6092 } 6088 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, "Primary Key", 0)) { 6089 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 6090 psFree(md); 6091 return false; 6092 } 6093 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, 0)) { 6094 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 6093 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, "Not NULL", 0)) { 6094 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 6095 6095 psFree(md); 6096 6096 return false; … … 6124 6124 } 6125 6125 6126 bool chipProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *label, const char *expgroup, const char *dvodb)6126 bool chipProcessedExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *label, const char *expgroup, const char *dvodb) 6127 6127 { 6128 6128 psMetadata *md = psMetadataAlloc(); 6129 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) { 6130 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 6131 psFree(md); 6132 return false; 6133 } 6129 6134 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, exp_tag)) { 6130 6135 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 6132 6137 return false; 6133 6138 } 6134 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, chip_version)) { 6135 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 6136 psFree(md); 6137 return false; 6138 } 6139 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, guide_version)) { 6140 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 6139 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, guide_id)) { 6140 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 6141 6141 psFree(md); 6142 6142 return false; … … 6180 6180 bool chipProcessedExpInsertObject(psDB *dbh, chipProcessedExpRow *object) 6181 6181 { 6182 return chipProcessedExpInsert(dbh, object-> exp_tag, object->chip_version, object->guide_version, object->label, object->expgroup, object->dvodb);6182 return chipProcessedExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->label, object->expgroup, object->dvodb); 6183 6183 } 6184 6184 … … 6253 6253 { 6254 6254 psMetadata *md = psMetadataAlloc(); 6255 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, object->chip_id)) { 6256 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 6257 psFree(md); 6258 return false; 6259 } 6255 6260 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, object->exp_tag)) { 6256 6261 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 6258 6263 return false; 6259 6264 } 6260 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, object->chip_version)) { 6261 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 6262 psFree(md); 6263 return false; 6264 } 6265 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, object->guide_version)) { 6266 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 6265 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, object->guide_id)) { 6266 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 6267 6267 psFree(md); 6268 6268 return false; … … 6292 6292 6293 6293 bool status = false; 6294 psS64 chip_id = psMetadataLookupS64(&status, md, "chip_id"); 6295 if (!status) { 6296 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_id"); 6297 return false; 6298 } 6294 6299 char* exp_tag = psMetadataLookupPtr(&status, md, "exp_tag"); 6295 6300 if (!status) { … … 6297 6302 return false; 6298 6303 } 6299 psS32 chip_version = psMetadataLookupS32(&status, md, "chip_version"); 6300 if (!status) { 6301 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_version"); 6302 return false; 6303 } 6304 psS32 guide_version = psMetadataLookupS32(&status, md, "guide_version"); 6305 if (!status) { 6306 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_version"); 6304 psS64 guide_id = psMetadataLookupS64(&status, md, "guide_id"); 6305 if (!status) { 6306 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_id"); 6307 6307 return false; 6308 6308 } … … 6323 6323 } 6324 6324 6325 return chipProcessedExpRowAlloc( exp_tag, chip_version, guide_version, label, expgroup, dvodb);6325 return chipProcessedExpRowAlloc(chip_id, exp_tag, guide_id, label, expgroup, dvodb); 6326 6326 } 6327 6327 psArray *chipProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 6709 6709 static void chipProcessedImfileRowFree(chipProcessedImfileRow *object); 6710 6710 6711 chipProcessedImfileRow *chipProcessedImfileRowAlloc( const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *class_id, const char *recipe, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)6711 chipProcessedImfileRow *chipProcessedImfileRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *class_id, const char *recipe, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 6712 6712 { 6713 6713 chipProcessedImfileRow *_object; … … 6716 6716 psMemSetDeallocator(_object, (psFreeFunc)chipProcessedImfileRowFree); 6717 6717 6718 _object->chip_id = chip_id; 6718 6719 _object->exp_tag = psStringCopy(exp_tag); 6719 _object->chip_version = chip_version; 6720 _object->guide_version = guide_version; 6720 _object->guide_id = guide_id; 6721 6721 _object->class_id = psStringCopy(class_id); 6722 6722 _object->recipe = psStringCopy(recipe); … … 6743 6743 { 6744 6744 psMetadata *md = psMetadataAlloc(); 6745 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, "Primary Key", 0)) { 6746 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 6747 psFree(md); 6748 return false; 6749 } 6745 6750 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Primary Key", "64")) { 6746 6751 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 6748 6753 return false; 6749 6754 } 6750 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, "Primary Key", 0)) { 6751 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 6752 psFree(md); 6753 return false; 6754 } 6755 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, 0)) { 6756 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 6755 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, "Not NULL", 0)) { 6756 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 6757 6757 psFree(md); 6758 6758 return false; … … 6811 6811 } 6812 6812 6813 bool chipProcessedImfileInsert(psDB * dbh, const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *class_id, const char *recipe, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)6813 bool chipProcessedImfileInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *class_id, const char *recipe, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 6814 6814 { 6815 6815 psMetadata *md = psMetadataAlloc(); 6816 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) { 6817 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 6818 psFree(md); 6819 return false; 6820 } 6816 6821 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, exp_tag)) { 6817 6822 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 6819 6824 return false; 6820 6825 } 6821 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, chip_version)) { 6822 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 6823 psFree(md); 6824 return false; 6825 } 6826 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, guide_version)) { 6827 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 6826 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, guide_id)) { 6827 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 6828 6828 psFree(md); 6829 6829 return false; … … 6892 6892 bool chipProcessedImfileInsertObject(psDB *dbh, chipProcessedImfileRow *object) 6893 6893 { 6894 return chipProcessedImfileInsert(dbh, object-> exp_tag, object->chip_version, object->guide_version, object->class_id, object->recipe, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->path_base, object->fault);6894 return chipProcessedImfileInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->class_id, object->recipe, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->path_base, object->fault); 6895 6895 } 6896 6896 … … 6965 6965 { 6966 6966 psMetadata *md = psMetadataAlloc(); 6967 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, object->chip_id)) { 6968 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 6969 psFree(md); 6970 return false; 6971 } 6967 6972 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, object->exp_tag)) { 6968 6973 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 6970 6975 return false; 6971 6976 } 6972 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, object->chip_version)) { 6973 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 6974 psFree(md); 6975 return false; 6976 } 6977 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_version", PS_DATA_S32, NULL, object->guide_version)) { 6978 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version"); 6977 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, object->guide_id)) { 6978 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 6979 6979 psFree(md); 6980 6980 return false; … … 7029 7029 7030 7030 bool status = false; 7031 psS64 chip_id = psMetadataLookupS64(&status, md, "chip_id"); 7032 if (!status) { 7033 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_id"); 7034 return false; 7035 } 7031 7036 char* exp_tag = psMetadataLookupPtr(&status, md, "exp_tag"); 7032 7037 if (!status) { … … 7034 7039 return false; 7035 7040 } 7036 psS32 chip_version = psMetadataLookupS32(&status, md, "chip_version"); 7037 if (!status) { 7038 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_version"); 7039 return false; 7040 } 7041 psS32 guide_version = psMetadataLookupS32(&status, md, "guide_version"); 7042 if (!status) { 7043 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_version"); 7041 psS64 guide_id = psMetadataLookupS64(&status, md, "guide_id"); 7042 if (!status) { 7043 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item guide_id"); 7044 7044 return false; 7045 7045 } … … 7085 7085 } 7086 7086 7087 return chipProcessedImfileRowAlloc( exp_tag, chip_version, guide_version, class_id, recipe, uri, bg, bg_stdev, bg_mean_stdev, path_base, fault);7087 return chipProcessedImfileRowAlloc(chip_id, exp_tag, guide_id, class_id, recipe, uri, bg, bg_stdev, bg_mean_stdev, path_base, fault); 7088 7088 } 7089 7089 psArray *chipProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 7197 7197 static void camPendingExpRowFree(camPendingExpRow *object); 7198 7198 7199 camPendingExpRow *camPendingExpRowAlloc( const char *exp_tag, psS32 cam_version, psS32 chip_version, const char *label, const char *expgroup, const char *dvodb)7199 camPendingExpRow *camPendingExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *label, const char *expgroup, const char *dvodb) 7200 7200 { 7201 7201 camPendingExpRow *_object; … … 7204 7204 psMemSetDeallocator(_object, (psFreeFunc)camPendingExpRowFree); 7205 7205 7206 _object->exp_tag = psStringCopy(exp_tag); 7207 _object->cam_version = cam_version; 7208 _object->chip_version = chip_version; 7206 _object->cam_id = cam_id; 7207 _object->chip_id = chip_id; 7209 7208 _object->label = psStringCopy(label); 7210 7209 _object->expgroup = psStringCopy(expgroup); … … 7216 7215 static void camPendingExpRowFree(camPendingExpRow *object) 7217 7216 { 7218 psFree(object->exp_tag);7219 7217 psFree(object->label); 7220 7218 psFree(object->expgroup); … … 7225 7223 { 7226 7224 psMetadata *md = psMetadataAlloc(); 7227 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Primary Key", "64")) { 7228 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 7229 psFree(md); 7230 return false; 7231 } 7232 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, "Primary Key", 0)) { 7233 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 7234 psFree(md); 7235 return false; 7236 } 7237 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, 0)) { 7238 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 7225 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, "Primary Key AUTO_INCREMENT", 0)) { 7226 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 7227 psFree(md); 7228 return false; 7229 } 7230 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, "Primary Key", 0)) { 7231 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 7239 7232 psFree(md); 7240 7233 return false; … … 7268 7261 } 7269 7262 7270 bool camPendingExpInsert(psDB * dbh, const char *exp_tag, psS32 cam_version, psS32 chip_version, const char *label, const char *expgroup, const char *dvodb)7263 bool camPendingExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *label, const char *expgroup, const char *dvodb) 7271 7264 { 7272 7265 psMetadata *md = psMetadataAlloc(); 7273 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, exp_tag)) { 7274 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 7275 psFree(md); 7276 return false; 7277 } 7278 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, NULL, cam_version)) { 7279 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 7280 psFree(md); 7281 return false; 7282 } 7283 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, chip_version)) { 7284 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 7266 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, cam_id)) { 7267 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 7268 psFree(md); 7269 return false; 7270 } 7271 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) { 7272 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 7285 7273 psFree(md); 7286 7274 return false; … … 7324 7312 bool camPendingExpInsertObject(psDB *dbh, camPendingExpRow *object) 7325 7313 { 7326 return camPendingExpInsert(dbh, object-> exp_tag, object->cam_version, object->chip_version, object->label, object->expgroup, object->dvodb);7314 return camPendingExpInsert(dbh, object->cam_id, object->chip_id, object->label, object->expgroup, object->dvodb); 7327 7315 } 7328 7316 … … 7397 7385 { 7398 7386 psMetadata *md = psMetadataAlloc(); 7399 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, object->exp_tag)) { 7400 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 7401 psFree(md); 7402 return false; 7403 } 7404 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, NULL, object->cam_version)) { 7405 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 7406 psFree(md); 7407 return false; 7408 } 7409 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, object->chip_version)) { 7410 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 7387 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, object->cam_id)) { 7388 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 7389 psFree(md); 7390 return false; 7391 } 7392 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, object->chip_id)) { 7393 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 7411 7394 psFree(md); 7412 7395 return false; … … 7436 7419 7437 7420 bool status = false; 7438 char* exp_tag = psMetadataLookupPtr(&status, md, "exp_tag"); 7439 if (!status) { 7440 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_tag"); 7441 return false; 7442 } 7443 psS32 cam_version = psMetadataLookupS32(&status, md, "cam_version"); 7444 if (!status) { 7445 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item cam_version"); 7446 return false; 7447 } 7448 psS32 chip_version = psMetadataLookupS32(&status, md, "chip_version"); 7449 if (!status) { 7450 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_version"); 7421 psS64 cam_id = psMetadataLookupS64(&status, md, "cam_id"); 7422 if (!status) { 7423 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item cam_id"); 7424 return false; 7425 } 7426 psS64 chip_id = psMetadataLookupS64(&status, md, "chip_id"); 7427 if (!status) { 7428 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_id"); 7451 7429 return false; 7452 7430 } … … 7467 7445 } 7468 7446 7469 return camPendingExpRowAlloc( exp_tag, cam_version, chip_version, label, expgroup, dvodb);7447 return camPendingExpRowAlloc(cam_id, chip_id, label, expgroup, dvodb); 7470 7448 } 7471 7449 psArray *camPendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 7579 7557 static void camProcessedExpRowFree(camProcessedExpRow *object); 7580 7558 7581 camProcessedExpRow *camProcessedExpRowAlloc( const char *exp_tag, psS32 cam_version, psS32 chip_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb)7559 camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb) 7582 7560 { 7583 7561 camProcessedExpRow *_object; … … 7586 7564 psMemSetDeallocator(_object, (psFreeFunc)camProcessedExpRowFree); 7587 7565 7588 _object->exp_tag = psStringCopy(exp_tag); 7589 _object->cam_version = cam_version; 7590 _object->chip_version = chip_version; 7566 _object->cam_id = cam_id; 7567 _object->chip_id = chip_id; 7591 7568 _object->label = psStringCopy(label); 7592 7569 _object->uri = psStringCopy(uri); … … 7610 7587 static void camProcessedExpRowFree(camProcessedExpRow *object) 7611 7588 { 7612 psFree(object->exp_tag);7613 7589 psFree(object->label); 7614 7590 psFree(object->uri); … … 7622 7598 { 7623 7599 psMetadata *md = psMetadataAlloc(); 7624 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Primary Key", "64")) { 7625 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 7626 psFree(md); 7627 return false; 7628 } 7629 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, "Primary Key", 0)) { 7630 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 7631 psFree(md); 7632 return false; 7633 } 7634 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, 0)) { 7635 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 7600 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, "Primary Key", 0)) { 7601 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 7602 psFree(md); 7603 return false; 7604 } 7605 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, "Primary Key", 0)) { 7606 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 7636 7607 psFree(md); 7637 7608 return false; … … 7725 7696 } 7726 7697 7727 bool camProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 cam_version, psS32 chip_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb)7698 bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb) 7728 7699 { 7729 7700 psMetadata *md = psMetadataAlloc(); 7730 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, exp_tag)) { 7731 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 7732 psFree(md); 7733 return false; 7734 } 7735 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, NULL, cam_version)) { 7736 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 7737 psFree(md); 7738 return false; 7739 } 7740 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, chip_version)) { 7741 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 7701 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, cam_id)) { 7702 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 7703 psFree(md); 7704 return false; 7705 } 7706 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) { 7707 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 7742 7708 psFree(md); 7743 7709 return false; … … 7841 7807 bool camProcessedExpInsertObject(psDB *dbh, camProcessedExpRow *object) 7842 7808 { 7843 return camProcessedExpInsert(dbh, object-> exp_tag, object->cam_version, object->chip_version, object->label, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->nastro, object->path_base, object->zp_mean, object->zp_stdev, object->fault, object->expgroup, object->dvodb);7809 return camProcessedExpInsert(dbh, object->cam_id, object->chip_id, object->label, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->nastro, object->path_base, object->zp_mean, object->zp_stdev, object->fault, object->expgroup, object->dvodb); 7844 7810 } 7845 7811 … … 7914 7880 { 7915 7881 psMetadata *md = psMetadataAlloc(); 7916 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, object->exp_tag)) { 7917 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 7918 psFree(md); 7919 return false; 7920 } 7921 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, NULL, object->cam_version)) { 7922 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 7923 psFree(md); 7924 return false; 7925 } 7926 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_version", PS_DATA_S32, NULL, object->chip_version)) { 7927 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_version"); 7882 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, object->cam_id)) { 7883 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 7884 psFree(md); 7885 return false; 7886 } 7887 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, object->chip_id)) { 7888 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 7928 7889 psFree(md); 7929 7890 return false; … … 8013 7974 8014 7975 bool status = false; 8015 char* exp_tag = psMetadataLookupPtr(&status, md, "exp_tag"); 8016 if (!status) { 8017 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_tag"); 8018 return false; 8019 } 8020 psS32 cam_version = psMetadataLookupS32(&status, md, "cam_version"); 8021 if (!status) { 8022 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item cam_version"); 8023 return false; 8024 } 8025 psS32 chip_version = psMetadataLookupS32(&status, md, "chip_version"); 8026 if (!status) { 8027 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_version"); 7976 psS64 cam_id = psMetadataLookupS64(&status, md, "cam_id"); 7977 if (!status) { 7978 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item cam_id"); 7979 return false; 7980 } 7981 psS64 chip_id = psMetadataLookupS64(&status, md, "chip_id"); 7982 if (!status) { 7983 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_id"); 8028 7984 return false; 8029 7985 } … … 8104 8060 } 8105 8061 8106 return camProcessedExpRowAlloc( exp_tag, cam_version, chip_version, label, uri, recipe, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, path_base, zp_mean, zp_stdev, fault, expgroup, dvodb);8062 return camProcessedExpRowAlloc(cam_id, chip_id, label, uri, recipe, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, path_base, zp_mean, zp_stdev, fault, expgroup, dvodb); 8107 8063 } 8108 8064 psArray *camProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 8490 8446 static void detRunRowFree(detRunRow *object); 8491 8447 8492 detRunRow *detRunRowAlloc(psS 32det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent)8448 detRunRow *detRunRowAlloc(psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent) 8493 8449 { 8494 8450 detRunRow *_object; … … 8549 8505 { 8550 8506 psMetadata *md = psMetadataAlloc(); 8551 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key AUTO_INCREMENT", 0)) {8507 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key AUTO_INCREMENT", 0)) { 8552 8508 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 8553 8509 psFree(md); … … 8697 8653 } 8698 8654 8699 bool detRunInsert(psDB * dbh, psS 32det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent)8655 bool detRunInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent) 8700 8656 { 8701 8657 psMetadata *md = psMetadataAlloc(); 8702 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {8658 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 8703 8659 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 8704 8660 psFree(md); … … 8931 8887 { 8932 8888 psMetadata *md = psMetadataAlloc(); 8933 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {8889 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 8934 8890 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 8935 8891 psFree(md); … … 9075 9031 9076 9032 bool status = false; 9077 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");9033 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 9078 9034 if (!status) { 9079 9035 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 9323 9279 static void detInputExpRowFree(detInputExpRow *object); 9324 9280 9325 detInputExpRow *detInputExpRowAlloc(psS 32det_id, psS32 iteration, const char *exp_tag, bool include)9281 detInputExpRow *detInputExpRowAlloc(psS64 det_id, psS32 iteration, const char *exp_tag, bool include) 9326 9282 { 9327 9283 detInputExpRow *_object; … … 9346 9302 { 9347 9303 psMetadata *md = psMetadataAlloc(); 9348 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {9304 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 9349 9305 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 9350 9306 psFree(md); … … 9379 9335 } 9380 9336 9381 bool detInputExpInsert(psDB * dbh, psS 32det_id, psS32 iteration, const char *exp_tag, bool include)9337 bool detInputExpInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *exp_tag, bool include) 9382 9338 { 9383 9339 psMetadata *md = psMetadataAlloc(); 9384 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {9340 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 9385 9341 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 9386 9342 psFree(md); … … 9498 9454 { 9499 9455 psMetadata *md = psMetadataAlloc(); 9500 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {9456 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 9501 9457 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 9502 9458 psFree(md); … … 9527 9483 9528 9484 bool status = false; 9529 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");9485 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 9530 9486 if (!status) { 9531 9487 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 9660 9616 static void detProcessedImfileRowFree(detProcessedImfileRow *object); 9661 9617 9662 detProcessedImfileRow *detProcessedImfileRowAlloc(psS 32det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)9618 detProcessedImfileRow *detProcessedImfileRowAlloc(psS64 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 9663 9619 { 9664 9620 detProcessedImfileRow *_object; … … 9693 9649 { 9694 9650 psMetadata *md = psMetadataAlloc(); 9695 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {9651 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 9696 9652 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 9697 9653 psFree(md); … … 9756 9712 } 9757 9713 9758 bool detProcessedImfileInsert(psDB * dbh, psS 32det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)9714 bool detProcessedImfileInsert(psDB * dbh, psS64 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 9759 9715 { 9760 9716 psMetadata *md = psMetadataAlloc(); 9761 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {9717 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 9762 9718 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 9763 9719 psFree(md); … … 9905 9861 { 9906 9862 psMetadata *md = psMetadataAlloc(); 9907 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {9863 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 9908 9864 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 9909 9865 psFree(md); … … 9964 9920 9965 9921 bool status = false; 9966 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");9922 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 9967 9923 if (!status) { 9968 9924 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 10127 10083 static void detProcessedExpRowFree(detProcessedExpRow *object); 10128 10084 10129 detProcessedExpRow *detProcessedExpRowAlloc(psS 32det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)10085 detProcessedExpRow *detProcessedExpRowAlloc(psS64 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 10130 10086 { 10131 10087 detProcessedExpRow *_object; … … 10156 10112 { 10157 10113 psMetadata *md = psMetadataAlloc(); 10158 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {10114 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 10159 10115 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 10160 10116 psFree(md); … … 10209 10165 } 10210 10166 10211 bool detProcessedExpInsert(psDB * dbh, psS 32det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)10167 bool detProcessedExpInsert(psDB * dbh, psS64 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 10212 10168 { 10213 10169 psMetadata *md = psMetadataAlloc(); 10214 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {10170 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 10215 10171 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 10216 10172 psFree(md); … … 10348 10304 { 10349 10305 psMetadata *md = psMetadataAlloc(); 10350 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {10306 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 10351 10307 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 10352 10308 psFree(md); … … 10397 10353 10398 10354 bool status = false; 10399 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");10355 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 10400 10356 if (!status) { 10401 10357 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 10550 10506 static void detStackedImfileRowFree(detStackedImfileRow *object); 10551 10507 10552 detStackedImfileRow *detStackedImfileRowAlloc(psS 32det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psS16 fault)10508 detStackedImfileRow *detStackedImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psS16 fault) 10553 10509 { 10554 10510 detStackedImfileRow *_object; … … 10580 10536 { 10581 10537 psMetadata *md = psMetadataAlloc(); 10582 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {10538 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 10583 10539 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 10584 10540 psFree(md); … … 10638 10594 } 10639 10595 10640 bool detStackedImfileInsert(psDB * dbh, psS 32det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psS16 fault)10596 bool detStackedImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psS16 fault) 10641 10597 { 10642 10598 psMetadata *md = psMetadataAlloc(); 10643 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {10599 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 10644 10600 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 10645 10601 psFree(md); … … 10782 10738 { 10783 10739 psMetadata *md = psMetadataAlloc(); 10784 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {10740 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 10785 10741 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 10786 10742 psFree(md); … … 10836 10792 10837 10793 bool status = false; 10838 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");10794 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 10839 10795 if (!status) { 10840 10796 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 10994 10950 static void detNormalizedStatImfileRowFree(detNormalizedStatImfileRow *object); 10995 10951 10996 detNormalizedStatImfileRow *detNormalizedStatImfileRowAlloc(psS 32det_id, psS32 iteration, const char *class_id, psF32 norm, psS16 fault)10952 detNormalizedStatImfileRow *detNormalizedStatImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, psF32 norm, psS16 fault) 10997 10953 { 10998 10954 detNormalizedStatImfileRow *_object; … … 11018 10974 { 11019 10975 psMetadata *md = psMetadataAlloc(); 11020 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {10976 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 11021 10977 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 11022 10978 psFree(md); … … 11056 11012 } 11057 11013 11058 bool detNormalizedStatImfileInsert(psDB * dbh, psS 32det_id, psS32 iteration, const char *class_id, psF32 norm, psS16 fault)11014 bool detNormalizedStatImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, psF32 norm, psS16 fault) 11059 11015 { 11060 11016 psMetadata *md = psMetadataAlloc(); 11061 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {11017 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 11062 11018 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 11063 11019 psFree(md); … … 11180 11136 { 11181 11137 psMetadata *md = psMetadataAlloc(); 11182 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {11138 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 11183 11139 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 11184 11140 psFree(md); … … 11214 11170 11215 11171 bool status = false; 11216 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");11172 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 11217 11173 if (!status) { 11218 11174 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 11352 11308 static void detNormalizedImfileRowFree(detNormalizedImfileRow *object); 11353 11309 11354 detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS 32det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)11310 detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 11355 11311 { 11356 11312 detNormalizedImfileRow *_object; … … 11382 11338 { 11383 11339 psMetadata *md = psMetadataAlloc(); 11384 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {11340 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 11385 11341 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 11386 11342 psFree(md); … … 11440 11396 } 11441 11397 11442 bool detNormalizedImfileInsert(psDB * dbh, psS 32det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)11398 bool detNormalizedImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 11443 11399 { 11444 11400 psMetadata *md = psMetadataAlloc(); 11445 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {11401 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 11446 11402 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 11447 11403 psFree(md); … … 11584 11540 { 11585 11541 psMetadata *md = psMetadataAlloc(); 11586 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {11542 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 11587 11543 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 11588 11544 psFree(md); … … 11638 11594 11639 11595 bool status = false; 11640 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");11596 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 11641 11597 if (!status) { 11642 11598 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 11796 11752 static void detNormalizedExpRowFree(detNormalizedExpRow *object); 11797 11753 11798 detNormalizedExpRow *detNormalizedExpRowAlloc(psS 32det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)11754 detNormalizedExpRow *detNormalizedExpRowAlloc(psS64 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 11799 11755 { 11800 11756 detNormalizedExpRow *_object; … … 11824 11780 { 11825 11781 psMetadata *md = psMetadataAlloc(); 11826 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {11782 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 11827 11783 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 11828 11784 psFree(md); … … 11877 11833 } 11878 11834 11879 bool detNormalizedExpInsert(psDB * dbh, psS 32det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)11835 bool detNormalizedExpInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 11880 11836 { 11881 11837 psMetadata *md = psMetadataAlloc(); 11882 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {11838 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 11883 11839 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 11884 11840 psFree(md); … … 12016 11972 { 12017 11973 psMetadata *md = psMetadataAlloc(); 12018 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {11974 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 12019 11975 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 12020 11976 psFree(md); … … 12065 12021 12066 12022 bool status = false; 12067 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");12023 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 12068 12024 if (!status) { 12069 12025 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 12218 12174 static void detResidImfileRowFree(detResidImfileRow *object); 12219 12175 12220 detResidImfileRow *detResidImfileRowAlloc(psS 32det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)12176 detResidImfileRow *detResidImfileRowAlloc(psS64 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 12221 12177 { 12222 12178 detResidImfileRow *_object; … … 12252 12208 { 12253 12209 psMetadata *md = psMetadataAlloc(); 12254 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {12210 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 12255 12211 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 12256 12212 psFree(md); … … 12320 12276 } 12321 12277 12322 bool detResidImfileInsert(psDB * dbh, psS 32det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault)12278 bool detResidImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 12323 12279 { 12324 12280 psMetadata *md = psMetadataAlloc(); 12325 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {12281 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 12326 12282 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 12327 12283 psFree(md); … … 12474 12430 { 12475 12431 psMetadata *md = psMetadataAlloc(); 12476 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {12432 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 12477 12433 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 12478 12434 psFree(md); … … 12538 12494 12539 12495 bool status = false; 12540 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");12496 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 12541 12497 if (!status) { 12542 12498 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 12706 12662 static void detResidExpRowFree(detResidExpRow *object); 12707 12663 12708 detResidExpRow *detResidExpRowAlloc(psS 32det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, bool accept, psS16 fault)12664 detResidExpRow *detResidExpRowAlloc(psS64 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, bool accept, psS16 fault) 12709 12665 { 12710 12666 detResidExpRow *_object; … … 12737 12693 { 12738 12694 psMetadata *md = psMetadataAlloc(); 12739 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {12695 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 12740 12696 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 12741 12697 psFree(md); … … 12800 12756 } 12801 12757 12802 bool detResidExpInsert(psDB * dbh, psS 32det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, bool accept, psS16 fault)12758 bool detResidExpInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, bool accept, psS16 fault) 12803 12759 { 12804 12760 psMetadata *md = psMetadataAlloc(); 12805 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {12761 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 12806 12762 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 12807 12763 psFree(md); … … 12949 12905 { 12950 12906 psMetadata *md = psMetadataAlloc(); 12951 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {12907 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 12952 12908 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 12953 12909 psFree(md); … … 13008 12964 13009 12965 bool status = false; 13010 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");12966 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 13011 12967 if (!status) { 13012 12968 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 13171 13127 static void detRunSummaryRowFree(detRunSummaryRow *object); 13172 13128 13173 detRunSummaryRow *detRunSummaryRowAlloc(psS 32det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault)13129 detRunSummaryRow *detRunSummaryRowAlloc(psS64 det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault) 13174 13130 { 13175 13131 detRunSummaryRow *_object; … … 13196 13152 { 13197 13153 psMetadata *md = psMetadataAlloc(); 13198 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, "Primary Key", 0)) {13154 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, "Primary Key", 0)) { 13199 13155 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 13200 13156 psFree(md); … … 13244 13200 } 13245 13201 13246 bool detRunSummaryInsert(psDB * dbh, psS 32det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault)13202 bool detRunSummaryInsert(psDB * dbh, psS64 det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault) 13247 13203 { 13248 13204 psMetadata *md = psMetadataAlloc(); 13249 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, det_id)) {13205 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, det_id)) { 13250 13206 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 13251 13207 psFree(md); … … 13378 13334 { 13379 13335 psMetadata *md = psMetadataAlloc(); 13380 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S 32, NULL, object->det_id)) {13336 if (!psMetadataAdd(md, PS_LIST_TAIL, "det_id", PS_DATA_S64, NULL, object->det_id)) { 13381 13337 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 13382 13338 psFree(md); … … 13422 13378 13423 13379 bool status = false; 13424 psS 32 det_id = psMetadataLookupS32(&status, md, "det_id");13380 psS64 det_id = psMetadataLookupS64(&status, md, "det_id"); 13425 13381 if (!status) { 13426 13382 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item det_id"); … … 13570 13526 static void warpRunRowFree(warpRunRow *object); 13571 13527 13572 warpRunRow *warpRunRowAlloc(psS 32warp_id, const char *mode, const char *state, const char *workdir, const char *dvodb, psTime* registered)13528 warpRunRow *warpRunRowAlloc(psS64 warp_id, const char *mode, const char *state, const char *workdir, const char *dvodb, psTime* registered) 13573 13529 { 13574 13530 warpRunRow *_object; … … 13599 13555 { 13600 13556 psMetadata *md = psMetadataAlloc(); 13601 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, "Primary Key AUTO_INCREMENT", 0)) {13557 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, "Primary Key AUTO_INCREMENT", 0)) { 13602 13558 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 13603 13559 psFree(md); … … 13642 13598 } 13643 13599 13644 bool warpRunInsert(psDB * dbh, psS 32warp_id, const char *mode, const char *state, const char *workdir, const char *dvodb, psTime* registered)13600 bool warpRunInsert(psDB * dbh, psS64 warp_id, const char *mode, const char *state, const char *workdir, const char *dvodb, psTime* registered) 13645 13601 { 13646 13602 psMetadata *md = psMetadataAlloc(); 13647 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, warp_id)) {13603 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, warp_id)) { 13648 13604 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 13649 13605 psFree(md); … … 13771 13727 { 13772 13728 psMetadata *md = psMetadataAlloc(); 13773 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, object->warp_id)) {13729 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, object->warp_id)) { 13774 13730 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 13775 13731 psFree(md); … … 13810 13766 13811 13767 bool status = false; 13812 psS 32 warp_id = psMetadataLookupS32(&status, md, "warp_id");13768 psS64 warp_id = psMetadataLookupS64(&status, md, "warp_id"); 13813 13769 if (!status) { 13814 13770 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item warp_id"); … … 13953 13909 static void warpInputExpRowFree(warpInputExpRow *object); 13954 13910 13955 warpInputExpRow *warpInputExpRowAlloc(psS 32 warp_id, const char *exp_tag, psS32 cam_version, bool magiced)13911 warpInputExpRow *warpInputExpRowAlloc(psS64 warp_id, psS64 cam_id, bool magiced) 13956 13912 { 13957 13913 warpInputExpRow *_object; … … 13961 13917 13962 13918 _object->warp_id = warp_id; 13963 _object->exp_tag = psStringCopy(exp_tag); 13964 _object->cam_version = cam_version; 13919 _object->cam_id = cam_id; 13965 13920 _object->magiced = magiced; 13966 13921 … … 13970 13925 static void warpInputExpRowFree(warpInputExpRow *object) 13971 13926 { 13972 psFree(object->exp_tag);13973 13927 } 13974 13928 … … 13976 13930 { 13977 13931 psMetadata *md = psMetadataAlloc(); 13978 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, "Primary Key", 0)) {13932 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, "Primary Key", 0)) { 13979 13933 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 13980 13934 psFree(md); 13981 13935 return false; 13982 13936 } 13983 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Primary Key", "64")) { 13984 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 13985 psFree(md); 13986 return false; 13987 } 13988 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, "Key", 0)) { 13989 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 13937 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, "Primary Key", 0)) { 13938 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 13990 13939 psFree(md); 13991 13940 return false; … … 14009 13958 } 14010 13959 14011 bool warpInputExpInsert(psDB * dbh, psS 32 warp_id, const char *exp_tag, psS32 cam_version, bool magiced)13960 bool warpInputExpInsert(psDB * dbh, psS64 warp_id, psS64 cam_id, bool magiced) 14012 13961 { 14013 13962 psMetadata *md = psMetadataAlloc(); 14014 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, warp_id)) {13963 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, warp_id)) { 14015 13964 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 14016 13965 psFree(md); 14017 13966 return false; 14018 13967 } 14019 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, exp_tag)) { 14020 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 14021 psFree(md); 14022 return false; 14023 } 14024 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, NULL, cam_version)) { 14025 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 13968 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, cam_id)) { 13969 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 14026 13970 psFree(md); 14027 13971 return false; … … 14055 13999 bool warpInputExpInsertObject(psDB *dbh, warpInputExpRow *object) 14056 14000 { 14057 return warpInputExpInsert(dbh, object->warp_id, object-> exp_tag, object->cam_version, object->magiced);14001 return warpInputExpInsert(dbh, object->warp_id, object->cam_id, object->magiced); 14058 14002 } 14059 14003 … … 14128 14072 { 14129 14073 psMetadata *md = psMetadataAlloc(); 14130 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, object->warp_id)) {14074 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, object->warp_id)) { 14131 14075 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 14132 14076 psFree(md); 14133 14077 return false; 14134 14078 } 14135 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, object->exp_tag)) { 14136 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 14137 psFree(md); 14138 return false; 14139 } 14140 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, NULL, object->cam_version)) { 14141 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 14079 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, object->cam_id)) { 14080 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 14142 14081 psFree(md); 14143 14082 return false; … … 14157 14096 14158 14097 bool status = false; 14159 psS 32 warp_id = psMetadataLookupS32(&status, md, "warp_id");14098 psS64 warp_id = psMetadataLookupS64(&status, md, "warp_id"); 14160 14099 if (!status) { 14161 14100 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item warp_id"); 14162 14101 return false; 14163 14102 } 14164 char* exp_tag = psMetadataLookupPtr(&status, md, "exp_tag"); 14165 if (!status) { 14166 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_tag"); 14167 return false; 14168 } 14169 psS32 cam_version = psMetadataLookupS32(&status, md, "cam_version"); 14170 if (!status) { 14171 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item cam_version"); 14103 psS64 cam_id = psMetadataLookupS64(&status, md, "cam_id"); 14104 if (!status) { 14105 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item cam_id"); 14172 14106 return false; 14173 14107 } … … 14178 14112 } 14179 14113 14180 return warpInputExpRowAlloc(warp_id, exp_tag, cam_version, magiced);14114 return warpInputExpRowAlloc(warp_id, cam_id, magiced); 14181 14115 } 14182 14116 psArray *warpInputExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 14290 14224 static void warpSkyCellMapRowFree(warpSkyCellMapRow *object); 14291 14225 14292 warpSkyCellMapRow *warpSkyCellMapRowAlloc(psS 32 warp_id, const char *skycell_id, const char *tess_id, const char *exp_tag, psS32 cam_version, const char *class_id, psS16 fault)14226 warpSkyCellMapRow *warpSkyCellMapRowAlloc(psS64 warp_id, const char *skycell_id, const char *tess_id, psS64 cam_id, const char *class_id, psS16 fault) 14293 14227 { 14294 14228 warpSkyCellMapRow *_object; … … 14300 14234 _object->skycell_id = psStringCopy(skycell_id); 14301 14235 _object->tess_id = psStringCopy(tess_id); 14302 _object->exp_tag = psStringCopy(exp_tag); 14303 _object->cam_version = cam_version; 14236 _object->cam_id = cam_id; 14304 14237 _object->class_id = psStringCopy(class_id); 14305 14238 _object->fault = fault; … … 14312 14245 psFree(object->skycell_id); 14313 14246 psFree(object->tess_id); 14314 psFree(object->exp_tag);14315 14247 psFree(object->class_id); 14316 14248 } … … 14319 14251 { 14320 14252 psMetadata *md = psMetadataAlloc(); 14321 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, "Primary Key", 0)) {14253 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, "Primary Key", 0)) { 14322 14254 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 14323 14255 psFree(md); … … 14334 14266 return false; 14335 14267 } 14336 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, "Primary Key", "64")) { 14337 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 14338 psFree(md); 14339 return false; 14340 } 14341 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, "Primary Key", 0)) { 14342 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 14268 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, "Primary Key", 0)) { 14269 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 14343 14270 psFree(md); 14344 14271 return false; … … 14367 14294 } 14368 14295 14369 bool warpSkyCellMapInsert(psDB * dbh, psS 32 warp_id, const char *skycell_id, const char *tess_id, const char *exp_tag, psS32 cam_version, const char *class_id, psS16 fault)14296 bool warpSkyCellMapInsert(psDB * dbh, psS64 warp_id, const char *skycell_id, const char *tess_id, psS64 cam_id, const char *class_id, psS16 fault) 14370 14297 { 14371 14298 psMetadata *md = psMetadataAlloc(); 14372 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, warp_id)) {14299 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, warp_id)) { 14373 14300 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 14374 14301 psFree(md); … … 14385 14312 return false; 14386 14313 } 14387 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, exp_tag)) { 14388 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 14389 psFree(md); 14390 return false; 14391 } 14392 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, NULL, cam_version)) { 14393 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 14314 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, cam_id)) { 14315 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 14394 14316 psFree(md); 14395 14317 return false; … … 14428 14350 bool warpSkyCellMapInsertObject(psDB *dbh, warpSkyCellMapRow *object) 14429 14351 { 14430 return warpSkyCellMapInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object-> exp_tag, object->cam_version, object->class_id, object->fault);14352 return warpSkyCellMapInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object->cam_id, object->class_id, object->fault); 14431 14353 } 14432 14354 … … 14501 14423 { 14502 14424 psMetadata *md = psMetadataAlloc(); 14503 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, object->warp_id)) {14425 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, object->warp_id)) { 14504 14426 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 14505 14427 psFree(md); … … 14516 14438 return false; 14517 14439 } 14518 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_tag", PS_DATA_STRING, NULL, object->exp_tag)) { 14519 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 14520 psFree(md); 14521 return false; 14522 } 14523 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_version", PS_DATA_S32, NULL, object->cam_version)) { 14524 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_version"); 14440 if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, object->cam_id)) { 14441 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 14525 14442 psFree(md); 14526 14443 return false; … … 14545 14462 14546 14463 bool status = false; 14547 psS 32 warp_id = psMetadataLookupS32(&status, md, "warp_id");14464 psS64 warp_id = psMetadataLookupS64(&status, md, "warp_id"); 14548 14465 if (!status) { 14549 14466 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item warp_id"); … … 14560 14477 return false; 14561 14478 } 14562 char* exp_tag = psMetadataLookupPtr(&status, md, "exp_tag"); 14563 if (!status) { 14564 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_tag"); 14565 return false; 14566 } 14567 psS32 cam_version = psMetadataLookupS32(&status, md, "cam_version"); 14568 if (!status) { 14569 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item cam_version"); 14479 psS64 cam_id = psMetadataLookupS64(&status, md, "cam_id"); 14480 if (!status) { 14481 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item cam_id"); 14570 14482 return false; 14571 14483 } … … 14581 14493 } 14582 14494 14583 return warpSkyCellMapRowAlloc(warp_id, skycell_id, tess_id, exp_tag, cam_version, class_id, fault);14495 return warpSkyCellMapRowAlloc(warp_id, skycell_id, tess_id, cam_id, class_id, fault); 14584 14496 } 14585 14497 psArray *warpSkyCellMapSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 14693 14605 static void warpSkyfileRowFree(warpSkyfileRow *object); 14694 14606 14695 warpSkyfileRow *warpSkyfileRowAlloc(psS 32warp_id, const char *skycell_id, const char *tess_id, const char *uri, psF64 bg, psF64 bg_stdev)14607 warpSkyfileRow *warpSkyfileRowAlloc(psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, psF64 bg, psF64 bg_stdev) 14696 14608 { 14697 14609 warpSkyfileRow *_object; … … 14720 14632 { 14721 14633 psMetadata *md = psMetadataAlloc(); 14722 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, "Primary Key", 0)) {14634 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, "Primary Key", 0)) { 14723 14635 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 14724 14636 psFree(md); … … 14763 14675 } 14764 14676 14765 bool warpSkyfileInsert(psDB * dbh, psS 32warp_id, const char *skycell_id, const char *tess_id, const char *uri, psF64 bg, psF64 bg_stdev)14677 bool warpSkyfileInsert(psDB * dbh, psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, psF64 bg, psF64 bg_stdev) 14766 14678 { 14767 14679 psMetadata *md = psMetadataAlloc(); 14768 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, warp_id)) {14680 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, warp_id)) { 14769 14681 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 14770 14682 psFree(md); … … 14892 14804 { 14893 14805 psMetadata *md = psMetadataAlloc(); 14894 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, object->warp_id)) {14806 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, object->warp_id)) { 14895 14807 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 14896 14808 psFree(md); … … 14931 14843 14932 14844 bool status = false; 14933 psS 32 warp_id = psMetadataLookupS32(&status, md, "warp_id");14845 psS64 warp_id = psMetadataLookupS64(&status, md, "warp_id"); 14934 14846 if (!status) { 14935 14847 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item warp_id"); … … 15074 14986 static void diffRunRowFree(diffRunRow *object); 15075 14987 15076 diffRunRow *diffRunRowAlloc(psS 32diff_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)14988 diffRunRow *diffRunRowAlloc(psS64 diff_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id) 15077 14989 { 15078 14990 diffRunRow *_object; … … 15105 15017 { 15106 15018 psMetadata *md = psMetadataAlloc(); 15107 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S 32, "Primary Key AUTO_INCREMENT", 0)) {15019 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, "Primary Key AUTO_INCREMENT", 0)) { 15108 15020 psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id"); 15109 15021 psFree(md); … … 15153 15065 } 15154 15066 15155 bool diffRunInsert(psDB * dbh, psS 32diff_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)15067 bool diffRunInsert(psDB * dbh, psS64 diff_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id) 15156 15068 { 15157 15069 psMetadata *md = psMetadataAlloc(); 15158 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S 32, NULL, diff_id)) {15070 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, NULL, diff_id)) { 15159 15071 psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id"); 15160 15072 psFree(md); … … 15287 15199 { 15288 15200 psMetadata *md = psMetadataAlloc(); 15289 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S 32, NULL, object->diff_id)) {15201 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, NULL, object->diff_id)) { 15290 15202 psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id"); 15291 15203 psFree(md); … … 15331 15243 15332 15244 bool status = false; 15333 psS 32 diff_id = psMetadataLookupS32(&status, md, "diff_id");15245 psS64 diff_id = psMetadataLookupS64(&status, md, "diff_id"); 15334 15246 if (!status) { 15335 15247 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item diff_id"); … … 15479 15391 static void diffInputSkyfileRowFree(diffInputSkyfileRow *object); 15480 15392 15481 diffInputSkyfileRow *diffInputSkyfileRowAlloc(psS 32 diff_id, psS32warp_id, const char *skycell_id, const char *tess_id, const char *kind, bool template)15393 diffInputSkyfileRow *diffInputSkyfileRowAlloc(psS64 diff_id, psS64 warp_id, const char *skycell_id, const char *tess_id, const char *kind, bool template) 15482 15394 { 15483 15395 diffInputSkyfileRow *_object; … … 15506 15418 { 15507 15419 psMetadata *md = psMetadataAlloc(); 15508 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S 32, "Primary Key", 0)) {15420 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, "Primary Key", 0)) { 15509 15421 psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id"); 15510 15422 psFree(md); 15511 15423 return false; 15512 15424 } 15513 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, "Primary Key", 0)) {15425 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, "Primary Key", 0)) { 15514 15426 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 15515 15427 psFree(md); … … 15549 15461 } 15550 15462 15551 bool diffInputSkyfileInsert(psDB * dbh, psS 32 diff_id, psS32warp_id, const char *skycell_id, const char *tess_id, const char *kind, bool template)15463 bool diffInputSkyfileInsert(psDB * dbh, psS64 diff_id, psS64 warp_id, const char *skycell_id, const char *tess_id, const char *kind, bool template) 15552 15464 { 15553 15465 psMetadata *md = psMetadataAlloc(); 15554 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S 32, NULL, diff_id)) {15466 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, NULL, diff_id)) { 15555 15467 psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id"); 15556 15468 psFree(md); 15557 15469 return false; 15558 15470 } 15559 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, warp_id)) {15471 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, warp_id)) { 15560 15472 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 15561 15473 psFree(md); … … 15678 15590 { 15679 15591 psMetadata *md = psMetadataAlloc(); 15680 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S 32, NULL, object->diff_id)) {15592 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, NULL, object->diff_id)) { 15681 15593 psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id"); 15682 15594 psFree(md); 15683 15595 return false; 15684 15596 } 15685 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, object->warp_id)) {15597 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, object->warp_id)) { 15686 15598 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 15687 15599 psFree(md); … … 15717 15629 15718 15630 bool status = false; 15719 psS 32 diff_id = psMetadataLookupS32(&status, md, "diff_id");15631 psS64 diff_id = psMetadataLookupS64(&status, md, "diff_id"); 15720 15632 if (!status) { 15721 15633 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item diff_id"); 15722 15634 return false; 15723 15635 } 15724 psS 32 warp_id = psMetadataLookupS32(&status, md, "warp_id");15636 psS64 warp_id = psMetadataLookupS64(&status, md, "warp_id"); 15725 15637 if (!status) { 15726 15638 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item warp_id"); … … 15860 15772 static void diffSkyfileRowFree(diffSkyfileRow *object); 15861 15773 15862 diffSkyfileRow *diffSkyfileRowAlloc(psS 32diff_id, const char *uri, psF64 bg, psF64 bg_stdev)15774 diffSkyfileRow *diffSkyfileRowAlloc(psS64 diff_id, const char *uri, psF64 bg, psF64 bg_stdev) 15863 15775 { 15864 15776 diffSkyfileRow *_object; … … 15883 15795 { 15884 15796 psMetadata *md = psMetadataAlloc(); 15885 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S 32, "Primary Key", 0)) {15797 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, "Primary Key", 0)) { 15886 15798 psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id"); 15887 15799 psFree(md); … … 15916 15828 } 15917 15829 15918 bool diffSkyfileInsert(psDB * dbh, psS 32diff_id, const char *uri, psF64 bg, psF64 bg_stdev)15830 bool diffSkyfileInsert(psDB * dbh, psS64 diff_id, const char *uri, psF64 bg, psF64 bg_stdev) 15919 15831 { 15920 15832 psMetadata *md = psMetadataAlloc(); 15921 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S 32, NULL, diff_id)) {15833 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, NULL, diff_id)) { 15922 15834 psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id"); 15923 15835 psFree(md); … … 16035 15947 { 16036 15948 psMetadata *md = psMetadataAlloc(); 16037 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S 32, NULL, object->diff_id)) {15949 if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, NULL, object->diff_id)) { 16038 15950 psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id"); 16039 15951 psFree(md); … … 16064 15976 16065 15977 bool status = false; 16066 psS 32 diff_id = psMetadataLookupS32(&status, md, "diff_id");15978 psS64 diff_id = psMetadataLookupS64(&status, md, "diff_id"); 16067 15979 if (!status) { 16068 15980 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item diff_id"); … … 16197 16109 static void stackRunRowFree(stackRunRow *object); 16198 16110 16199 stackRunRow *stackRunRowAlloc(psS 32stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)16111 stackRunRow *stackRunRowAlloc(psS64 stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id) 16200 16112 { 16201 16113 stackRunRow *_object; … … 16228 16140 { 16229 16141 psMetadata *md = psMetadataAlloc(); 16230 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S 32, "Primary Key AUTO_INCREMENT", 0)) {16142 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S64, "Primary Key AUTO_INCREMENT", 0)) { 16231 16143 psError(PS_ERR_UNKNOWN, false, "failed to add item stack_id"); 16232 16144 psFree(md); … … 16276 16188 } 16277 16189 16278 bool stackRunInsert(psDB * dbh, psS 32stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)16190 bool stackRunInsert(psDB * dbh, psS64 stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id) 16279 16191 { 16280 16192 psMetadata *md = psMetadataAlloc(); 16281 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S 32, NULL, stack_id)) {16193 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S64, NULL, stack_id)) { 16282 16194 psError(PS_ERR_UNKNOWN, false, "failed to add item stack_id"); 16283 16195 psFree(md); … … 16410 16322 { 16411 16323 psMetadata *md = psMetadataAlloc(); 16412 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S 32, NULL, object->stack_id)) {16324 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S64, NULL, object->stack_id)) { 16413 16325 psError(PS_ERR_UNKNOWN, false, "failed to add item stack_id"); 16414 16326 psFree(md); … … 16454 16366 16455 16367 bool status = false; 16456 psS 32 stack_id = psMetadataLookupS32(&status, md, "stack_id");16368 psS64 stack_id = psMetadataLookupS64(&status, md, "stack_id"); 16457 16369 if (!status) { 16458 16370 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stack_id"); … … 16602 16514 static void stackInputSkyfileRowFree(stackInputSkyfileRow *object); 16603 16515 16604 stackInputSkyfileRow *stackInputSkyfileRowAlloc(psS 32 stack_id, psS32warp_id)16516 stackInputSkyfileRow *stackInputSkyfileRowAlloc(psS64 stack_id, psS64 warp_id) 16605 16517 { 16606 16518 stackInputSkyfileRow *_object; … … 16622 16534 { 16623 16535 psMetadata *md = psMetadataAlloc(); 16624 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S 32, "Primary Key", 0)) {16536 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S64, "Primary Key", 0)) { 16625 16537 psError(PS_ERR_UNKNOWN, false, "failed to add item stack_id"); 16626 16538 psFree(md); 16627 16539 return false; 16628 16540 } 16629 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, "Primary Key", 0)) {16541 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, "Primary Key", 0)) { 16630 16542 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 16631 16543 psFree(md); … … 16645 16557 } 16646 16558 16647 bool stackInputSkyfileInsert(psDB * dbh, psS 32 stack_id, psS32warp_id)16559 bool stackInputSkyfileInsert(psDB * dbh, psS64 stack_id, psS64 warp_id) 16648 16560 { 16649 16561 psMetadata *md = psMetadataAlloc(); 16650 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S 32, NULL, stack_id)) {16562 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S64, NULL, stack_id)) { 16651 16563 psError(PS_ERR_UNKNOWN, false, "failed to add item stack_id"); 16652 16564 psFree(md); 16653 16565 return false; 16654 16566 } 16655 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, warp_id)) {16567 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, warp_id)) { 16656 16568 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 16657 16569 psFree(md); … … 16754 16666 { 16755 16667 psMetadata *md = psMetadataAlloc(); 16756 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S 32, NULL, object->stack_id)) {16668 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S64, NULL, object->stack_id)) { 16757 16669 psError(PS_ERR_UNKNOWN, false, "failed to add item stack_id"); 16758 16670 psFree(md); 16759 16671 return false; 16760 16672 } 16761 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S 32, NULL, object->warp_id)) {16673 if (!psMetadataAdd(md, PS_LIST_TAIL, "warp_id", PS_DATA_S64, NULL, object->warp_id)) { 16762 16674 psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id"); 16763 16675 psFree(md); … … 16773 16685 16774 16686 bool status = false; 16775 psS 32 stack_id = psMetadataLookupS32(&status, md, "stack_id");16687 psS64 stack_id = psMetadataLookupS64(&status, md, "stack_id"); 16776 16688 if (!status) { 16777 16689 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stack_id"); 16778 16690 return false; 16779 16691 } 16780 psS 32 warp_id = psMetadataLookupS32(&status, md, "warp_id");16692 psS64 warp_id = psMetadataLookupS64(&status, md, "warp_id"); 16781 16693 if (!status) { 16782 16694 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item warp_id"); … … 16896 16808 static void stackSumSkyfileRowFree(stackSumSkyfileRow *object); 16897 16809 16898 stackSumSkyfileRow *stackSumSkyfileRowAlloc(psS 32stack_id, const char *uri, psF64 bg, psF64 bg_stdev)16810 stackSumSkyfileRow *stackSumSkyfileRowAlloc(psS64 stack_id, const char *uri, psF64 bg, psF64 bg_stdev) 16899 16811 { 16900 16812 stackSumSkyfileRow *_object; … … 16919 16831 { 16920 16832 psMetadata *md = psMetadataAlloc(); 16921 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S 32, "Primary Key", 0)) {16833 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S64, "Primary Key", 0)) { 16922 16834 psError(PS_ERR_UNKNOWN, false, "failed to add item stack_id"); 16923 16835 psFree(md); … … 16952 16864 } 16953 16865 16954 bool stackSumSkyfileInsert(psDB * dbh, psS 32stack_id, const char *uri, psF64 bg, psF64 bg_stdev)16866 bool stackSumSkyfileInsert(psDB * dbh, psS64 stack_id, const char *uri, psF64 bg, psF64 bg_stdev) 16955 16867 { 16956 16868 psMetadata *md = psMetadataAlloc(); 16957 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S 32, NULL, stack_id)) {16869 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S64, NULL, stack_id)) { 16958 16870 psError(PS_ERR_UNKNOWN, false, "failed to add item stack_id"); 16959 16871 psFree(md); … … 17071 16983 { 17072 16984 psMetadata *md = psMetadataAlloc(); 17073 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S 32, NULL, object->stack_id)) {16985 if (!psMetadataAdd(md, PS_LIST_TAIL, "stack_id", PS_DATA_S64, NULL, object->stack_id)) { 17074 16986 psError(PS_ERR_UNKNOWN, false, "failed to add item stack_id"); 17075 16987 psFree(md); … … 17100 17012 17101 17013 bool status = false; 17102 psS 32 stack_id = psMetadataLookupS32(&status, md, "stack_id");17014 psS64 stack_id = psMetadataLookupS64(&status, md, "stack_id"); 17103 17015 if (!status) { 17104 17016 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stack_id");
Note:
See TracChangeset
for help on using the changeset viewer.
