IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 8, 2007, 3:18:04 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 1.1.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/src/ippdb.h

    r11679 r11720  
    2020/*
    2121 *
    22  * This file was generated by glueforge 0.36
     22 * This file was generated by glueforge 1.00
    2323 *
    2424 * Do NOT directly edit this file.
     
    68306830    bool            mdcf                ///< format as mdconfig or simple
    68316831);
    6832 /** p4aRunRow data structure
    6833  *
    6834  * Structure for representing a single row of p4aRun table data.
     6832/** p4RunRow data structure
     6833 *
     6834 * Structure for representing a single row of p4Run table data.
    68356835 */
    68366836
    68376837typedef struct {
    68386838    psS32           p4a_id;
     6839    char            *mode;
    68396840    char            *state;
    68406841    char            *workdir;
    6841     bool            magic;
    6842 } p4aRunRow;
    6843 
    6844 /** Creates a new p4aRunRow object
    6845  *
    6846  *  @return A new p4aRunRow object or NULL on failure.
    6847  */
    6848 
    6849 p4aRunRow *p4aRunRowAlloc(
     6842    psTime*         registered;
     6843} p4RunRow;
     6844
     6845/** Creates a new p4RunRow object
     6846 *
     6847 *  @return A new p4RunRow object or NULL on failure.
     6848 */
     6849
     6850p4RunRow *p4RunRowAlloc(
    68506851    psS32           p4a_id,
     6852    const char      *mode,
    68516853    const char      *state,
    68526854    const char      *workdir,
    6853     bool            magic
    6854 );
    6855 
    6856 /** Creates a new p4aRun table
    6857  *
    6858  * @return true on success
    6859  */
    6860 
    6861 bool p4aRunCreateTable(
     6855    psTime*         registered
     6856);
     6857
     6858/** Creates a new p4Run table
     6859 *
     6860 * @return true on success
     6861 */
     6862
     6863bool p4RunCreateTable(
    68626864    psDB            *dbh                ///< Database handle
    68636865);
    68646866
    6865 /** Deletes a p4aRun table
    6866  *
    6867  * @return true on success
    6868  */
    6869 
    6870 bool p4aRunDropTable(
     6867/** Deletes a p4Run table
     6868 *
     6869 * @return true on success
     6870 */
     6871
     6872bool p4RunDropTable(
    68716873    psDB            *dbh                ///< Database handle
    68726874);
     
    68796881 */
    68806882
    6881 bool p4aRunInsert(
     6883bool p4RunInsert(
    68826884    psDB            *dbh,               ///< Database handle
    68836885    psS32           p4a_id,
     6886    const char      *mode,
    68846887    const char      *state,
    68856888    const char      *workdir,
    6886     bool            magic
     6889    psTime*         registered
    68876890);
    68886891
     
    68926895 */
    68936896
    6894 long long p4aRunDelete(
     6897long long p4RunDelete(
    68956898    psDB            *dbh,               ///< Database handle
    68966899    const psMetadata *where,            ///< Row match criteria
     
    68986901);
    68996902
    6900 /** Insert a single p4aRunRow object into a table
     6903/** Insert a single p4RunRow object into a table
    69016904 *
    69026905 * This function constructs and inserts a single row based on it's parameters.
     
    69056908 */
    69066909
    6907 bool p4aRunInsertObject(
    6908     psDB            *dbh,               ///< Database handle
    6909     p4aRunRow       *object             ///< p4aRunRow object
    6910 );
    6911 
    6912 /** Insert an array of p4aRunRow object into a table
     6910bool p4RunInsertObject(
     6911    psDB            *dbh,               ///< Database handle
     6912    p4RunRow        *object             ///< p4RunRow object
     6913);
     6914
     6915/** Insert an array of p4RunRow object into a table
    69136916 *
    69146917 * This function constructs and inserts multiple rows based on it's parameters.
     
    69176920 */
    69186921
    6919 bool p4aRunInsertObjects(
    6920     psDB            *dbh,               ///< Database handle
    6921     psArray         *objects            ///< array of p4aRunRow objects
    6922 );
    6923 
    6924 /** Insert data from a binary FITS table p4aRunRow into the database
     6922bool p4RunInsertObjects(
     6923    psDB            *dbh,               ///< Database handle
     6924    psArray         *objects            ///< array of p4RunRow objects
     6925);
     6926
     6927/** Insert data from a binary FITS table p4RunRow into the database
    69256928 *
    69266929 * This function expects a psFits object with a FITS table as the first
     
    69326935 */
    69336936
    6934 bool p4aRunInsertFits(
     6937bool p4RunInsertFits(
    69356938    psDB            *dbh,               ///< Database handle
    69366939    const psFits    *fits               ///< psFits object
     
    69476950 */
    69486951
    6949 bool p4aRunSelectRowsFits(
     6952bool p4RunSelectRowsFits(
    69506953    psDB            *dbh,               ///< Database handle
    69516954    psFits          *fits,              ///< psFits object
     
    69546957);
    69556958
    6956 /** Convert a p4aRunRow into an equivalent psMetadata
     6959/** Convert a p4RunRow into an equivalent psMetadata
    69576960 *
    69586961 * @return A psMetadata pointer or NULL on error
    69596962 */
    69606963
    6961 psMetadata *p4aRunMetadataFromObject(
    6962     const p4aRunRow *object             ///< fooRow to convert into a psMetadata
     6964psMetadata *p4RunMetadataFromObject(
     6965    const p4RunRow *object             ///< fooRow to convert into a psMetadata
    69636966);
    69646967
    69656968/** Convert a psMetadata into an equivalent fooRow
    69666969 *
    6967  * @return A p4aRunRow pointer or NULL on error
    6968  */
    6969 
    6970 p4aRunRow *p4aRunObjectFromMetadata(
     6970 * @return A p4RunRow pointer or NULL on error
     6971 */
     6972
     6973p4RunRow *p4RunObjectFromMetadata(
    69716974    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    69726975);
    6973 /** Selects up to limit rows from the database and returns as p4aRunRow objects in a psArray
     6976/** Selects up to limit rows from the database and returns as p4RunRow objects in a psArray
    69746977 *
    69756978 *  See psDBSelectRows() for documentation on the format of where.
     
    69786981 */
    69796982
    6980 psArray *p4aRunSelectRowObjects(
     6983psArray *p4RunSelectRowObjects(
    69816984    psDB            *dbh,               ///< Database handle
    69826985    const psMetadata *where,            ///< Row match criteria
    69836986    unsigned long long limit            ///< Maximum number of elements to return
    69846987);
    6985 /** Deletes a row from the database coresponding to an p4aRun
     6988/** Deletes a row from the database coresponding to an p4Run
    69866989 *
    69876990 *  Note that a 'where' search psMetadata is constructed from each object and
     
    69916994 */
    69926995
    6993 bool p4aRunDeleteObject(
    6994     psDB            *dbh,               ///< Database handle
    6995     const p4aRunRow *object    ///< Object to delete
     6996bool p4RunDeleteObject(
     6997    psDB            *dbh,               ///< Database handle
     6998    const p4RunRow *object    ///< Object to delete
    69966999);
    69977000/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    70037006 */
    70047007
    7005 long long p4aRunDeleteRowObjects(
     7008long long p4RunDeleteRowObjects(
    70067009    psDB            *dbh,               ///< Database handle
    70077010    const psArray   *objects,           ///< Array of objects to delete
    70087011    unsigned long long limit            ///< Maximum number of elements to delete
    70097012);
    7010 /** Formats and prints an array of p4aRunRow objects
     7013/** Formats and prints an array of p4RunRow objects
    70117014 *
    70127015 * When mdcf is set the formated output is in psMetadataConfig
     
    70167019 */
    70177020
    7018 bool p4aRunPrintObjects(
     7021bool p4RunPrintObjects(
    70197022    FILE            *stream,            ///< a stream
    7020     psArray         *objects,           ///< An array of p4aRunRow objects
     7023    psArray         *objects,           ///< An array of p4RunRow objects
    70217024    bool            mdcf                ///< format as mdconfig or simple
    70227025);
    7023 /** Formats and prints an p4aRunRow object
     7026/** Formats and prints an p4RunRow object
    70247027 *
    70257028 * When mdcf is set the formated output is in psMetadataConfig
     
    70297032 */
    70307033
    7031 bool p4aRunPrintObject(
     7034bool p4RunPrintObject(
    70327035    FILE            *stream,            ///< a stream
    7033     p4aRunRow *object,    ///< an p4aRunRow object
     7036    p4RunRow *object,    ///< an p4RunRow object
    70347037    bool            mdcf                ///< format as mdconfig or simple
    70357038);
    7036 /** p4aInputExpRow data structure
    7037  *
    7038  * Structure for representing a single row of p4aInputExp table data.
     7039/** p4InputExpRow data structure
     7040 *
     7041 * Structure for representing a single row of p4InputExp table data.
    70397042 */
    70407043
     
    70437046    char            *exp_tag;
    70447047    psS32           p3_version;
    7045 } p4aInputExpRow;
    7046 
    7047 /** Creates a new p4aInputExpRow object
    7048  *
    7049  *  @return A new p4aInputExpRow object or NULL on failure.
    7050  */
    7051 
    7052 p4aInputExpRow *p4aInputExpRowAlloc(
     7048    bool            magiced;
     7049} p4InputExpRow;
     7050
     7051/** Creates a new p4InputExpRow object
     7052 *
     7053 *  @return A new p4InputExpRow object or NULL on failure.
     7054 */
     7055
     7056p4InputExpRow *p4InputExpRowAlloc(
    70537057    psS32           p4a_id,
    70547058    const char      *exp_tag,
    7055     psS32           p3_version
    7056 );
    7057 
    7058 /** Creates a new p4aInputExp table
    7059  *
    7060  * @return true on success
    7061  */
    7062 
    7063 bool p4aInputExpCreateTable(
     7059    psS32           p3_version,
     7060    bool            magiced
     7061);
     7062
     7063/** Creates a new p4InputExp table
     7064 *
     7065 * @return true on success
     7066 */
     7067
     7068bool p4InputExpCreateTable(
    70647069    psDB            *dbh                ///< Database handle
    70657070);
    70667071
    7067 /** Deletes a p4aInputExp table
    7068  *
    7069  * @return true on success
    7070  */
    7071 
    7072 bool p4aInputExpDropTable(
     7072/** Deletes a p4InputExp table
     7073 *
     7074 * @return true on success
     7075 */
     7076
     7077bool p4InputExpDropTable(
    70737078    psDB            *dbh                ///< Database handle
    70747079);
     
    70817086 */
    70827087
    7083 bool p4aInputExpInsert(
     7088bool p4InputExpInsert(
    70847089    psDB            *dbh,               ///< Database handle
    70857090    psS32           p4a_id,
    70867091    const char      *exp_tag,
    7087     psS32           p3_version
     7092    psS32           p3_version,
     7093    bool            magiced
    70887094);
    70897095
     
    70937099 */
    70947100
    7095 long long p4aInputExpDelete(
     7101long long p4InputExpDelete(
    70967102    psDB            *dbh,               ///< Database handle
    70977103    const psMetadata *where,            ///< Row match criteria
     
    70997105);
    71007106
    7101 /** Insert a single p4aInputExpRow object into a table
     7107/** Insert a single p4InputExpRow object into a table
    71027108 *
    71037109 * This function constructs and inserts a single row based on it's parameters.
     
    71067112 */
    71077113
    7108 bool p4aInputExpInsertObject(
    7109     psDB            *dbh,               ///< Database handle
    7110     p4aInputExpRow  *object             ///< p4aInputExpRow object
    7111 );
    7112 
    7113 /** Insert an array of p4aInputExpRow object into a table
     7114bool p4InputExpInsertObject(
     7115    psDB            *dbh,               ///< Database handle
     7116    p4InputExpRow   *object             ///< p4InputExpRow object
     7117);
     7118
     7119/** Insert an array of p4InputExpRow object into a table
    71147120 *
    71157121 * This function constructs and inserts multiple rows based on it's parameters.
     
    71187124 */
    71197125
    7120 bool p4aInputExpInsertObjects(
    7121     psDB            *dbh,               ///< Database handle
    7122     psArray         *objects            ///< array of p4aInputExpRow objects
    7123 );
    7124 
    7125 /** Insert data from a binary FITS table p4aInputExpRow into the database
     7126bool p4InputExpInsertObjects(
     7127    psDB            *dbh,               ///< Database handle
     7128    psArray         *objects            ///< array of p4InputExpRow objects
     7129);
     7130
     7131/** Insert data from a binary FITS table p4InputExpRow into the database
    71267132 *
    71277133 * This function expects a psFits object with a FITS table as the first
     
    71337139 */
    71347140
    7135 bool p4aInputExpInsertFits(
     7141bool p4InputExpInsertFits(
    71367142    psDB            *dbh,               ///< Database handle
    71377143    const psFits    *fits               ///< psFits object
     
    71487154 */
    71497155
    7150 bool p4aInputExpSelectRowsFits(
     7156bool p4InputExpSelectRowsFits(
    71517157    psDB            *dbh,               ///< Database handle
    71527158    psFits          *fits,              ///< psFits object
     
    71557161);
    71567162
    7157 /** Convert a p4aInputExpRow into an equivalent psMetadata
     7163/** Convert a p4InputExpRow into an equivalent psMetadata
    71587164 *
    71597165 * @return A psMetadata pointer or NULL on error
    71607166 */
    71617167
    7162 psMetadata *p4aInputExpMetadataFromObject(
    7163     const p4aInputExpRow *object             ///< fooRow to convert into a psMetadata
     7168psMetadata *p4InputExpMetadataFromObject(
     7169    const p4InputExpRow *object             ///< fooRow to convert into a psMetadata
    71647170);
    71657171
    71667172/** Convert a psMetadata into an equivalent fooRow
    71677173 *
    7168  * @return A p4aInputExpRow pointer or NULL on error
    7169  */
    7170 
    7171 p4aInputExpRow *p4aInputExpObjectFromMetadata(
     7174 * @return A p4InputExpRow pointer or NULL on error
     7175 */
     7176
     7177p4InputExpRow *p4InputExpObjectFromMetadata(
    71727178    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    71737179);
    7174 /** Selects up to limit rows from the database and returns as p4aInputExpRow objects in a psArray
     7180/** Selects up to limit rows from the database and returns as p4InputExpRow objects in a psArray
    71757181 *
    71767182 *  See psDBSelectRows() for documentation on the format of where.
     
    71797185 */
    71807186
    7181 psArray *p4aInputExpSelectRowObjects(
     7187psArray *p4InputExpSelectRowObjects(
    71827188    psDB            *dbh,               ///< Database handle
    71837189    const psMetadata *where,            ///< Row match criteria
    71847190    unsigned long long limit            ///< Maximum number of elements to return
    71857191);
    7186 /** Deletes a row from the database coresponding to an p4aInputExp
     7192/** Deletes a row from the database coresponding to an p4InputExp
    71877193 *
    71887194 *  Note that a 'where' search psMetadata is constructed from each object and
     
    71927198 */
    71937199
    7194 bool p4aInputExpDeleteObject(
    7195     psDB            *dbh,               ///< Database handle
    7196     const p4aInputExpRow *object    ///< Object to delete
     7200bool p4InputExpDeleteObject(
     7201    psDB            *dbh,               ///< Database handle
     7202    const p4InputExpRow *object    ///< Object to delete
    71977203);
    71987204/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    72047210 */
    72057211
    7206 long long p4aInputExpDeleteRowObjects(
     7212long long p4InputExpDeleteRowObjects(
    72077213    psDB            *dbh,               ///< Database handle
    72087214    const psArray   *objects,           ///< Array of objects to delete
    72097215    unsigned long long limit            ///< Maximum number of elements to delete
    72107216);
    7211 /** Formats and prints an array of p4aInputExpRow objects
     7217/** Formats and prints an array of p4InputExpRow objects
    72127218 *
    72137219 * When mdcf is set the formated output is in psMetadataConfig
     
    72177223 */
    72187224
    7219 bool p4aInputExpPrintObjects(
     7225bool p4InputExpPrintObjects(
    72207226    FILE            *stream,            ///< a stream
    7221     psArray         *objects,           ///< An array of p4aInputExpRow objects
     7227    psArray         *objects,           ///< An array of p4InputExpRow objects
    72227228    bool            mdcf                ///< format as mdconfig or simple
    72237229);
    7224 /** Formats and prints an p4aInputExpRow object
     7230/** Formats and prints an p4InputExpRow object
    72257231 *
    72267232 * When mdcf is set the formated output is in psMetadataConfig
     
    72307236 */
    72317237
    7232 bool p4aInputExpPrintObject(
     7238bool p4InputExpPrintObject(
    72337239    FILE            *stream,            ///< a stream
    7234     p4aInputExpRow *object,    ///< an p4aInputExpRow object
     7240    p4InputExpRow *object,    ///< an p4InputExpRow object
    72357241    bool            mdcf                ///< format as mdconfig or simple
    72367242);
    7237 /** p4aScfileRow data structure
    7238  *
    7239  * Structure for representing a single row of p4aScfile table data.
     7243/** p4ScfileRow data structure
     7244 *
     7245 * Structure for representing a single row of p4Scfile table data.
    72407246 */
    72417247
     
    72497255    psF64           bg;
    72507256    psF64           bg_mean_stdev;
    7251 } p4aScfileRow;
    7252 
    7253 /** Creates a new p4aScfileRow object
    7254  *
    7255  *  @return A new p4aScfileRow object or NULL on failure.
    7256  */
    7257 
    7258 p4aScfileRow *p4aScfileRowAlloc(
     7257} p4ScfileRow;
     7258
     7259/** Creates a new p4ScfileRow object
     7260 *
     7261 *  @return A new p4ScfileRow object or NULL on failure.
     7262 */
     7263
     7264p4ScfileRow *p4ScfileRowAlloc(
    72597265    psS32           p4a_id,
    72607266    const char      *skycell_id,
     
    72677273);
    72687274
    7269 /** Creates a new p4aScfile table
    7270  *
    7271  * @return true on success
    7272  */
    7273 
    7274 bool p4aScfileCreateTable(
     7275/** Creates a new p4Scfile table
     7276 *
     7277 * @return true on success
     7278 */
     7279
     7280bool p4ScfileCreateTable(
    72757281    psDB            *dbh                ///< Database handle
    72767282);
    72777283
    7278 /** Deletes a p4aScfile table
    7279  *
    7280  * @return true on success
    7281  */
    7282 
    7283 bool p4aScfileDropTable(
     7284/** Deletes a p4Scfile table
     7285 *
     7286 * @return true on success
     7287 */
     7288
     7289bool p4ScfileDropTable(
    72847290    psDB            *dbh                ///< Database handle
    72857291);
     
    72927298 */
    72937299
    7294 bool p4aScfileInsert(
     7300bool p4ScfileInsert(
    72957301    psDB            *dbh,               ///< Database handle
    72967302    psS32           p4a_id,
     
    73097315 */
    73107316
    7311 long long p4aScfileDelete(
     7317long long p4ScfileDelete(
    73127318    psDB            *dbh,               ///< Database handle
    73137319    const psMetadata *where,            ///< Row match criteria
     
    73157321);
    73167322
    7317 /** Insert a single p4aScfileRow object into a table
     7323/** Insert a single p4ScfileRow object into a table
    73187324 *
    73197325 * This function constructs and inserts a single row based on it's parameters.
     
    73227328 */
    73237329
    7324 bool p4aScfileInsertObject(
    7325     psDB            *dbh,               ///< Database handle
    7326     p4aScfileRow    *object             ///< p4aScfileRow object
    7327 );
    7328 
    7329 /** Insert an array of p4aScfileRow object into a table
     7330bool p4ScfileInsertObject(
     7331    psDB            *dbh,               ///< Database handle
     7332    p4ScfileRow     *object             ///< p4ScfileRow object
     7333);
     7334
     7335/** Insert an array of p4ScfileRow object into a table
    73307336 *
    73317337 * This function constructs and inserts multiple rows based on it's parameters.
     
    73347340 */
    73357341
    7336 bool p4aScfileInsertObjects(
    7337     psDB            *dbh,               ///< Database handle
    7338     psArray         *objects            ///< array of p4aScfileRow objects
    7339 );
    7340 
    7341 /** Insert data from a binary FITS table p4aScfileRow into the database
     7342bool p4ScfileInsertObjects(
     7343    psDB            *dbh,               ///< Database handle
     7344    psArray         *objects            ///< array of p4ScfileRow objects
     7345);
     7346
     7347/** Insert data from a binary FITS table p4ScfileRow into the database
    73427348 *
    73437349 * This function expects a psFits object with a FITS table as the first
     
    73497355 */
    73507356
    7351 bool p4aScfileInsertFits(
     7357bool p4ScfileInsertFits(
    73527358    psDB            *dbh,               ///< Database handle
    73537359    const psFits    *fits               ///< psFits object
     
    73647370 */
    73657371
    7366 bool p4aScfileSelectRowsFits(
     7372bool p4ScfileSelectRowsFits(
    73677373    psDB            *dbh,               ///< Database handle
    73687374    psFits          *fits,              ///< psFits object
     
    73717377);
    73727378
    7373 /** Convert a p4aScfileRow into an equivalent psMetadata
     7379/** Convert a p4ScfileRow into an equivalent psMetadata
    73747380 *
    73757381 * @return A psMetadata pointer or NULL on error
    73767382 */
    73777383
    7378 psMetadata *p4aScfileMetadataFromObject(
    7379     const p4aScfileRow *object             ///< fooRow to convert into a psMetadata
     7384psMetadata *p4ScfileMetadataFromObject(
     7385    const p4ScfileRow *object             ///< fooRow to convert into a psMetadata
    73807386);
    73817387
    73827388/** Convert a psMetadata into an equivalent fooRow
    73837389 *
    7384  * @return A p4aScfileRow pointer or NULL on error
    7385  */
    7386 
    7387 p4aScfileRow *p4aScfileObjectFromMetadata(
     7390 * @return A p4ScfileRow pointer or NULL on error
     7391 */
     7392
     7393p4ScfileRow *p4ScfileObjectFromMetadata(
    73887394    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    73897395);
    7390 /** Selects up to limit rows from the database and returns as p4aScfileRow objects in a psArray
     7396/** Selects up to limit rows from the database and returns as p4ScfileRow objects in a psArray
    73917397 *
    73927398 *  See psDBSelectRows() for documentation on the format of where.
     
    73957401 */
    73967402
    7397 psArray *p4aScfileSelectRowObjects(
     7403psArray *p4ScfileSelectRowObjects(
    73987404    psDB            *dbh,               ///< Database handle
    73997405    const psMetadata *where,            ///< Row match criteria
    74007406    unsigned long long limit            ///< Maximum number of elements to return
    74017407);
    7402 /** Deletes a row from the database coresponding to an p4aScfile
     7408/** Deletes a row from the database coresponding to an p4Scfile
    74037409 *
    74047410 *  Note that a 'where' search psMetadata is constructed from each object and
     
    74087414 */
    74097415
    7410 bool p4aScfileDeleteObject(
    7411     psDB            *dbh,               ///< Database handle
    7412     const p4aScfileRow *object    ///< Object to delete
     7416bool p4ScfileDeleteObject(
     7417    psDB            *dbh,               ///< Database handle
     7418    const p4ScfileRow *object    ///< Object to delete
    74137419);
    74147420/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    74207426 */
    74217427
    7422 long long p4aScfileDeleteRowObjects(
     7428long long p4ScfileDeleteRowObjects(
    74237429    psDB            *dbh,               ///< Database handle
    74247430    const psArray   *objects,           ///< Array of objects to delete
    74257431    unsigned long long limit            ///< Maximum number of elements to delete
    74267432);
    7427 /** Formats and prints an array of p4aScfileRow objects
     7433/** Formats and prints an array of p4ScfileRow objects
    74287434 *
    74297435 * When mdcf is set the formated output is in psMetadataConfig
     
    74337439 */
    74347440
    7435 bool p4aScfilePrintObjects(
     7441bool p4ScfilePrintObjects(
    74367442    FILE            *stream,            ///< a stream
    7437     psArray         *objects,           ///< An array of p4aScfileRow objects
     7443    psArray         *objects,           ///< An array of p4ScfileRow objects
    74387444    bool            mdcf                ///< format as mdconfig or simple
    74397445);
    7440 /** Formats and prints an p4aScfileRow object
     7446/** Formats and prints an p4ScfileRow object
    74417447 *
    74427448 * When mdcf is set the formated output is in psMetadataConfig
     
    74467452 */
    74477453
    7448 bool p4aScfilePrintObject(
     7454bool p4ScfilePrintObject(
    74497455    FILE            *stream,            ///< a stream
    7450     p4aScfileRow *object,    ///< an p4aScfileRow object
     7456    p4ScfileRow *object,    ///< an p4ScfileRow object
    74517457    bool            mdcf                ///< format as mdconfig or simple
    74527458);
    7453 /** p4bRunRow data structure
    7454  *
    7455  * Structure for representing a single row of p4bRun table data.
    7456  */
    7457 
    7458 typedef struct {
    7459     psS32           p4b_id;
    7460     char            *state;
    7461     char            *workdir;
    7462     bool            magic;
    7463 } p4bRunRow;
    7464 
    7465 /** Creates a new p4bRunRow object
    7466  *
    7467  *  @return A new p4bRunRow object or NULL on failure.
    7468  */
    7469 
    7470 p4bRunRow *p4bRunRowAlloc(
    7471     psS32           p4b_id,
    7472     const char      *state,
    7473     const char      *workdir,
    7474     bool            magic
    7475 );
    7476 
    7477 /** Creates a new p4bRun table
    7478  *
    7479  * @return true on success
    7480  */
    7481 
    7482 bool p4bRunCreateTable(
    7483     psDB            *dbh                ///< Database handle
    7484 );
    7485 
    7486 /** Deletes a p4bRun table
    7487  *
    7488  * @return true on success
    7489  */
    7490 
    7491 bool p4bRunDropTable(
    7492     psDB            *dbh                ///< Database handle
    7493 );
    7494 
    7495 /** Insert a single row into a table
    7496  *
    7497  * This function constructs and inserts a single row based on it's parameters.
    7498  *
    7499  * @return true on success
    7500  */
    7501 
    7502 bool p4bRunInsert(
    7503     psDB            *dbh,               ///< Database handle
    7504     psS32           p4b_id,
    7505     const char      *state,
    7506     const char      *workdir,
    7507     bool            magic
    7508 );
    7509 
    7510 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    7511  *
    7512  * @return A The number of rows removed or a negative value on error
    7513  */
    7514 
    7515 long long p4bRunDelete(
    7516     psDB            *dbh,               ///< Database handle
    7517     const psMetadata *where,            ///< Row match criteria
    7518     unsigned long long limit            ///< Maximum number of elements to delete
    7519 );
    7520 
    7521 /** Insert a single p4bRunRow object into a table
    7522  *
    7523  * This function constructs and inserts a single row based on it's parameters.
    7524  *
    7525  * @return true on success
    7526  */
    7527 
    7528 bool p4bRunInsertObject(
    7529     psDB            *dbh,               ///< Database handle
    7530     p4bRunRow       *object             ///< p4bRunRow object
    7531 );
    7532 
    7533 /** Insert an array of p4bRunRow object into a table
    7534  *
    7535  * This function constructs and inserts multiple rows based on it's parameters.
    7536  *
    7537  * @return true on success
    7538  */
    7539 
    7540 bool p4bRunInsertObjects(
    7541     psDB            *dbh,               ///< Database handle
    7542     psArray         *objects            ///< array of p4bRunRow objects
    7543 );
    7544 
    7545 /** Insert data from a binary FITS table p4bRunRow into the database
    7546  *
    7547  * This function expects a psFits object with a FITS table as the first
    7548  * extension.  The table must have at least one row of data in it, that is of
    7549  * the appropriate format (number of columns and their type).  All other
    7550  * extensions are ignored.
    7551  *
    7552  * @return true on success
    7553  */
    7554 
    7555 bool p4bRunInsertFits(
    7556     psDB            *dbh,               ///< Database handle
    7557     const psFits    *fits               ///< psFits object
    7558 );
    7559 
    7560 /** Selects up to limit from the database and returns them in a binary FITS table
    7561  *
    7562  * This function assumes an empty psFits object and will create a FITS table
    7563  * as the first extension.
    7564  *
    7565  *  See psDBSelectRows() for documentation on the format of where.
    7566  *
    7567  * @return true on success
    7568  */
    7569 
    7570 bool p4bRunSelectRowsFits(
    7571     psDB            *dbh,               ///< Database handle
    7572     psFits          *fits,              ///< psFits object
    7573     const psMetadata *where,            ///< Row match criteria
    7574     unsigned long long limit            ///< Maximum number of elements to return
    7575 );
    7576 
    7577 /** Convert a p4bRunRow into an equivalent psMetadata
    7578  *
    7579  * @return A psMetadata pointer or NULL on error
    7580  */
    7581 
    7582 psMetadata *p4bRunMetadataFromObject(
    7583     const p4bRunRow *object             ///< fooRow to convert into a psMetadata
    7584 );
    7585 
    7586 /** Convert a psMetadata into an equivalent fooRow
    7587  *
    7588  * @return A p4bRunRow pointer or NULL on error
    7589  */
    7590 
    7591 p4bRunRow *p4bRunObjectFromMetadata(
    7592     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    7593 );
    7594 /** Selects up to limit rows from the database and returns as p4bRunRow objects in a psArray
    7595  *
    7596  *  See psDBSelectRows() for documentation on the format of where.
    7597  *
    7598  * @return A psArray pointer or NULL on error
    7599  */
    7600 
    7601 psArray *p4bRunSelectRowObjects(
    7602     psDB            *dbh,               ///< Database handle
    7603     const psMetadata *where,            ///< Row match criteria
    7604     unsigned long long limit            ///< Maximum number of elements to return
    7605 );
    7606 /** Deletes a row from the database coresponding to an p4bRun
    7607  *
    7608  *  Note that a 'where' search psMetadata is constructed from each object and
    7609  *  used to find rows to delete.
    7610  *
    7611  * @return A The number of rows removed or a negative value on error
    7612  */
    7613 
    7614 bool p4bRunDeleteObject(
    7615     psDB            *dbh,               ///< Database handle
    7616     const p4bRunRow *object    ///< Object to delete
    7617 );
    7618 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    7619  *
    7620  *  Note that a 'where' search psMetadata is constructed from each object and
    7621  *  used to find rows to delete.
    7622  *
    7623  * @return A The number of rows removed or a negative value on error
    7624  */
    7625 
    7626 long long p4bRunDeleteRowObjects(
    7627     psDB            *dbh,               ///< Database handle
    7628     const psArray   *objects,           ///< Array of objects to delete
    7629     unsigned long long limit            ///< Maximum number of elements to delete
    7630 );
    7631 /** Formats and prints an array of p4bRunRow objects
    7632  *
    7633  * When mdcf is set the formated output is in psMetadataConfig
    7634  * format, otherwise it is in a simple tabular format.
    7635  *
    7636  * @return true on success
    7637  */
    7638 
    7639 bool p4bRunPrintObjects(
    7640     FILE            *stream,            ///< a stream
    7641     psArray         *objects,           ///< An array of p4bRunRow objects
    7642     bool            mdcf                ///< format as mdconfig or simple
    7643 );
    7644 /** Formats and prints an p4bRunRow object
    7645  *
    7646  * When mdcf is set the formated output is in psMetadataConfig
    7647  * format, otherwise it is in a simple tabular format.
    7648  *
    7649  * @return true on success
    7650  */
    7651 
    7652 bool p4bRunPrintObject(
    7653     FILE            *stream,            ///< a stream
    7654     p4bRunRow *object,    ///< an p4bRunRow object
    7655     bool            mdcf                ///< format as mdconfig or simple
    7656 );
    7657 /** p4bInputScfileRow data structure
    7658  *
    7659  * Structure for representing a single row of p4bInputScfile table data.
     7459/** p4InputScfileRow data structure
     7460 *
     7461 * Structure for representing a single row of p4InputScfile table data.
    76607462 */
    76617463
     
    76677469    psS32           p3_version;
    76687470    char            *kind;
    7669 } p4bInputScfileRow;
    7670 
    7671 /** Creates a new p4bInputScfileRow object
    7672  *
    7673  *  @return A new p4bInputScfileRow object or NULL on failure.
    7674  */
    7675 
    7676 p4bInputScfileRow *p4bInputScfileRowAlloc(
     7471} p4InputScfileRow;
     7472
     7473/** Creates a new p4InputScfileRow object
     7474 *
     7475 *  @return A new p4InputScfileRow object or NULL on failure.
     7476 */
     7477
     7478p4InputScfileRow *p4InputScfileRowAlloc(
    76777479    psS32           p4b_id,
    76787480    const char      *skycell_id,
     
    76837485);
    76847486
    7685 /** Creates a new p4bInputScfile table
    7686  *
    7687  * @return true on success
    7688  */
    7689 
    7690 bool p4bInputScfileCreateTable(
     7487/** Creates a new p4InputScfile table
     7488 *
     7489 * @return true on success
     7490 */
     7491
     7492bool p4InputScfileCreateTable(
    76917493    psDB            *dbh                ///< Database handle
    76927494);
    76937495
    7694 /** Deletes a p4bInputScfile table
    7695  *
    7696  * @return true on success
    7697  */
    7698 
    7699 bool p4bInputScfileDropTable(
     7496/** Deletes a p4InputScfile table
     7497 *
     7498 * @return true on success
     7499 */
     7500
     7501bool p4InputScfileDropTable(
    77007502    psDB            *dbh                ///< Database handle
    77017503);
     
    77087510 */
    77097511
    7710 bool p4bInputScfileInsert(
     7512bool p4InputScfileInsert(
    77117513    psDB            *dbh,               ///< Database handle
    77127514    psS32           p4b_id,
     
    77237525 */
    77247526
    7725 long long p4bInputScfileDelete(
     7527long long p4InputScfileDelete(
    77267528    psDB            *dbh,               ///< Database handle
    77277529    const psMetadata *where,            ///< Row match criteria
     
    77297531);
    77307532
    7731 /** Insert a single p4bInputScfileRow object into a table
     7533/** Insert a single p4InputScfileRow object into a table
    77327534 *
    77337535 * This function constructs and inserts a single row based on it's parameters.
     
    77367538 */
    77377539
    7738 bool p4bInputScfileInsertObject(
    7739     psDB            *dbh,               ///< Database handle
    7740     p4bInputScfileRow *object             ///< p4bInputScfileRow object
    7741 );
    7742 
    7743 /** Insert an array of p4bInputScfileRow object into a table
     7540bool p4InputScfileInsertObject(
     7541    psDB            *dbh,               ///< Database handle
     7542    p4InputScfileRow *object             ///< p4InputScfileRow object
     7543);
     7544
     7545/** Insert an array of p4InputScfileRow object into a table
    77447546 *
    77457547 * This function constructs and inserts multiple rows based on it's parameters.
     
    77487550 */
    77497551
    7750 bool p4bInputScfileInsertObjects(
    7751     psDB            *dbh,               ///< Database handle
    7752     psArray         *objects            ///< array of p4bInputScfileRow objects
    7753 );
    7754 
    7755 /** Insert data from a binary FITS table p4bInputScfileRow into the database
     7552bool p4InputScfileInsertObjects(
     7553    psDB            *dbh,               ///< Database handle
     7554    psArray         *objects            ///< array of p4InputScfileRow objects
     7555);
     7556
     7557/** Insert data from a binary FITS table p4InputScfileRow into the database
    77567558 *
    77577559 * This function expects a psFits object with a FITS table as the first
     
    77637565 */
    77647566
    7765 bool p4bInputScfileInsertFits(
     7567bool p4InputScfileInsertFits(
    77667568    psDB            *dbh,               ///< Database handle
    77677569    const psFits    *fits               ///< psFits object
     
    77787580 */
    77797581
    7780 bool p4bInputScfileSelectRowsFits(
     7582bool p4InputScfileSelectRowsFits(
    77817583    psDB            *dbh,               ///< Database handle
    77827584    psFits          *fits,              ///< psFits object
     
    77857587);
    77867588
    7787 /** Convert a p4bInputScfileRow into an equivalent psMetadata
     7589/** Convert a p4InputScfileRow into an equivalent psMetadata
    77887590 *
    77897591 * @return A psMetadata pointer or NULL on error
    77907592 */
    77917593
    7792 psMetadata *p4bInputScfileMetadataFromObject(
    7793     const p4bInputScfileRow *object             ///< fooRow to convert into a psMetadata
     7594psMetadata *p4InputScfileMetadataFromObject(
     7595    const p4InputScfileRow *object             ///< fooRow to convert into a psMetadata
    77947596);
    77957597
    77967598/** Convert a psMetadata into an equivalent fooRow
    77977599 *
    7798  * @return A p4bInputScfileRow pointer or NULL on error
    7799  */
    7800 
    7801 p4bInputScfileRow *p4bInputScfileObjectFromMetadata(
     7600 * @return A p4InputScfileRow pointer or NULL on error
     7601 */
     7602
     7603p4InputScfileRow *p4InputScfileObjectFromMetadata(
    78027604    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    78037605);
    7804 /** Selects up to limit rows from the database and returns as p4bInputScfileRow objects in a psArray
     7606/** Selects up to limit rows from the database and returns as p4InputScfileRow objects in a psArray
    78057607 *
    78067608 *  See psDBSelectRows() for documentation on the format of where.
     
    78097611 */
    78107612
    7811 psArray *p4bInputScfileSelectRowObjects(
     7613psArray *p4InputScfileSelectRowObjects(
    78127614    psDB            *dbh,               ///< Database handle
    78137615    const psMetadata *where,            ///< Row match criteria
    78147616    unsigned long long limit            ///< Maximum number of elements to return
    78157617);
    7816 /** Deletes a row from the database coresponding to an p4bInputScfile
     7618/** Deletes a row from the database coresponding to an p4InputScfile
    78177619 *
    78187620 *  Note that a 'where' search psMetadata is constructed from each object and
     
    78227624 */
    78237625
    7824 bool p4bInputScfileDeleteObject(
    7825     psDB            *dbh,               ///< Database handle
    7826     const p4bInputScfileRow *object    ///< Object to delete
     7626bool p4InputScfileDeleteObject(
     7627    psDB            *dbh,               ///< Database handle
     7628    const p4InputScfileRow *object    ///< Object to delete
    78277629);
    78287630/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    78347636 */
    78357637
    7836 long long p4bInputScfileDeleteRowObjects(
     7638long long p4InputScfileDeleteRowObjects(
    78377639    psDB            *dbh,               ///< Database handle
    78387640    const psArray   *objects,           ///< Array of objects to delete
    78397641    unsigned long long limit            ///< Maximum number of elements to delete
    78407642);
    7841 /** Formats and prints an array of p4bInputScfileRow objects
     7643/** Formats and prints an array of p4InputScfileRow objects
    78427644 *
    78437645 * When mdcf is set the formated output is in psMetadataConfig
     
    78477649 */
    78487650
    7849 bool p4bInputScfilePrintObjects(
     7651bool p4InputScfilePrintObjects(
    78507652    FILE            *stream,            ///< a stream
    7851     psArray         *objects,           ///< An array of p4bInputScfileRow objects
     7653    psArray         *objects,           ///< An array of p4InputScfileRow objects
    78527654    bool            mdcf                ///< format as mdconfig or simple
    78537655);
    7854 /** Formats and prints an p4bInputScfileRow object
     7656/** Formats and prints an p4InputScfileRow object
    78557657 *
    78567658 * When mdcf is set the formated output is in psMetadataConfig
     
    78607662 */
    78617663
    7862 bool p4bInputScfilePrintObject(
     7664bool p4InputScfilePrintObject(
    78637665    FILE            *stream,            ///< a stream
    7864     p4bInputScfileRow *object,    ///< an p4bInputScfileRow object
     7666    p4InputScfileRow *object,    ///< an p4InputScfileRow object
    78657667    bool            mdcf                ///< format as mdconfig or simple
    78667668);
    7867 /** p4bDiffScfileRow data structure
    7868  *
    7869  * Structure for representing a single row of p4bDiffScfile table data.
     7669/** p4DiffScfileRow data structure
     7670 *
     7671 * Structure for representing a single row of p4DiffScfile table data.
    78707672 */
    78717673
     
    78797681    psF64           bg;
    78807682    psF64           bg_mean_stdev;
    7881 } p4bDiffScfileRow;
    7882 
    7883 /** Creates a new p4bDiffScfileRow object
    7884  *
    7885  *  @return A new p4bDiffScfileRow object or NULL on failure.
    7886  */
    7887 
    7888 p4bDiffScfileRow *p4bDiffScfileRowAlloc(
     7683} p4DiffScfileRow;
     7684
     7685/** Creates a new p4DiffScfileRow object
     7686 *
     7687 *  @return A new p4DiffScfileRow object or NULL on failure.
     7688 */
     7689
     7690p4DiffScfileRow *p4DiffScfileRowAlloc(
    78897691    psS32           p4b_id,
    78907692    const char      *skycell_id,
     
    78977699);
    78987700
    7899 /** Creates a new p4bDiffScfile table
    7900  *
    7901  * @return true on success
    7902  */
    7903 
    7904 bool p4bDiffScfileCreateTable(
     7701/** Creates a new p4DiffScfile table
     7702 *
     7703 * @return true on success
     7704 */
     7705
     7706bool p4DiffScfileCreateTable(
    79057707    psDB            *dbh                ///< Database handle
    79067708);
    79077709
    7908 /** Deletes a p4bDiffScfile table
    7909  *
    7910  * @return true on success
    7911  */
    7912 
    7913 bool p4bDiffScfileDropTable(
     7710/** Deletes a p4DiffScfile table
     7711 *
     7712 * @return true on success
     7713 */
     7714
     7715bool p4DiffScfileDropTable(
    79147716    psDB            *dbh                ///< Database handle
    79157717);
     
    79227724 */
    79237725
    7924 bool p4bDiffScfileInsert(
     7726bool p4DiffScfileInsert(
    79257727    psDB            *dbh,               ///< Database handle
    79267728    psS32           p4b_id,
     
    79397741 */
    79407742
    7941 long long p4bDiffScfileDelete(
     7743long long p4DiffScfileDelete(
    79427744    psDB            *dbh,               ///< Database handle
    79437745    const psMetadata *where,            ///< Row match criteria
     
    79457747);
    79467748
    7947 /** Insert a single p4bDiffScfileRow object into a table
     7749/** Insert a single p4DiffScfileRow object into a table
    79487750 *
    79497751 * This function constructs and inserts a single row based on it's parameters.
     
    79527754 */
    79537755
    7954 bool p4bDiffScfileInsertObject(
    7955     psDB            *dbh,               ///< Database handle
    7956     p4bDiffScfileRow *object             ///< p4bDiffScfileRow object
    7957 );
    7958 
    7959 /** Insert an array of p4bDiffScfileRow object into a table
     7756bool p4DiffScfileInsertObject(
     7757    psDB            *dbh,               ///< Database handle
     7758    p4DiffScfileRow *object             ///< p4DiffScfileRow object
     7759);
     7760
     7761/** Insert an array of p4DiffScfileRow object into a table
    79607762 *
    79617763 * This function constructs and inserts multiple rows based on it's parameters.
     
    79647766 */
    79657767
    7966 bool p4bDiffScfileInsertObjects(
    7967     psDB            *dbh,               ///< Database handle
    7968     psArray         *objects            ///< array of p4bDiffScfileRow objects
    7969 );
    7970 
    7971 /** Insert data from a binary FITS table p4bDiffScfileRow into the database
     7768bool p4DiffScfileInsertObjects(
     7769    psDB            *dbh,               ///< Database handle
     7770    psArray         *objects            ///< array of p4DiffScfileRow objects
     7771);
     7772
     7773/** Insert data from a binary FITS table p4DiffScfileRow into the database
    79727774 *
    79737775 * This function expects a psFits object with a FITS table as the first
     
    79797781 */
    79807782
    7981 bool p4bDiffScfileInsertFits(
     7783bool p4DiffScfileInsertFits(
    79827784    psDB            *dbh,               ///< Database handle
    79837785    const psFits    *fits               ///< psFits object
     
    79947796 */
    79957797
    7996 bool p4bDiffScfileSelectRowsFits(
     7798bool p4DiffScfileSelectRowsFits(
    79977799    psDB            *dbh,               ///< Database handle
    79987800    psFits          *fits,              ///< psFits object
     
    80017803);
    80027804
    8003 /** Convert a p4bDiffScfileRow into an equivalent psMetadata
     7805/** Convert a p4DiffScfileRow into an equivalent psMetadata
    80047806 *
    80057807 * @return A psMetadata pointer or NULL on error
    80067808 */
    80077809
    8008 psMetadata *p4bDiffScfileMetadataFromObject(
    8009     const p4bDiffScfileRow *object             ///< fooRow to convert into a psMetadata
     7810psMetadata *p4DiffScfileMetadataFromObject(
     7811    const p4DiffScfileRow *object             ///< fooRow to convert into a psMetadata
    80107812);
    80117813
    80127814/** Convert a psMetadata into an equivalent fooRow
    80137815 *
    8014  * @return A p4bDiffScfileRow pointer or NULL on error
    8015  */
    8016 
    8017 p4bDiffScfileRow *p4bDiffScfileObjectFromMetadata(
     7816 * @return A p4DiffScfileRow pointer or NULL on error
     7817 */
     7818
     7819p4DiffScfileRow *p4DiffScfileObjectFromMetadata(
    80187820    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    80197821);
    8020 /** Selects up to limit rows from the database and returns as p4bDiffScfileRow objects in a psArray
     7822/** Selects up to limit rows from the database and returns as p4DiffScfileRow objects in a psArray
    80217823 *
    80227824 *  See psDBSelectRows() for documentation on the format of where.
     
    80257827 */
    80267828
    8027 psArray *p4bDiffScfileSelectRowObjects(
     7829psArray *p4DiffScfileSelectRowObjects(
    80287830    psDB            *dbh,               ///< Database handle
    80297831    const psMetadata *where,            ///< Row match criteria
    80307832    unsigned long long limit            ///< Maximum number of elements to return
    80317833);
    8032 /** Deletes a row from the database coresponding to an p4bDiffScfile
     7834/** Deletes a row from the database coresponding to an p4DiffScfile
    80337835 *
    80347836 *  Note that a 'where' search psMetadata is constructed from each object and
     
    80387840 */
    80397841
    8040 bool p4bDiffScfileDeleteObject(
    8041     psDB            *dbh,               ///< Database handle
    8042     const p4bDiffScfileRow *object    ///< Object to delete
     7842bool p4DiffScfileDeleteObject(
     7843    psDB            *dbh,               ///< Database handle
     7844    const p4DiffScfileRow *object    ///< Object to delete
    80437845);
    80447846/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    80507852 */
    80517853
    8052 long long p4bDiffScfileDeleteRowObjects(
     7854long long p4DiffScfileDeleteRowObjects(
    80537855    psDB            *dbh,               ///< Database handle
    80547856    const psArray   *objects,           ///< Array of objects to delete
    80557857    unsigned long long limit            ///< Maximum number of elements to delete
    80567858);
    8057 /** Formats and prints an array of p4bDiffScfileRow objects
     7859/** Formats and prints an array of p4DiffScfileRow objects
    80587860 *
    80597861 * When mdcf is set the formated output is in psMetadataConfig
     
    80637865 */
    80647866
    8065 bool p4bDiffScfilePrintObjects(
     7867bool p4DiffScfilePrintObjects(
    80667868    FILE            *stream,            ///< a stream
    8067     psArray         *objects,           ///< An array of p4bDiffScfileRow objects
     7869    psArray         *objects,           ///< An array of p4DiffScfileRow objects
    80687870    bool            mdcf                ///< format as mdconfig or simple
    80697871);
    8070 /** Formats and prints an p4bDiffScfileRow object
     7872/** Formats and prints an p4DiffScfileRow object
    80717873 *
    80727874 * When mdcf is set the formated output is in psMetadataConfig
     
    80767878 */
    80777879
    8078 bool p4bDiffScfilePrintObject(
     7880bool p4DiffScfilePrintObject(
    80797881    FILE            *stream,            ///< a stream
    8080     p4bDiffScfileRow *object,    ///< an p4bDiffScfileRow object
    8081     bool            mdcf                ///< format as mdconfig or simple
    8082 );
    8083 /** p4cRunRow data structure
    8084  *
    8085  * Structure for representing a single row of p4cRun table data.
    8086  */
    8087 
    8088 typedef struct {
    8089     psS32           p4c_id;
    8090     char            *state;
    8091     char            *workdir;
    8092     bool            magic;
    8093 } p4cRunRow;
    8094 
    8095 /** Creates a new p4cRunRow object
    8096  *
    8097  *  @return A new p4cRunRow object or NULL on failure.
    8098  */
    8099 
    8100 p4cRunRow *p4cRunRowAlloc(
    8101     psS32           p4c_id,
    8102     const char      *state,
    8103     const char      *workdir,
    8104     bool            magic
    8105 );
    8106 
    8107 /** Creates a new p4cRun table
    8108  *
    8109  * @return true on success
    8110  */
    8111 
    8112 bool p4cRunCreateTable(
    8113     psDB            *dbh                ///< Database handle
    8114 );
    8115 
    8116 /** Deletes a p4cRun table
    8117  *
    8118  * @return true on success
    8119  */
    8120 
    8121 bool p4cRunDropTable(
    8122     psDB            *dbh                ///< Database handle
    8123 );
    8124 
    8125 /** Insert a single row into a table
    8126  *
    8127  * This function constructs and inserts a single row based on it's parameters.
    8128  *
    8129  * @return true on success
    8130  */
    8131 
    8132 bool p4cRunInsert(
    8133     psDB            *dbh,               ///< Database handle
    8134     psS32           p4c_id,
    8135     const char      *state,
    8136     const char      *workdir,
    8137     bool            magic
    8138 );
    8139 
    8140 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    8141  *
    8142  * @return A The number of rows removed or a negative value on error
    8143  */
    8144 
    8145 long long p4cRunDelete(
    8146     psDB            *dbh,               ///< Database handle
    8147     const psMetadata *where,            ///< Row match criteria
    8148     unsigned long long limit            ///< Maximum number of elements to delete
    8149 );
    8150 
    8151 /** Insert a single p4cRunRow object into a table
    8152  *
    8153  * This function constructs and inserts a single row based on it's parameters.
    8154  *
    8155  * @return true on success
    8156  */
    8157 
    8158 bool p4cRunInsertObject(
    8159     psDB            *dbh,               ///< Database handle
    8160     p4cRunRow       *object             ///< p4cRunRow object
    8161 );
    8162 
    8163 /** Insert an array of p4cRunRow object into a table
    8164  *
    8165  * This function constructs and inserts multiple rows based on it's parameters.
    8166  *
    8167  * @return true on success
    8168  */
    8169 
    8170 bool p4cRunInsertObjects(
    8171     psDB            *dbh,               ///< Database handle
    8172     psArray         *objects            ///< array of p4cRunRow objects
    8173 );
    8174 
    8175 /** Insert data from a binary FITS table p4cRunRow into the database
    8176  *
    8177  * This function expects a psFits object with a FITS table as the first
    8178  * extension.  The table must have at least one row of data in it, that is of
    8179  * the appropriate format (number of columns and their type).  All other
    8180  * extensions are ignored.
    8181  *
    8182  * @return true on success
    8183  */
    8184 
    8185 bool p4cRunInsertFits(
    8186     psDB            *dbh,               ///< Database handle
    8187     const psFits    *fits               ///< psFits object
    8188 );
    8189 
    8190 /** Selects up to limit from the database and returns them in a binary FITS table
    8191  *
    8192  * This function assumes an empty psFits object and will create a FITS table
    8193  * as the first extension.
    8194  *
    8195  *  See psDBSelectRows() for documentation on the format of where.
    8196  *
    8197  * @return true on success
    8198  */
    8199 
    8200 bool p4cRunSelectRowsFits(
    8201     psDB            *dbh,               ///< Database handle
    8202     psFits          *fits,              ///< psFits object
    8203     const psMetadata *where,            ///< Row match criteria
    8204     unsigned long long limit            ///< Maximum number of elements to return
    8205 );
    8206 
    8207 /** Convert a p4cRunRow into an equivalent psMetadata
    8208  *
    8209  * @return A psMetadata pointer or NULL on error
    8210  */
    8211 
    8212 psMetadata *p4cRunMetadataFromObject(
    8213     const p4cRunRow *object             ///< fooRow to convert into a psMetadata
    8214 );
    8215 
    8216 /** Convert a psMetadata into an equivalent fooRow
    8217  *
    8218  * @return A p4cRunRow pointer or NULL on error
    8219  */
    8220 
    8221 p4cRunRow *p4cRunObjectFromMetadata(
    8222     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    8223 );
    8224 /** Selects up to limit rows from the database and returns as p4cRunRow objects in a psArray
    8225  *
    8226  *  See psDBSelectRows() for documentation on the format of where.
    8227  *
    8228  * @return A psArray pointer or NULL on error
    8229  */
    8230 
    8231 psArray *p4cRunSelectRowObjects(
    8232     psDB            *dbh,               ///< Database handle
    8233     const psMetadata *where,            ///< Row match criteria
    8234     unsigned long long limit            ///< Maximum number of elements to return
    8235 );
    8236 /** Deletes a row from the database coresponding to an p4cRun
    8237  *
    8238  *  Note that a 'where' search psMetadata is constructed from each object and
    8239  *  used to find rows to delete.
    8240  *
    8241  * @return A The number of rows removed or a negative value on error
    8242  */
    8243 
    8244 bool p4cRunDeleteObject(
    8245     psDB            *dbh,               ///< Database handle
    8246     const p4cRunRow *object    ///< Object to delete
    8247 );
    8248 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    8249  *
    8250  *  Note that a 'where' search psMetadata is constructed from each object and
    8251  *  used to find rows to delete.
    8252  *
    8253  * @return A The number of rows removed or a negative value on error
    8254  */
    8255 
    8256 long long p4cRunDeleteRowObjects(
    8257     psDB            *dbh,               ///< Database handle
    8258     const psArray   *objects,           ///< Array of objects to delete
    8259     unsigned long long limit            ///< Maximum number of elements to delete
    8260 );
    8261 /** Formats and prints an array of p4cRunRow objects
    8262  *
    8263  * When mdcf is set the formated output is in psMetadataConfig
    8264  * format, otherwise it is in a simple tabular format.
    8265  *
    8266  * @return true on success
    8267  */
    8268 
    8269 bool p4cRunPrintObjects(
    8270     FILE            *stream,            ///< a stream
    8271     psArray         *objects,           ///< An array of p4cRunRow objects
    8272     bool            mdcf                ///< format as mdconfig or simple
    8273 );
    8274 /** Formats and prints an p4cRunRow object
    8275  *
    8276  * When mdcf is set the formated output is in psMetadataConfig
    8277  * format, otherwise it is in a simple tabular format.
    8278  *
    8279  * @return true on success
    8280  */
    8281 
    8282 bool p4cRunPrintObject(
    8283     FILE            *stream,            ///< a stream
    8284     p4cRunRow *object,    ///< an p4cRunRow object
    8285     bool            mdcf                ///< format as mdconfig or simple
    8286 );
    8287 /** p4cInputExpRow data structure
    8288  *
    8289  * Structure for representing a single row of p4cInputExp table data.
    8290  */
    8291 
    8292 typedef struct {
    8293     psS32           p4c_id;
    8294     char            *exp_tag;
    8295     psS32           p3_version;
    8296 } p4cInputExpRow;
    8297 
    8298 /** Creates a new p4cInputExpRow object
    8299  *
    8300  *  @return A new p4cInputExpRow object or NULL on failure.
    8301  */
    8302 
    8303 p4cInputExpRow *p4cInputExpRowAlloc(
    8304     psS32           p4c_id,
    8305     const char      *exp_tag,
    8306     psS32           p3_version
    8307 );
    8308 
    8309 /** Creates a new p4cInputExp table
    8310  *
    8311  * @return true on success
    8312  */
    8313 
    8314 bool p4cInputExpCreateTable(
    8315     psDB            *dbh                ///< Database handle
    8316 );
    8317 
    8318 /** Deletes a p4cInputExp table
    8319  *
    8320  * @return true on success
    8321  */
    8322 
    8323 bool p4cInputExpDropTable(
    8324     psDB            *dbh                ///< Database handle
    8325 );
    8326 
    8327 /** Insert a single row into a table
    8328  *
    8329  * This function constructs and inserts a single row based on it's parameters.
    8330  *
    8331  * @return true on success
    8332  */
    8333 
    8334 bool p4cInputExpInsert(
    8335     psDB            *dbh,               ///< Database handle
    8336     psS32           p4c_id,
    8337     const char      *exp_tag,
    8338     psS32           p3_version
    8339 );
    8340 
    8341 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    8342  *
    8343  * @return A The number of rows removed or a negative value on error
    8344  */
    8345 
    8346 long long p4cInputExpDelete(
    8347     psDB            *dbh,               ///< Database handle
    8348     const psMetadata *where,            ///< Row match criteria
    8349     unsigned long long limit            ///< Maximum number of elements to delete
    8350 );
    8351 
    8352 /** Insert a single p4cInputExpRow object into a table
    8353  *
    8354  * This function constructs and inserts a single row based on it's parameters.
    8355  *
    8356  * @return true on success
    8357  */
    8358 
    8359 bool p4cInputExpInsertObject(
    8360     psDB            *dbh,               ///< Database handle
    8361     p4cInputExpRow  *object             ///< p4cInputExpRow object
    8362 );
    8363 
    8364 /** Insert an array of p4cInputExpRow object into a table
    8365  *
    8366  * This function constructs and inserts multiple rows based on it's parameters.
    8367  *
    8368  * @return true on success
    8369  */
    8370 
    8371 bool p4cInputExpInsertObjects(
    8372     psDB            *dbh,               ///< Database handle
    8373     psArray         *objects            ///< array of p4cInputExpRow objects
    8374 );
    8375 
    8376 /** Insert data from a binary FITS table p4cInputExpRow into the database
    8377  *
    8378  * This function expects a psFits object with a FITS table as the first
    8379  * extension.  The table must have at least one row of data in it, that is of
    8380  * the appropriate format (number of columns and their type).  All other
    8381  * extensions are ignored.
    8382  *
    8383  * @return true on success
    8384  */
    8385 
    8386 bool p4cInputExpInsertFits(
    8387     psDB            *dbh,               ///< Database handle
    8388     const psFits    *fits               ///< psFits object
    8389 );
    8390 
    8391 /** Selects up to limit from the database and returns them in a binary FITS table
    8392  *
    8393  * This function assumes an empty psFits object and will create a FITS table
    8394  * as the first extension.
    8395  *
    8396  *  See psDBSelectRows() for documentation on the format of where.
    8397  *
    8398  * @return true on success
    8399  */
    8400 
    8401 bool p4cInputExpSelectRowsFits(
    8402     psDB            *dbh,               ///< Database handle
    8403     psFits          *fits,              ///< psFits object
    8404     const psMetadata *where,            ///< Row match criteria
    8405     unsigned long long limit            ///< Maximum number of elements to return
    8406 );
    8407 
    8408 /** Convert a p4cInputExpRow into an equivalent psMetadata
    8409  *
    8410  * @return A psMetadata pointer or NULL on error
    8411  */
    8412 
    8413 psMetadata *p4cInputExpMetadataFromObject(
    8414     const p4cInputExpRow *object             ///< fooRow to convert into a psMetadata
    8415 );
    8416 
    8417 /** Convert a psMetadata into an equivalent fooRow
    8418  *
    8419  * @return A p4cInputExpRow pointer or NULL on error
    8420  */
    8421 
    8422 p4cInputExpRow *p4cInputExpObjectFromMetadata(
    8423     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    8424 );
    8425 /** Selects up to limit rows from the database and returns as p4cInputExpRow objects in a psArray
    8426  *
    8427  *  See psDBSelectRows() for documentation on the format of where.
    8428  *
    8429  * @return A psArray pointer or NULL on error
    8430  */
    8431 
    8432 psArray *p4cInputExpSelectRowObjects(
    8433     psDB            *dbh,               ///< Database handle
    8434     const psMetadata *where,            ///< Row match criteria
    8435     unsigned long long limit            ///< Maximum number of elements to return
    8436 );
    8437 /** Deletes a row from the database coresponding to an p4cInputExp
    8438  *
    8439  *  Note that a 'where' search psMetadata is constructed from each object and
    8440  *  used to find rows to delete.
    8441  *
    8442  * @return A The number of rows removed or a negative value on error
    8443  */
    8444 
    8445 bool p4cInputExpDeleteObject(
    8446     psDB            *dbh,               ///< Database handle
    8447     const p4cInputExpRow *object    ///< Object to delete
    8448 );
    8449 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    8450  *
    8451  *  Note that a 'where' search psMetadata is constructed from each object and
    8452  *  used to find rows to delete.
    8453  *
    8454  * @return A The number of rows removed or a negative value on error
    8455  */
    8456 
    8457 long long p4cInputExpDeleteRowObjects(
    8458     psDB            *dbh,               ///< Database handle
    8459     const psArray   *objects,           ///< Array of objects to delete
    8460     unsigned long long limit            ///< Maximum number of elements to delete
    8461 );
    8462 /** Formats and prints an array of p4cInputExpRow objects
    8463  *
    8464  * When mdcf is set the formated output is in psMetadataConfig
    8465  * format, otherwise it is in a simple tabular format.
    8466  *
    8467  * @return true on success
    8468  */
    8469 
    8470 bool p4cInputExpPrintObjects(
    8471     FILE            *stream,            ///< a stream
    8472     psArray         *objects,           ///< An array of p4cInputExpRow objects
    8473     bool            mdcf                ///< format as mdconfig or simple
    8474 );
    8475 /** Formats and prints an p4cInputExpRow object
    8476  *
    8477  * When mdcf is set the formated output is in psMetadataConfig
    8478  * format, otherwise it is in a simple tabular format.
    8479  *
    8480  * @return true on success
    8481  */
    8482 
    8483 bool p4cInputExpPrintObject(
    8484     FILE            *stream,            ///< a stream
    8485     p4cInputExpRow *object,    ///< an p4cInputExpRow object
     7882    p4DiffScfileRow *object,    ///< an p4DiffScfileRow object
    84867883    bool            mdcf                ///< format as mdconfig or simple
    84877884);
Note: See TracChangeset for help on using the changeset viewer.