IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 16, 2007, 4:42:59 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 1.1.8

File:
1 edited

Legend:

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

    r11820 r11867  
    85108510    bool            mdcf                ///< format as mdconfig or simple
    85118511);
     8512/** p6InputScfileRow data structure
     8513 *
     8514 * Structure for representing a single row of p6InputScfile table data.
     8515 */
     8516
     8517typedef struct {
     8518    psS32           p6_id;
     8519    psS32           p4_id;
     8520    char            *skycell_id;
     8521    char            *tess_id;
     8522} p6InputScfileRow;
     8523
     8524/** Creates a new p6InputScfileRow object
     8525 *
     8526 *  @return A new p6InputScfileRow object or NULL on failure.
     8527 */
     8528
     8529p6InputScfileRow *p6InputScfileRowAlloc(
     8530    psS32           p6_id,
     8531    psS32           p4_id,
     8532    const char      *skycell_id,
     8533    const char      *tess_id
     8534);
     8535
     8536/** Creates a new p6InputScfile table
     8537 *
     8538 * @return true on success
     8539 */
     8540
     8541bool p6InputScfileCreateTable(
     8542    psDB            *dbh                ///< Database handle
     8543);
     8544
     8545/** Deletes a p6InputScfile table
     8546 *
     8547 * @return true on success
     8548 */
     8549
     8550bool p6InputScfileDropTable(
     8551    psDB            *dbh                ///< Database handle
     8552);
     8553
     8554/** Insert a single row into a table
     8555 *
     8556 * This function constructs and inserts a single row based on it's parameters.
     8557 *
     8558 * @return true on success
     8559 */
     8560
     8561bool p6InputScfileInsert(
     8562    psDB            *dbh,               ///< Database handle
     8563    psS32           p6_id,
     8564    psS32           p4_id,
     8565    const char      *skycell_id,
     8566    const char      *tess_id
     8567);
     8568
     8569/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     8570 *
     8571 * @return A The number of rows removed or a negative value on error
     8572 */
     8573
     8574long long p6InputScfileDelete(
     8575    psDB            *dbh,               ///< Database handle
     8576    const psMetadata *where,            ///< Row match criteria
     8577    unsigned long long limit            ///< Maximum number of elements to delete
     8578);
     8579
     8580/** Insert a single p6InputScfileRow object into a table
     8581 *
     8582 * This function constructs and inserts a single row based on it's parameters.
     8583 *
     8584 * @return true on success
     8585 */
     8586
     8587bool p6InputScfileInsertObject(
     8588    psDB            *dbh,               ///< Database handle
     8589    p6InputScfileRow *object             ///< p6InputScfileRow object
     8590);
     8591
     8592/** Insert an array of p6InputScfileRow object into a table
     8593 *
     8594 * This function constructs and inserts multiple rows based on it's parameters.
     8595 *
     8596 * @return true on success
     8597 */
     8598
     8599bool p6InputScfileInsertObjects(
     8600    psDB            *dbh,               ///< Database handle
     8601    psArray         *objects            ///< array of p6InputScfileRow objects
     8602);
     8603
     8604/** Insert data from a binary FITS table p6InputScfileRow into the database
     8605 *
     8606 * This function expects a psFits object with a FITS table as the first
     8607 * extension.  The table must have at least one row of data in it, that is of
     8608 * the appropriate format (number of columns and their type).  All other
     8609 * extensions are ignored.
     8610 *
     8611 * @return true on success
     8612 */
     8613
     8614bool p6InputScfileInsertFits(
     8615    psDB            *dbh,               ///< Database handle
     8616    const psFits    *fits               ///< psFits object
     8617);
     8618
     8619/** Selects up to limit from the database and returns them in a binary FITS table
     8620 *
     8621 * This function assumes an empty psFits object and will create a FITS table
     8622 * as the first extension.
     8623 *
     8624 *  See psDBSelectRows() for documentation on the format of where.
     8625 *
     8626 * @return true on success
     8627 */
     8628
     8629bool p6InputScfileSelectRowsFits(
     8630    psDB            *dbh,               ///< Database handle
     8631    psFits          *fits,              ///< psFits object
     8632    const psMetadata *where,            ///< Row match criteria
     8633    unsigned long long limit            ///< Maximum number of elements to return
     8634);
     8635
     8636/** Convert a p6InputScfileRow into an equivalent psMetadata
     8637 *
     8638 * @return A psMetadata pointer or NULL on error
     8639 */
     8640
     8641psMetadata *p6InputScfileMetadataFromObject(
     8642    const p6InputScfileRow *object             ///< fooRow to convert into a psMetadata
     8643);
     8644
     8645/** Convert a psMetadata into an equivalent fooRow
     8646 *
     8647 * @return A p6InputScfileRow pointer or NULL on error
     8648 */
     8649
     8650p6InputScfileRow *p6InputScfileObjectFromMetadata(
     8651    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     8652);
     8653/** Selects up to limit rows from the database and returns as p6InputScfileRow objects in a psArray
     8654 *
     8655 *  See psDBSelectRows() for documentation on the format of where.
     8656 *
     8657 * @return A psArray pointer or NULL on error
     8658 */
     8659
     8660psArray *p6InputScfileSelectRowObjects(
     8661    psDB            *dbh,               ///< Database handle
     8662    const psMetadata *where,            ///< Row match criteria
     8663    unsigned long long limit            ///< Maximum number of elements to return
     8664);
     8665/** Deletes a row from the database coresponding to an p6InputScfile
     8666 *
     8667 *  Note that a 'where' search psMetadata is constructed from each object and
     8668 *  used to find rows to delete.
     8669 *
     8670 * @return A The number of rows removed or a negative value on error
     8671 */
     8672
     8673bool p6InputScfileDeleteObject(
     8674    psDB            *dbh,               ///< Database handle
     8675    const p6InputScfileRow *object    ///< Object to delete
     8676);
     8677/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     8678 *
     8679 *  Note that a 'where' search psMetadata is constructed from each object and
     8680 *  used to find rows to delete.
     8681 *
     8682 * @return A The number of rows removed or a negative value on error
     8683 */
     8684
     8685long long p6InputScfileDeleteRowObjects(
     8686    psDB            *dbh,               ///< Database handle
     8687    const psArray   *objects,           ///< Array of objects to delete
     8688    unsigned long long limit            ///< Maximum number of elements to delete
     8689);
     8690/** Formats and prints an array of p6InputScfileRow objects
     8691 *
     8692 * When mdcf is set the formated output is in psMetadataConfig
     8693 * format, otherwise it is in a simple tabular format.
     8694 *
     8695 * @return true on success
     8696 */
     8697
     8698bool p6InputScfilePrintObjects(
     8699    FILE            *stream,            ///< a stream
     8700    psArray         *objects,           ///< An array of p6InputScfileRow objects
     8701    bool            mdcf                ///< format as mdconfig or simple
     8702);
     8703/** Formats and prints an p6InputScfileRow object
     8704 *
     8705 * When mdcf is set the formated output is in psMetadataConfig
     8706 * format, otherwise it is in a simple tabular format.
     8707 *
     8708 * @return true on success
     8709 */
     8710
     8711bool p6InputScfilePrintObject(
     8712    FILE            *stream,            ///< a stream
     8713    p6InputScfileRow *object,    ///< an p6InputScfileRow object
     8714    bool            mdcf                ///< format as mdconfig or simple
     8715);
     8716/** p6SumScfileRow data structure
     8717 *
     8718 * Structure for representing a single row of p6SumScfile table data.
     8719 */
     8720
     8721typedef struct {
     8722    psS32           p6_id;
     8723    char            *skycell_id;
     8724    char            *tess_id;
     8725    char            *uri;
     8726    psF64           bg;
     8727    psF64           bg_mean_stdev;
     8728} p6SumScfileRow;
     8729
     8730/** Creates a new p6SumScfileRow object
     8731 *
     8732 *  @return A new p6SumScfileRow object or NULL on failure.
     8733 */
     8734
     8735p6SumScfileRow *p6SumScfileRowAlloc(
     8736    psS32           p6_id,
     8737    const char      *skycell_id,
     8738    const char      *tess_id,
     8739    const char      *uri,
     8740    psF64           bg,
     8741    psF64           bg_mean_stdev
     8742);
     8743
     8744/** Creates a new p6SumScfile table
     8745 *
     8746 * @return true on success
     8747 */
     8748
     8749bool p6SumScfileCreateTable(
     8750    psDB            *dbh                ///< Database handle
     8751);
     8752
     8753/** Deletes a p6SumScfile table
     8754 *
     8755 * @return true on success
     8756 */
     8757
     8758bool p6SumScfileDropTable(
     8759    psDB            *dbh                ///< Database handle
     8760);
     8761
     8762/** Insert a single row into a table
     8763 *
     8764 * This function constructs and inserts a single row based on it's parameters.
     8765 *
     8766 * @return true on success
     8767 */
     8768
     8769bool p6SumScfileInsert(
     8770    psDB            *dbh,               ///< Database handle
     8771    psS32           p6_id,
     8772    const char      *skycell_id,
     8773    const char      *tess_id,
     8774    const char      *uri,
     8775    psF64           bg,
     8776    psF64           bg_mean_stdev
     8777);
     8778
     8779/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     8780 *
     8781 * @return A The number of rows removed or a negative value on error
     8782 */
     8783
     8784long long p6SumScfileDelete(
     8785    psDB            *dbh,               ///< Database handle
     8786    const psMetadata *where,            ///< Row match criteria
     8787    unsigned long long limit            ///< Maximum number of elements to delete
     8788);
     8789
     8790/** Insert a single p6SumScfileRow object into a table
     8791 *
     8792 * This function constructs and inserts a single row based on it's parameters.
     8793 *
     8794 * @return true on success
     8795 */
     8796
     8797bool p6SumScfileInsertObject(
     8798    psDB            *dbh,               ///< Database handle
     8799    p6SumScfileRow  *object             ///< p6SumScfileRow object
     8800);
     8801
     8802/** Insert an array of p6SumScfileRow object into a table
     8803 *
     8804 * This function constructs and inserts multiple rows based on it's parameters.
     8805 *
     8806 * @return true on success
     8807 */
     8808
     8809bool p6SumScfileInsertObjects(
     8810    psDB            *dbh,               ///< Database handle
     8811    psArray         *objects            ///< array of p6SumScfileRow objects
     8812);
     8813
     8814/** Insert data from a binary FITS table p6SumScfileRow into the database
     8815 *
     8816 * This function expects a psFits object with a FITS table as the first
     8817 * extension.  The table must have at least one row of data in it, that is of
     8818 * the appropriate format (number of columns and their type).  All other
     8819 * extensions are ignored.
     8820 *
     8821 * @return true on success
     8822 */
     8823
     8824bool p6SumScfileInsertFits(
     8825    psDB            *dbh,               ///< Database handle
     8826    const psFits    *fits               ///< psFits object
     8827);
     8828
     8829/** Selects up to limit from the database and returns them in a binary FITS table
     8830 *
     8831 * This function assumes an empty psFits object and will create a FITS table
     8832 * as the first extension.
     8833 *
     8834 *  See psDBSelectRows() for documentation on the format of where.
     8835 *
     8836 * @return true on success
     8837 */
     8838
     8839bool p6SumScfileSelectRowsFits(
     8840    psDB            *dbh,               ///< Database handle
     8841    psFits          *fits,              ///< psFits object
     8842    const psMetadata *where,            ///< Row match criteria
     8843    unsigned long long limit            ///< Maximum number of elements to return
     8844);
     8845
     8846/** Convert a p6SumScfileRow into an equivalent psMetadata
     8847 *
     8848 * @return A psMetadata pointer or NULL on error
     8849 */
     8850
     8851psMetadata *p6SumScfileMetadataFromObject(
     8852    const p6SumScfileRow *object             ///< fooRow to convert into a psMetadata
     8853);
     8854
     8855/** Convert a psMetadata into an equivalent fooRow
     8856 *
     8857 * @return A p6SumScfileRow pointer or NULL on error
     8858 */
     8859
     8860p6SumScfileRow *p6SumScfileObjectFromMetadata(
     8861    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     8862);
     8863/** Selects up to limit rows from the database and returns as p6SumScfileRow objects in a psArray
     8864 *
     8865 *  See psDBSelectRows() for documentation on the format of where.
     8866 *
     8867 * @return A psArray pointer or NULL on error
     8868 */
     8869
     8870psArray *p6SumScfileSelectRowObjects(
     8871    psDB            *dbh,               ///< Database handle
     8872    const psMetadata *where,            ///< Row match criteria
     8873    unsigned long long limit            ///< Maximum number of elements to return
     8874);
     8875/** Deletes a row from the database coresponding to an p6SumScfile
     8876 *
     8877 *  Note that a 'where' search psMetadata is constructed from each object and
     8878 *  used to find rows to delete.
     8879 *
     8880 * @return A The number of rows removed or a negative value on error
     8881 */
     8882
     8883bool p6SumScfileDeleteObject(
     8884    psDB            *dbh,               ///< Database handle
     8885    const p6SumScfileRow *object    ///< Object to delete
     8886);
     8887/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     8888 *
     8889 *  Note that a 'where' search psMetadata is constructed from each object and
     8890 *  used to find rows to delete.
     8891 *
     8892 * @return A The number of rows removed or a negative value on error
     8893 */
     8894
     8895long long p6SumScfileDeleteRowObjects(
     8896    psDB            *dbh,               ///< Database handle
     8897    const psArray   *objects,           ///< Array of objects to delete
     8898    unsigned long long limit            ///< Maximum number of elements to delete
     8899);
     8900/** Formats and prints an array of p6SumScfileRow objects
     8901 *
     8902 * When mdcf is set the formated output is in psMetadataConfig
     8903 * format, otherwise it is in a simple tabular format.
     8904 *
     8905 * @return true on success
     8906 */
     8907
     8908bool p6SumScfilePrintObjects(
     8909    FILE            *stream,            ///< a stream
     8910    psArray         *objects,           ///< An array of p6SumScfileRow objects
     8911    bool            mdcf                ///< format as mdconfig or simple
     8912);
     8913/** Formats and prints an p6SumScfileRow object
     8914 *
     8915 * When mdcf is set the formated output is in psMetadataConfig
     8916 * format, otherwise it is in a simple tabular format.
     8917 *
     8918 * @return true on success
     8919 */
     8920
     8921bool p6SumScfilePrintObject(
     8922    FILE            *stream,            ///< a stream
     8923    p6SumScfileRow *object,    ///< an p6SumScfileRow object
     8924    bool            mdcf                ///< format as mdconfig or simple
     8925);
    85128926
    85138927/// @}
     
    85178931#endif
    85188932
    8519 #endif // P6RUN_DB_H
     8933#endif // P6SUMSCFILE_DB_H
Note: See TracChangeset for help on using the changeset viewer.