Changeset 15530 for trunk/ippdb/src/ippdb.c
- Timestamp:
- Nov 8, 2007, 4:56:46 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.c
r15421 r15530 9592 9592 static void warpSkyfileRowFree(warpSkyfileRow *object); 9593 9593 9594 warpSkyfileRow *warpSkyfileRowAlloc(psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF64 good_frac, psS16 fault)9594 warpSkyfileRow *warpSkyfileRowAlloc(psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF64 good_frac, bool ignore, psS16 fault) 9595 9595 { 9596 9596 warpSkyfileRow *_object; … … 9607 9607 _object->bg_stdev = bg_stdev; 9608 9608 _object->good_frac = good_frac; 9609 _object->ignore = ignore; 9609 9610 _object->fault = fault; 9610 9611 … … 9663 9664 return false; 9664 9665 } 9666 if (!psMetadataAdd(md, PS_LIST_TAIL, "ignore", PS_DATA_BOOL, "Key", 0)) { 9667 psError(PS_ERR_UNKNOWN, false, "failed to add item ignore"); 9668 psFree(md); 9669 return false; 9670 } 9665 9671 if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key", 0)) { 9666 9672 psError(PS_ERR_UNKNOWN, false, "failed to add item fault"); … … 9681 9687 } 9682 9688 9683 bool warpSkyfileInsert(psDB * dbh, psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF64 good_frac, psS16 fault)9689 bool warpSkyfileInsert(psDB * dbh, psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF64 good_frac, bool ignore, psS16 fault) 9684 9690 { 9685 9691 psMetadata *md = psMetadataAlloc(); … … 9721 9727 if (!psMetadataAdd(md, PS_LIST_TAIL, "good_frac", PS_DATA_F64, NULL, good_frac)) { 9722 9728 psError(PS_ERR_UNKNOWN, false, "failed to add item good_frac"); 9729 psFree(md); 9730 return false; 9731 } 9732 if (!psMetadataAdd(md, PS_LIST_TAIL, "ignore", PS_DATA_BOOL, NULL, ignore)) { 9733 psError(PS_ERR_UNKNOWN, false, "failed to add item ignore"); 9723 9734 psFree(md); 9724 9735 return false; … … 9752 9763 bool warpSkyfileInsertObject(psDB *dbh, warpSkyfileRow *object) 9753 9764 { 9754 return warpSkyfileInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object->uri, object->path_base, object->bg, object->bg_stdev, object->good_frac, object-> fault);9765 return warpSkyfileInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object->uri, object->path_base, object->bg, object->bg_stdev, object->good_frac, object->ignore, object->fault); 9755 9766 } 9756 9767 … … 9865 9876 return false; 9866 9877 } 9878 if (!psMetadataAdd(md, PS_LIST_TAIL, "ignore", PS_DATA_BOOL, NULL, object->ignore)) { 9879 psError(PS_ERR_UNKNOWN, false, "failed to add item ignore"); 9880 psFree(md); 9881 return false; 9882 } 9867 9883 if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) { 9868 9884 psError(PS_ERR_UNKNOWN, false, "failed to add item fault"); … … 9919 9935 return false; 9920 9936 } 9937 bool ignore = psMetadataLookupBool(&status, md, "ignore"); 9938 if (!status) { 9939 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ignore"); 9940 return false; 9941 } 9921 9942 psS16 fault = psMetadataLookupS16(&status, md, "fault"); 9922 9943 if (!status) { … … 9925 9946 } 9926 9947 9927 return warpSkyfileRowAlloc(warp_id, skycell_id, tess_id, uri, path_base, bg, bg_stdev, good_frac, fault);9948 return warpSkyfileRowAlloc(warp_id, skycell_id, tess_id, uri, path_base, bg, bg_stdev, good_frac, ignore, fault); 9928 9949 } 9929 9950 psArray *warpSkyfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
Note:
See TracChangeset
for help on using the changeset viewer.
