IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2007, 5:58:26 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 1.1.7

File:
1 edited

Legend:

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

    r11809 r11820  
    20182018    psF64           posang;
    20192019    char            *object;
     2020    psF32           solang;
    20202021    psS16           fault;
    20212022} rawExpRow;
     
    20482049    psF64           posang,
    20492050    const char      *object,
     2051    psF32           solang,
    20502052    psS16           fault
    20512053);
     
    20992101    psF64           posang,
    21002102    const char      *object,
     2103    psF32           solang,
    21012104    psS16           fault
    21022105);
     
    44174420    psTime*         use_begin;
    44184421    psTime*         use_end;
     4422    psF32           solang_min;
     4423    psF32           solang_max;
     4424    char            *label;
     4425    psS32           parent;
    44194426} detRunRow;
    44204427
     
    44474454    psTime*         time_end,
    44484455    psTime*         use_begin,
    4449     psTime*         use_end
     4456    psTime*         use_end,
     4457    psF32           solang_min,
     4458    psF32           solang_max,
     4459    const char      *label,
     4460    psS32           parent
    44504461);
    44514462
     
    44994510    psTime*         time_end,
    45004511    psTime*         use_begin,
    4501     psTime*         use_end
     4512    psTime*         use_end,
     4513    psF32           solang_min,
     4514    psF32           solang_max,
     4515    const char      *label,
     4516    psS32           parent
    45024517);
    45034518
     
    78817896    char            *skycell_id;
    78827897    char            *tess_id;
    7883     char            *exp_tag;
    7884     psS32           p3_version;
    78857898    char            *kind;
    78867899    bool            template;
     
    78977910    const char      *skycell_id,
    78987911    const char      *tess_id,
    7899     const char      *exp_tag,
    7900     psS32           p3_version,
    79017912    const char      *kind,
    79027913    bool            template
     
    79347945    const char      *skycell_id,
    79357946    const char      *tess_id,
    7936     const char      *exp_tag,
    7937     psS32           p3_version,
    79387947    const char      *kind,
    79397948    bool            template
     
    82978306    bool            mdcf                ///< format as mdconfig or simple
    82988307);
     8308/** p6RunRow data structure
     8309 *
     8310 * Structure for representing a single row of p6Run table data.
     8311 */
     8312
     8313typedef struct {
     8314    psS32           p6_id;
     8315    char            *state;
     8316    char            *workdir;
     8317    psTime*         registered;
     8318} p6RunRow;
     8319
     8320/** Creates a new p6RunRow object
     8321 *
     8322 *  @return A new p6RunRow object or NULL on failure.
     8323 */
     8324
     8325p6RunRow *p6RunRowAlloc(
     8326    psS32           p6_id,
     8327    const char      *state,
     8328    const char      *workdir,
     8329    psTime*         registered
     8330);
     8331
     8332/** Creates a new p6Run table
     8333 *
     8334 * @return true on success
     8335 */
     8336
     8337bool p6RunCreateTable(
     8338    psDB            *dbh                ///< Database handle
     8339);
     8340
     8341/** Deletes a p6Run table
     8342 *
     8343 * @return true on success
     8344 */
     8345
     8346bool p6RunDropTable(
     8347    psDB            *dbh                ///< Database handle
     8348);
     8349
     8350/** Insert a single row into a table
     8351 *
     8352 * This function constructs and inserts a single row based on it's parameters.
     8353 *
     8354 * @return true on success
     8355 */
     8356
     8357bool p6RunInsert(
     8358    psDB            *dbh,               ///< Database handle
     8359    psS32           p6_id,
     8360    const char      *state,
     8361    const char      *workdir,
     8362    psTime*         registered
     8363);
     8364
     8365/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     8366 *
     8367 * @return A The number of rows removed or a negative value on error
     8368 */
     8369
     8370long long p6RunDelete(
     8371    psDB            *dbh,               ///< Database handle
     8372    const psMetadata *where,            ///< Row match criteria
     8373    unsigned long long limit            ///< Maximum number of elements to delete
     8374);
     8375
     8376/** Insert a single p6RunRow object into a table
     8377 *
     8378 * This function constructs and inserts a single row based on it's parameters.
     8379 *
     8380 * @return true on success
     8381 */
     8382
     8383bool p6RunInsertObject(
     8384    psDB            *dbh,               ///< Database handle
     8385    p6RunRow        *object             ///< p6RunRow object
     8386);
     8387
     8388/** Insert an array of p6RunRow object into a table
     8389 *
     8390 * This function constructs and inserts multiple rows based on it's parameters.
     8391 *
     8392 * @return true on success
     8393 */
     8394
     8395bool p6RunInsertObjects(
     8396    psDB            *dbh,               ///< Database handle
     8397    psArray         *objects            ///< array of p6RunRow objects
     8398);
     8399
     8400/** Insert data from a binary FITS table p6RunRow into the database
     8401 *
     8402 * This function expects a psFits object with a FITS table as the first
     8403 * extension.  The table must have at least one row of data in it, that is of
     8404 * the appropriate format (number of columns and their type).  All other
     8405 * extensions are ignored.
     8406 *
     8407 * @return true on success
     8408 */
     8409
     8410bool p6RunInsertFits(
     8411    psDB            *dbh,               ///< Database handle
     8412    const psFits    *fits               ///< psFits object
     8413);
     8414
     8415/** Selects up to limit from the database and returns them in a binary FITS table
     8416 *
     8417 * This function assumes an empty psFits object and will create a FITS table
     8418 * as the first extension.
     8419 *
     8420 *  See psDBSelectRows() for documentation on the format of where.
     8421 *
     8422 * @return true on success
     8423 */
     8424
     8425bool p6RunSelectRowsFits(
     8426    psDB            *dbh,               ///< Database handle
     8427    psFits          *fits,              ///< psFits object
     8428    const psMetadata *where,            ///< Row match criteria
     8429    unsigned long long limit            ///< Maximum number of elements to return
     8430);
     8431
     8432/** Convert a p6RunRow into an equivalent psMetadata
     8433 *
     8434 * @return A psMetadata pointer or NULL on error
     8435 */
     8436
     8437psMetadata *p6RunMetadataFromObject(
     8438    const p6RunRow  *object             ///< fooRow to convert into a psMetadata
     8439);
     8440
     8441/** Convert a psMetadata into an equivalent fooRow
     8442 *
     8443 * @return A p6RunRow pointer or NULL on error
     8444 */
     8445
     8446p6RunRow *p6RunObjectFromMetadata(
     8447    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     8448);
     8449/** Selects up to limit rows from the database and returns as p6RunRow objects in a psArray
     8450 *
     8451 *  See psDBSelectRows() for documentation on the format of where.
     8452 *
     8453 * @return A psArray pointer or NULL on error
     8454 */
     8455
     8456psArray *p6RunSelectRowObjects(
     8457    psDB            *dbh,               ///< Database handle
     8458    const psMetadata *where,            ///< Row match criteria
     8459    unsigned long long limit            ///< Maximum number of elements to return
     8460);
     8461/** Deletes a row from the database coresponding to an p6Run
     8462 *
     8463 *  Note that a 'where' search psMetadata is constructed from each object and
     8464 *  used to find rows to delete.
     8465 *
     8466 * @return A The number of rows removed or a negative value on error
     8467 */
     8468
     8469bool p6RunDeleteObject(
     8470    psDB            *dbh,               ///< Database handle
     8471    const p6RunRow *object    ///< Object to delete
     8472);
     8473/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     8474 *
     8475 *  Note that a 'where' search psMetadata is constructed from each object and
     8476 *  used to find rows to delete.
     8477 *
     8478 * @return A The number of rows removed or a negative value on error
     8479 */
     8480
     8481long long p6RunDeleteRowObjects(
     8482    psDB            *dbh,               ///< Database handle
     8483    const psArray   *objects,           ///< Array of objects to delete
     8484    unsigned long long limit            ///< Maximum number of elements to delete
     8485);
     8486/** Formats and prints an array of p6RunRow objects
     8487 *
     8488 * When mdcf is set the formated output is in psMetadataConfig
     8489 * format, otherwise it is in a simple tabular format.
     8490 *
     8491 * @return true on success
     8492 */
     8493
     8494bool p6RunPrintObjects(
     8495    FILE            *stream,            ///< a stream
     8496    psArray         *objects,           ///< An array of p6RunRow objects
     8497    bool            mdcf                ///< format as mdconfig or simple
     8498);
     8499/** Formats and prints an p6RunRow object
     8500 *
     8501 * When mdcf is set the formated output is in psMetadataConfig
     8502 * format, otherwise it is in a simple tabular format.
     8503 *
     8504 * @return true on success
     8505 */
     8506
     8507bool p6RunPrintObject(
     8508    FILE            *stream,            ///< a stream
     8509    p6RunRow *object,    ///< an p6RunRow object
     8510    bool            mdcf                ///< format as mdconfig or simple
     8511);
    82998512
    83008513/// @}
     
    83048517#endif
    83058518
    8306 #endif // P5DIFFSCFILE_DB_H
     8519#endif // P6RUN_DB_H
Note: See TracChangeset for help on using the changeset viewer.