IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 3, 2006, 6:28:25 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.12

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/jhoblitt/ippdb/src/ippdb.c

    r8103 r8122  
    206206}
    207207
     208long long weatherDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     209{
     210    long long       deleted = 0;
     211
     212    long long count = psDBDeleteRows(dbh, WEATHER_TABLE_NAME, where, limit);
     213    if (count < 0) {
     214        psError(PS_ERR_UNKNOWN, true, "failed to delete row from weather");
     215        return count;
     216
     217        deleted += count;
     218    }
     219
     220    return deleted;
     221}
    208222bool weatherPop(psDB *dbh, psF32 *temp01, psF32 *humi01, psF32 *temp02, psF32 *humi02, psF32 *temp03, psF32 *humi03, psF32 *pressure)
    209223{
     
    691705}
    692706
     707long long skyp_transparencyDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     708{
     709    long long       deleted = 0;
     710
     711    long long count = psDBDeleteRows(dbh, SKYP_TRANSPARENCY_TABLE_NAME, where, limit);
     712    if (count < 0) {
     713        psError(PS_ERR_UNKNOWN, true, "failed to delete row from skyp_transparency");
     714        return count;
     715
     716        deleted += count;
     717    }
     718
     719    return deleted;
     720}
    693721bool skyp_transparencyPop(psDB *dbh, char **filter, psF64 *trans, psS32 *nstars, psF64 *ra, psF64 *decl, psF32 *exptime, psF64 *sky_bright)
    694722{
     
    11981226}
    11991227
     1228long long skyp_absorptionDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     1229{
     1230    long long       deleted = 0;
     1231
     1232    long long count = psDBDeleteRows(dbh, SKYP_ABSORPTION_TABLE_NAME, where, limit);
     1233    if (count < 0) {
     1234        psError(PS_ERR_UNKNOWN, true, "failed to delete row from skyp_absorption");
     1235        return count;
     1236
     1237        deleted += count;
     1238    }
     1239
     1240    return deleted;
     1241}
    12001242bool skyp_absorptionPop(psDB *dbh, char **disperser_id, psF32 *atmcomp1, psF32 *atmcomp2, psF32 *atmcomp3, psS32 *nstars, psF64 *ra, psF64 *decl, psF32 *exptime, psF64 *sky_bright)
    12011243{
     
    17081750}
    17091751
     1752long long skyp_emissionDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     1753{
     1754    long long       deleted = 0;
     1755
     1756    long long count = psDBDeleteRows(dbh, SKYP_EMISSION_TABLE_NAME, where, limit);
     1757    if (count < 0) {
     1758        psError(PS_ERR_UNKNOWN, true, "failed to delete row from skyp_emission");
     1759        return count;
     1760
     1761        deleted += count;
     1762    }
     1763
     1764    return deleted;
     1765}
    17101766bool skyp_emissionPop(psDB *dbh, char **disperser_id, psF32 *atmcomp1, psF32 *atmcomp2, psF32 *atmcomp3, psF32 *continuum, psF32 *exptime)
    17111767{
     
    21752231}
    21762232
     2233long long dimmDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     2234{
     2235    long long       deleted = 0;
     2236
     2237    long long count = psDBDeleteRows(dbh, DIMM_TABLE_NAME, where, limit);
     2238    if (count < 0) {
     2239        psError(PS_ERR_UNKNOWN, true, "failed to delete row from dimm");
     2240        return count;
     2241
     2242        deleted += count;
     2243    }
     2244
     2245    return deleted;
     2246}
    21772247bool dimmPop(psDB *dbh, psF32 *sigmax, psF32 *sigmay, psF32 *fwhm, psF64 *ra, psF64 *decl, psF32 *expttime, char **telescope_id)
    21782248{
     
    26482718}
    26492719
     2720long long skyp_irDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     2721{
     2722    long long       deleted = 0;
     2723
     2724    long long count = psDBDeleteRows(dbh, SKYP_IR_TABLE_NAME, where, limit);
     2725    if (count < 0) {
     2726        psError(PS_ERR_UNKNOWN, true, "failed to delete row from skyp_ir");
     2727        return count;
     2728
     2729        deleted += count;
     2730    }
     2731
     2732    return deleted;
     2733}
    26502734bool skyp_irPop(psDB *dbh, psF64 *sky_bright, psF64 *sky_var, psF64 *ra, psF64 *decl, psF32 *fov_x, psF32 *fov_y)
    26512735{
     
    30813165}
    30823166
     3167long long domeDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     3168{
     3169    long long       deleted = 0;
     3170
     3171    long long count = psDBDeleteRows(dbh, DOME_TABLE_NAME, where, limit);
     3172    if (count < 0) {
     3173        psError(PS_ERR_UNKNOWN, true, "failed to delete row from dome");
     3174        return count;
     3175
     3176        deleted += count;
     3177    }
     3178
     3179    return deleted;
     3180}
    30833181bool domePop(psDB *dbh, psF32 *az, bool *open, bool *light, bool *track)
    30843182{
     
    34903588}
    34913589
     3590long long telescopeDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     3591{
     3592    long long       deleted = 0;
     3593
     3594    long long count = psDBDeleteRows(dbh, TELESCOPE_TABLE_NAME, where, limit);
     3595    if (count < 0) {
     3596        psError(PS_ERR_UNKNOWN, true, "failed to delete row from telescope");
     3597        return count;
     3598
     3599        deleted += count;
     3600    }
     3601
     3602    return deleted;
     3603}
    34923604bool telescopePop(psDB *dbh, char **guide, psF32 *alt, psF32 *az, psF64 *ra, psF64 *decl)
    34933605{
     
    39214033}
    39224034
     4035long long summitExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     4036{
     4037    long long       deleted = 0;
     4038
     4039    long long count = psDBDeleteRows(dbh, SUMMITEXP_TABLE_NAME, where, limit);
     4040    if (count < 0) {
     4041        psError(PS_ERR_UNKNOWN, true, "failed to delete row from summitExp");
     4042        return count;
     4043
     4044        deleted += count;
     4045    }
     4046
     4047    return deleted;
     4048}
    39234049bool summitExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, char **uri)
    39244050{
     
    43514477}
    43524478
     4479long long pzPendingExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     4480{
     4481    long long       deleted = 0;
     4482
     4483    long long count = psDBDeleteRows(dbh, PZPENDINGEXP_TABLE_NAME, where, limit);
     4484    if (count < 0) {
     4485        psError(PS_ERR_UNKNOWN, true, "failed to delete row from pzPendingExp");
     4486        return count;
     4487
     4488        deleted += count;
     4489    }
     4490
     4491    return deleted;
     4492}
    43534493bool pzPendingExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles)
    43544494{
     
    47934933}
    47944934
     4935long long pzPendingImfileDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     4936{
     4937    long long       deleted = 0;
     4938
     4939    long long count = psDBDeleteRows(dbh, PZPENDINGIMFILE_TABLE_NAME, where, limit);
     4940    if (count < 0) {
     4941        psError(PS_ERR_UNKNOWN, true, "failed to delete row from pzPendingImfile");
     4942        return count;
     4943
     4944        deleted += count;
     4945    }
     4946
     4947    return deleted;
     4948}
    47954949bool pzPendingImfilePop(psDB *dbh, char **exp_id, psS32 *bytes, char **md5sum, char **class, char **class_id, char **uri)
    47964950{
     
    52415395}
    52425396
     5397long long newExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     5398{
     5399    long long       deleted = 0;
     5400
     5401    long long count = psDBDeleteRows(dbh, NEWEXP_TABLE_NAME, where, limit);
     5402    if (count < 0) {
     5403        psError(PS_ERR_UNKNOWN, true, "failed to delete row from newExp");
     5404        return count;
     5405
     5406        deleted += count;
     5407    }
     5408
     5409    return deleted;
     5410}
    52435411bool newExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles)
    52445412{
     
    56605828}
    56615829
     5830long long newImfileDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     5831{
     5832    long long       deleted = 0;
     5833
     5834    long long count = psDBDeleteRows(dbh, NEWIMFILE_TABLE_NAME, where, limit);
     5835    if (count < 0) {
     5836        psError(PS_ERR_UNKNOWN, true, "failed to delete row from newImfile");
     5837        return count;
     5838
     5839        deleted += count;
     5840    }
     5841
     5842    return deleted;
     5843}
    56625844bool newImfilePop(psDB *dbh, char **exp_id, char **class, char **class_id, char **uri)
    56635845{
     
    61396321}
    61406322
     6323long long rawDetrendExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     6324{
     6325    long long       deleted = 0;
     6326
     6327    long long count = psDBDeleteRows(dbh, RAWDETRENDEXP_TABLE_NAME, where, limit);
     6328    if (count < 0) {
     6329        psError(PS_ERR_UNKNOWN, true, "failed to delete row from rawDetrendExp");
     6330        return count;
     6331
     6332        deleted += count;
     6333    }
     6334
     6335    return deleted;
     6336}
    61416337bool rawDetrendExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, psF32 *airmass, psF64 *ra, psF64 *decl, psF32 *exp_time, psF64 *background)
    61426338{
     
    67446940}
    67456941
     6942long long rawScienceExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     6943{
     6944    long long       deleted = 0;
     6945
     6946    long long count = psDBDeleteRows(dbh, RAWSCIENCEEXP_TABLE_NAME, where, limit);
     6947    if (count < 0) {
     6948        psError(PS_ERR_UNKNOWN, true, "failed to delete row from rawScienceExp");
     6949        return count;
     6950
     6951        deleted += count;
     6952    }
     6953
     6954    return deleted;
     6955}
    67466956bool rawScienceExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, psF32 *airmass, psF64 *ra, psF64 *decl, psF32 *exp_time, psF64 *background)
    67476957{
     
    72717481}
    72727482
     7483long long rawImfileDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     7484{
     7485    long long       deleted = 0;
     7486
     7487    long long count = psDBDeleteRows(dbh, RAWIMFILE_TABLE_NAME, where, limit);
     7488    if (count < 0) {
     7489        psError(PS_ERR_UNKNOWN, true, "failed to delete row from rawImfile");
     7490        return count;
     7491
     7492        deleted += count;
     7493    }
     7494
     7495    return deleted;
     7496}
    72737497bool rawImfilePop(psDB *dbh, char **exp_id, char **class, char **class_id, char **uri)
    72747498{
     
    77737997}
    77747998
     7999long long p1PendingExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     8000{
     8001    long long       deleted = 0;
     8002
     8003    long long count = psDBDeleteRows(dbh, P1PENDINGEXP_TABLE_NAME, where, limit);
     8004    if (count < 0) {
     8005        psError(PS_ERR_UNKNOWN, true, "failed to delete row from p1PendingExp");
     8006        return count;
     8007
     8008        deleted += count;
     8009    }
     8010
     8011    return deleted;
     8012}
    77758013bool p1PendingExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, psF32 *airmass, psF64 *ra, psF64 *decl, psF32 *exp_time, psF64 *background, char **recipe, psS32 *p1_version)
    77768014{
     
    84488686}
    84498687
     8688long long p2PendingExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     8689{
     8690    long long       deleted = 0;
     8691
     8692    long long count = psDBDeleteRows(dbh, P2PENDINGEXP_TABLE_NAME, where, limit);
     8693    if (count < 0) {
     8694        psError(PS_ERR_UNKNOWN, true, "failed to delete row from p2PendingExp");
     8695        return count;
     8696
     8697        deleted += count;
     8698    }
     8699
     8700    return deleted;
     8701}
    84508702bool p2PendingExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, psF32 *airmass, psF32 *ra, psF64 *decl, psF64 *exp_time, psF64 *background, char **recipe, psS32 *p1_version, psS32 *p2_version)
    84518703{
     
    90519303}
    90529304
     9305long long p2PendingImfileDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     9306{
     9307    long long       deleted = 0;
     9308
     9309    long long count = psDBDeleteRows(dbh, P2PENDINGIMFILE_TABLE_NAME, where, limit);
     9310    if (count < 0) {
     9311        psError(PS_ERR_UNKNOWN, true, "failed to delete row from p2PendingImfile");
     9312        return count;
     9313
     9314        deleted += count;
     9315    }
     9316
     9317    return deleted;
     9318}
    90539319bool p2PendingImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char **recipe, psS32 *p1_version, psS32 *p2_version)
    90549320{
     
    96009866}
    96019867
     9868long long p2DoneExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     9869{
     9870    long long       deleted = 0;
     9871
     9872    long long count = psDBDeleteRows(dbh, P2DONEEXP_TABLE_NAME, where, limit);
     9873    if (count < 0) {
     9874        psError(PS_ERR_UNKNOWN, true, "failed to delete row from p2DoneExp");
     9875        return count;
     9876
     9877        deleted += count;
     9878    }
     9879
     9880    return deleted;
     9881}
    96029882bool p2DoneExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, psF32 *airmass, psF64 *ra, psF64 *decl, psF32 *exp_time, psF64 *background, char **recipe, psS32 *p1_version, psS32 *p2_version)
    96039883{
     
    1020310483}
    1020410484
     10485long long p2DoneImfileDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     10486{
     10487    long long       deleted = 0;
     10488
     10489    long long count = psDBDeleteRows(dbh, P2DONEIMFILE_TABLE_NAME, where, limit);
     10490    if (count < 0) {
     10491        psError(PS_ERR_UNKNOWN, true, "failed to delete row from p2DoneImfile");
     10492        return count;
     10493
     10494        deleted += count;
     10495    }
     10496
     10497    return deleted;
     10498}
    1020510499bool p2DoneImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char **recipe, psS32 *p1_version, psS32 *p2_version)
    1020610500{
     
    1074011034}
    1074111035
     11036long long p3PendingExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     11037{
     11038    long long       deleted = 0;
     11039
     11040    long long count = psDBDeleteRows(dbh, P3PENDINGEXP_TABLE_NAME, where, limit);
     11041    if (count < 0) {
     11042        psError(PS_ERR_UNKNOWN, true, "failed to delete row from p3PendingExp");
     11043        return count;
     11044
     11045        deleted += count;
     11046    }
     11047
     11048    return deleted;
     11049}
    1074211050bool p3PendingExpPop(psDB *dbh, char **exp_id, char **camera, char **exp_type, psS32 *imfiles, char **filter, psF32 *airmass, psF64 *ra, psF64 *decl, psF32 *exp_time, psF64 *background, char **recipe, psS32 *p2_version, psS32 *p3_version)
    1074311051{
     
    1127811586}
    1127911587
     11588long long detRunDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     11589{
     11590    long long       deleted = 0;
     11591
     11592    long long count = psDBDeleteRows(dbh, DETRUN_TABLE_NAME, where, limit);
     11593    if (count < 0) {
     11594        psError(PS_ERR_UNKNOWN, true, "failed to delete row from detRun");
     11595        return count;
     11596
     11597        deleted += count;
     11598    }
     11599
     11600    return deleted;
     11601}
    1128011602bool detRunPop(psDB *dbh, psS32 *iteration, char **det_type)
    1128111603{
     
    1174312065}
    1174412066
     12067long long detInputExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     12068{
     12069    long long       deleted = 0;
     12070
     12071    long long count = psDBDeleteRows(dbh, DETINPUTEXP_TABLE_NAME, where, limit);
     12072    if (count < 0) {
     12073        psError(PS_ERR_UNKNOWN, true, "failed to delete row from detInputExp");
     12074        return count;
     12075
     12076        deleted += count;
     12077    }
     12078
     12079    return deleted;
     12080}
    1174512081bool detInputExpPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, psF32 *airmass, psF64 *ra, psF64 *decl, psF32 *exp_time, psF64 *background)
    1174612082{
     
    1231712653}
    1231812654
     12655long long detProcessedImfileDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     12656{
     12657    long long       deleted = 0;
     12658
     12659    long long count = psDBDeleteRows(dbh, DETPROCESSEDIMFILE_TABLE_NAME, where, limit);
     12660    if (count < 0) {
     12661        psError(PS_ERR_UNKNOWN, true, "failed to delete row from detProcessedImfile");
     12662        return count;
     12663
     12664        deleted += count;
     12665    }
     12666
     12667    return deleted;
     12668}
    1231912669bool detProcessedImfilePop(psDB *dbh, psS32 *det_id, char **exp_id, char **class_id, char **uri, char **recipe)
    1232012670{
     
    1274613096}
    1274713097
     13098long long detStackedImfileDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     13099{
     13100    long long       deleted = 0;
     13101
     13102    long long count = psDBDeleteRows(dbh, DETSTACKEDIMFILE_TABLE_NAME, where, limit);
     13103    if (count < 0) {
     13104        psError(PS_ERR_UNKNOWN, true, "failed to delete row from detStackedImfile");
     13105        return count;
     13106
     13107        deleted += count;
     13108    }
     13109
     13110    return deleted;
     13111}
    1274813112bool detStackedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char **recipe)
    1274913113{
     
    1317513539}
    1317613540
     13541long long detNormalizedImfileDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     13542{
     13543    long long       deleted = 0;
     13544
     13545    long long count = psDBDeleteRows(dbh, DETNORMALIZEDIMFILE_TABLE_NAME, where, limit);
     13546    if (count < 0) {
     13547        psError(PS_ERR_UNKNOWN, true, "failed to delete row from detNormalizedImfile");
     13548        return count;
     13549
     13550        deleted += count;
     13551    }
     13552
     13553    return deleted;
     13554}
    1317713555bool detNormalizedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char **recipe)
    1317813556{
     
    1358013958}
    1358113959
     13960long long detMasterFrameDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     13961{
     13962    long long       deleted = 0;
     13963
     13964    long long count = psDBDeleteRows(dbh, DETMASTERFRAME_TABLE_NAME, where, limit);
     13965    if (count < 0) {
     13966        psError(PS_ERR_UNKNOWN, true, "failed to delete row from detMasterFrame");
     13967        return count;
     13968
     13969        deleted += count;
     13970    }
     13971
     13972    return deleted;
     13973}
    1358213974bool detMasterFramePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **comment)
    1358313975{
     
    1396214354}
    1396314355
     14356long long detMasterImfileDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     14357{
     14358    long long       deleted = 0;
     14359
     14360    long long count = psDBDeleteRows(dbh, DETMASTERIMFILE_TABLE_NAME, where, limit);
     14361    if (count < 0) {
     14362        psError(PS_ERR_UNKNOWN, true, "failed to delete row from detMasterImfile");
     14363        return count;
     14364
     14365        deleted += count;
     14366    }
     14367
     14368    return deleted;
     14369}
    1396414370bool detMasterImfilePop(psDB *dbh, psS32 *det_id, char **class_id, char **uri, char **recipe)
    1396514371{
     
    1437314779}
    1437414780
     14781long long detResidImfileAnalysisDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     14782{
     14783    long long       deleted = 0;
     14784
     14785    long long count = psDBDeleteRows(dbh, DETRESIDIMFILEANALYSIS_TABLE_NAME, where, limit);
     14786    if (count < 0) {
     14787        psError(PS_ERR_UNKNOWN, true, "failed to delete row from detResidImfileAnalysis");
     14788        return count;
     14789
     14790        deleted += count;
     14791    }
     14792
     14793    return deleted;
     14794}
    1437514795bool detResidImfileAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **class_id, char **recipe)
    1437614796{
     
    1480115221}
    1480215222
     15223long long detResidExpAnalysisDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
     15224{
     15225    long long       deleted = 0;
     15226
     15227    long long count = psDBDeleteRows(dbh, DETRESIDEXPANALYSIS_TABLE_NAME, where, limit);
     15228    if (count < 0) {
     15229        psError(PS_ERR_UNKNOWN, true, "failed to delete row from detResidExpAnalysis");
     15230        return count;
     15231
     15232        deleted += count;
     15233    }
     15234
     15235    return deleted;
     15236}
    1480315237bool detResidExpAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **recipe, bool *accept)
    1480415238{
Note: See TracChangeset for help on using the changeset viewer.