IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 21, 2007, 4:25:34 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 1.1.27

File:
1 edited

Legend:

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

    r14451 r14598  
    2020/*
    2121 *
    22  * This file was generated by glueforge 1.03
     22 * This file was generated by glueforge 1.01
    2323 *
    2424 * Do NOT directly edit this file.
     
    769769    char            *class;
    770770    char            *class_id;
    771     psS64           exp_id;
    772771} pzPendingImfileRow;
    773772
     
    782781    const char      *telescope,
    783782    const char      *class,
    784     const char      *class_id,
    785     psS64           exp_id
     783    const char      *class_id
    786784);
    787785
     
    817815    const char      *telescope,
    818816    const char      *class,
    819     const char      *class_id,
    820     psS64           exp_id
     817    const char      *class_id
    821818);
    822819
     
    11801177    char            *class;
    11811178    char            *class_id;
    1182     psS64           exp_id;
    11831179    char            *uri;
    11841180} pzDoneImfileRow;
     
    11951191    const char      *class,
    11961192    const char      *class_id,
    1197     psS64           exp_id,
    11981193    const char      *uri
    11991194);
     
    12311226    const char      *class,
    12321227    const char      *class_id,
    1233     psS64           exp_id,
    12341228    const char      *uri
    12351229);
     
    45394533    psF64           bg;
    45404534    psF64           bg_stdev;
     4535    psF64           pixel_fill;
    45414536    psS16           fault;
    45424537} warpSkyfileRow;
     
    45554550    psF64           bg,
    45564551    psF64           bg_stdev,
     4552    psF64           pixel_fill,
    45574553    psS16           fault
    45584554);
     
    45924588    psF64           bg,
    45934589    psF64           bg_stdev,
     4590    psF64           pixel_fill,
    45944591    psS16           fault
    45954592);
     
    88528849    bool            mdcf                ///< format as mdconfig or simple
    88538850);
     8851/** magicRunRow data structure
     8852 *
     8853 * Structure for representing a single row of magicRun table data.
     8854 */
     8855
     8856typedef struct {
     8857    psS64           magic_id;
     8858    char            *state;
     8859    char            *workdir;
     8860    char            *workdir_state;
     8861    char            *label;
     8862    char            *dvodb;
     8863    psTime*         registered;
     8864} magicRunRow;
     8865
     8866/** Creates a new magicRunRow object
     8867 *
     8868 *  @return A new magicRunRow object or NULL on failure.
     8869 */
     8870
     8871magicRunRow *magicRunRowAlloc(
     8872    psS64           magic_id,
     8873    const char      *state,
     8874    const char      *workdir,
     8875    const char      *workdir_state,
     8876    const char      *label,
     8877    const char      *dvodb,
     8878    psTime*         registered
     8879);
     8880
     8881/** Creates a new magicRun table
     8882 *
     8883 * @return true on success
     8884 */
     8885
     8886bool magicRunCreateTable(
     8887    psDB            *dbh                ///< Database handle
     8888);
     8889
     8890/** Deletes a magicRun table
     8891 *
     8892 * @return true on success
     8893 */
     8894
     8895bool magicRunDropTable(
     8896    psDB            *dbh                ///< Database handle
     8897);
     8898
     8899/** Insert a single row into a table
     8900 *
     8901 * This function constructs and inserts a single row based on it's parameters.
     8902 *
     8903 * @return true on success
     8904 */
     8905
     8906bool magicRunInsert(
     8907    psDB            *dbh,               ///< Database handle
     8908    psS64           magic_id,
     8909    const char      *state,
     8910    const char      *workdir,
     8911    const char      *workdir_state,
     8912    const char      *label,
     8913    const char      *dvodb,
     8914    psTime*         registered
     8915);
     8916
     8917/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     8918 *
     8919 * @return A The number of rows removed or a negative value on error
     8920 */
     8921
     8922long long magicRunDelete(
     8923    psDB            *dbh,               ///< Database handle
     8924    const psMetadata *where,            ///< Row match criteria
     8925    unsigned long long limit            ///< Maximum number of elements to delete
     8926);
     8927
     8928/** Insert a single magicRunRow object into a table
     8929 *
     8930 * This function constructs and inserts a single row based on it's parameters.
     8931 *
     8932 * @return true on success
     8933 */
     8934
     8935bool magicRunInsertObject(
     8936    psDB            *dbh,               ///< Database handle
     8937    magicRunRow     *object             ///< magicRunRow object
     8938);
     8939
     8940/** Insert an array of magicRunRow object into a table
     8941 *
     8942 * This function constructs and inserts multiple rows based on it's parameters.
     8943 *
     8944 * @return true on success
     8945 */
     8946
     8947bool magicRunInsertObjects(
     8948    psDB            *dbh,               ///< Database handle
     8949    psArray         *objects            ///< array of magicRunRow objects
     8950);
     8951
     8952/** Insert data from a binary FITS table magicRunRow into the database
     8953 *
     8954 * This function expects a psFits object with a FITS table as the first
     8955 * extension.  The table must have at least one row of data in it, that is of
     8956 * the appropriate format (number of columns and their type).  All other
     8957 * extensions are ignored.
     8958 *
     8959 * @return true on success
     8960 */
     8961
     8962bool magicRunInsertFits(
     8963    psDB            *dbh,               ///< Database handle
     8964    const psFits    *fits               ///< psFits object
     8965);
     8966
     8967/** Selects up to limit from the database and returns them in a binary FITS table
     8968 *
     8969 * This function assumes an empty psFits object and will create a FITS table
     8970 * as the first extension.
     8971 *
     8972 *  See psDBSelectRows() for documentation on the format of where.
     8973 *
     8974 * @return true on success
     8975 */
     8976
     8977bool magicRunSelectRowsFits(
     8978    psDB            *dbh,               ///< Database handle
     8979    psFits          *fits,              ///< psFits object
     8980    const psMetadata *where,            ///< Row match criteria
     8981    unsigned long long limit            ///< Maximum number of elements to return
     8982);
     8983
     8984/** Convert a magicRunRow into an equivalent psMetadata
     8985 *
     8986 * @return A psMetadata pointer or NULL on error
     8987 */
     8988
     8989psMetadata *magicRunMetadataFromObject(
     8990    const magicRunRow *object             ///< fooRow to convert into a psMetadata
     8991);
     8992
     8993/** Convert a psMetadata into an equivalent fooRow
     8994 *
     8995 * @return A magicRunRow pointer or NULL on error
     8996 */
     8997
     8998magicRunRow *magicRunObjectFromMetadata(
     8999    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     9000);
     9001/** Selects up to limit rows from the database and returns as magicRunRow objects in a psArray
     9002 *
     9003 *  See psDBSelectRows() for documentation on the format of where.
     9004 *
     9005 * @return A psArray pointer or NULL on error
     9006 */
     9007
     9008psArray *magicRunSelectRowObjects(
     9009    psDB            *dbh,               ///< Database handle
     9010    const psMetadata *where,            ///< Row match criteria
     9011    unsigned long long limit            ///< Maximum number of elements to return
     9012);
     9013/** Deletes a row from the database coresponding to an magicRun
     9014 *
     9015 *  Note that a 'where' search psMetadata is constructed from each object and
     9016 *  used to find rows to delete.
     9017 *
     9018 * @return A The number of rows removed or a negative value on error
     9019 */
     9020
     9021bool magicRunDeleteObject(
     9022    psDB            *dbh,               ///< Database handle
     9023    const magicRunRow *object    ///< Object to delete
     9024);
     9025/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     9026 *
     9027 *  Note that a 'where' search psMetadata is constructed from each object and
     9028 *  used to find rows to delete.
     9029 *
     9030 * @return A The number of rows removed or a negative value on error
     9031 */
     9032
     9033long long magicRunDeleteRowObjects(
     9034    psDB            *dbh,               ///< Database handle
     9035    const psArray   *objects,           ///< Array of objects to delete
     9036    unsigned long long limit            ///< Maximum number of elements to delete
     9037);
     9038/** Formats and prints an array of magicRunRow objects
     9039 *
     9040 * When mdcf is set the formated output is in psMetadataConfig
     9041 * format, otherwise it is in a simple tabular format.
     9042 *
     9043 * @return true on success
     9044 */
     9045
     9046bool magicRunPrintObjects(
     9047    FILE            *stream,            ///< a stream
     9048    psArray         *objects,           ///< An array of magicRunRow objects
     9049    bool            mdcf                ///< format as mdconfig or simple
     9050);
     9051/** Formats and prints an magicRunRow object
     9052 *
     9053 * When mdcf is set the formated output is in psMetadataConfig
     9054 * format, otherwise it is in a simple tabular format.
     9055 *
     9056 * @return true on success
     9057 */
     9058
     9059bool magicRunPrintObject(
     9060    FILE            *stream,            ///< a stream
     9061    magicRunRow *object,    ///< an magicRunRow object
     9062    bool            mdcf                ///< format as mdconfig or simple
     9063);
     9064/** magicInputSkyfileRow data structure
     9065 *
     9066 * Structure for representing a single row of magicInputSkyfile table data.
     9067 */
     9068
     9069typedef struct {
     9070    psS64           magic_id;
     9071    psS64           diff_id;
     9072    psS32           node;
     9073} magicInputSkyfileRow;
     9074
     9075/** Creates a new magicInputSkyfileRow object
     9076 *
     9077 *  @return A new magicInputSkyfileRow object or NULL on failure.
     9078 */
     9079
     9080magicInputSkyfileRow *magicInputSkyfileRowAlloc(
     9081    psS64           magic_id,
     9082    psS64           diff_id,
     9083    psS32           node
     9084);
     9085
     9086/** Creates a new magicInputSkyfile table
     9087 *
     9088 * @return true on success
     9089 */
     9090
     9091bool magicInputSkyfileCreateTable(
     9092    psDB            *dbh                ///< Database handle
     9093);
     9094
     9095/** Deletes a magicInputSkyfile table
     9096 *
     9097 * @return true on success
     9098 */
     9099
     9100bool magicInputSkyfileDropTable(
     9101    psDB            *dbh                ///< Database handle
     9102);
     9103
     9104/** Insert a single row into a table
     9105 *
     9106 * This function constructs and inserts a single row based on it's parameters.
     9107 *
     9108 * @return true on success
     9109 */
     9110
     9111bool magicInputSkyfileInsert(
     9112    psDB            *dbh,               ///< Database handle
     9113    psS64           magic_id,
     9114    psS64           diff_id,
     9115    psS32           node
     9116);
     9117
     9118/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     9119 *
     9120 * @return A The number of rows removed or a negative value on error
     9121 */
     9122
     9123long long magicInputSkyfileDelete(
     9124    psDB            *dbh,               ///< Database handle
     9125    const psMetadata *where,            ///< Row match criteria
     9126    unsigned long long limit            ///< Maximum number of elements to delete
     9127);
     9128
     9129/** Insert a single magicInputSkyfileRow object into a table
     9130 *
     9131 * This function constructs and inserts a single row based on it's parameters.
     9132 *
     9133 * @return true on success
     9134 */
     9135
     9136bool magicInputSkyfileInsertObject(
     9137    psDB            *dbh,               ///< Database handle
     9138    magicInputSkyfileRow *object             ///< magicInputSkyfileRow object
     9139);
     9140
     9141/** Insert an array of magicInputSkyfileRow object into a table
     9142 *
     9143 * This function constructs and inserts multiple rows based on it's parameters.
     9144 *
     9145 * @return true on success
     9146 */
     9147
     9148bool magicInputSkyfileInsertObjects(
     9149    psDB            *dbh,               ///< Database handle
     9150    psArray         *objects            ///< array of magicInputSkyfileRow objects
     9151);
     9152
     9153/** Insert data from a binary FITS table magicInputSkyfileRow into the database
     9154 *
     9155 * This function expects a psFits object with a FITS table as the first
     9156 * extension.  The table must have at least one row of data in it, that is of
     9157 * the appropriate format (number of columns and their type).  All other
     9158 * extensions are ignored.
     9159 *
     9160 * @return true on success
     9161 */
     9162
     9163bool magicInputSkyfileInsertFits(
     9164    psDB            *dbh,               ///< Database handle
     9165    const psFits    *fits               ///< psFits object
     9166);
     9167
     9168/** Selects up to limit from the database and returns them in a binary FITS table
     9169 *
     9170 * This function assumes an empty psFits object and will create a FITS table
     9171 * as the first extension.
     9172 *
     9173 *  See psDBSelectRows() for documentation on the format of where.
     9174 *
     9175 * @return true on success
     9176 */
     9177
     9178bool magicInputSkyfileSelectRowsFits(
     9179    psDB            *dbh,               ///< Database handle
     9180    psFits          *fits,              ///< psFits object
     9181    const psMetadata *where,            ///< Row match criteria
     9182    unsigned long long limit            ///< Maximum number of elements to return
     9183);
     9184
     9185/** Convert a magicInputSkyfileRow into an equivalent psMetadata
     9186 *
     9187 * @return A psMetadata pointer or NULL on error
     9188 */
     9189
     9190psMetadata *magicInputSkyfileMetadataFromObject(
     9191    const magicInputSkyfileRow *object             ///< fooRow to convert into a psMetadata
     9192);
     9193
     9194/** Convert a psMetadata into an equivalent fooRow
     9195 *
     9196 * @return A magicInputSkyfileRow pointer or NULL on error
     9197 */
     9198
     9199magicInputSkyfileRow *magicInputSkyfileObjectFromMetadata(
     9200    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     9201);
     9202/** Selects up to limit rows from the database and returns as magicInputSkyfileRow objects in a psArray
     9203 *
     9204 *  See psDBSelectRows() for documentation on the format of where.
     9205 *
     9206 * @return A psArray pointer or NULL on error
     9207 */
     9208
     9209psArray *magicInputSkyfileSelectRowObjects(
     9210    psDB            *dbh,               ///< Database handle
     9211    const psMetadata *where,            ///< Row match criteria
     9212    unsigned long long limit            ///< Maximum number of elements to return
     9213);
     9214/** Deletes a row from the database coresponding to an magicInputSkyfile
     9215 *
     9216 *  Note that a 'where' search psMetadata is constructed from each object and
     9217 *  used to find rows to delete.
     9218 *
     9219 * @return A The number of rows removed or a negative value on error
     9220 */
     9221
     9222bool magicInputSkyfileDeleteObject(
     9223    psDB            *dbh,               ///< Database handle
     9224    const magicInputSkyfileRow *object    ///< Object to delete
     9225);
     9226/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     9227 *
     9228 *  Note that a 'where' search psMetadata is constructed from each object and
     9229 *  used to find rows to delete.
     9230 *
     9231 * @return A The number of rows removed or a negative value on error
     9232 */
     9233
     9234long long magicInputSkyfileDeleteRowObjects(
     9235    psDB            *dbh,               ///< Database handle
     9236    const psArray   *objects,           ///< Array of objects to delete
     9237    unsigned long long limit            ///< Maximum number of elements to delete
     9238);
     9239/** Formats and prints an array of magicInputSkyfileRow objects
     9240 *
     9241 * When mdcf is set the formated output is in psMetadataConfig
     9242 * format, otherwise it is in a simple tabular format.
     9243 *
     9244 * @return true on success
     9245 */
     9246
     9247bool magicInputSkyfilePrintObjects(
     9248    FILE            *stream,            ///< a stream
     9249    psArray         *objects,           ///< An array of magicInputSkyfileRow objects
     9250    bool            mdcf                ///< format as mdconfig or simple
     9251);
     9252/** Formats and prints an magicInputSkyfileRow object
     9253 *
     9254 * When mdcf is set the formated output is in psMetadataConfig
     9255 * format, otherwise it is in a simple tabular format.
     9256 *
     9257 * @return true on success
     9258 */
     9259
     9260bool magicInputSkyfilePrintObject(
     9261    FILE            *stream,            ///< a stream
     9262    magicInputSkyfileRow *object,    ///< an magicInputSkyfileRow object
     9263    bool            mdcf                ///< format as mdconfig or simple
     9264);
     9265/** magicTreeRow data structure
     9266 *
     9267 * Structure for representing a single row of magicTree table data.
     9268 */
     9269
     9270typedef struct {
     9271    psS64           magic_id;
     9272    char            *node;
     9273    char            *dep;
     9274} magicTreeRow;
     9275
     9276/** Creates a new magicTreeRow object
     9277 *
     9278 *  @return A new magicTreeRow object or NULL on failure.
     9279 */
     9280
     9281magicTreeRow *magicTreeRowAlloc(
     9282    psS64           magic_id,
     9283    const char      *node,
     9284    const char      *dep
     9285);
     9286
     9287/** Creates a new magicTree table
     9288 *
     9289 * @return true on success
     9290 */
     9291
     9292bool magicTreeCreateTable(
     9293    psDB            *dbh                ///< Database handle
     9294);
     9295
     9296/** Deletes a magicTree table
     9297 *
     9298 * @return true on success
     9299 */
     9300
     9301bool magicTreeDropTable(
     9302    psDB            *dbh                ///< Database handle
     9303);
     9304
     9305/** Insert a single row into a table
     9306 *
     9307 * This function constructs and inserts a single row based on it's parameters.
     9308 *
     9309 * @return true on success
     9310 */
     9311
     9312bool magicTreeInsert(
     9313    psDB            *dbh,               ///< Database handle
     9314    psS64           magic_id,
     9315    const char      *node,
     9316    const char      *dep
     9317);
     9318
     9319/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     9320 *
     9321 * @return A The number of rows removed or a negative value on error
     9322 */
     9323
     9324long long magicTreeDelete(
     9325    psDB            *dbh,               ///< Database handle
     9326    const psMetadata *where,            ///< Row match criteria
     9327    unsigned long long limit            ///< Maximum number of elements to delete
     9328);
     9329
     9330/** Insert a single magicTreeRow object into a table
     9331 *
     9332 * This function constructs and inserts a single row based on it's parameters.
     9333 *
     9334 * @return true on success
     9335 */
     9336
     9337bool magicTreeInsertObject(
     9338    psDB            *dbh,               ///< Database handle
     9339    magicTreeRow    *object             ///< magicTreeRow object
     9340);
     9341
     9342/** Insert an array of magicTreeRow object into a table
     9343 *
     9344 * This function constructs and inserts multiple rows based on it's parameters.
     9345 *
     9346 * @return true on success
     9347 */
     9348
     9349bool magicTreeInsertObjects(
     9350    psDB            *dbh,               ///< Database handle
     9351    psArray         *objects            ///< array of magicTreeRow objects
     9352);
     9353
     9354/** Insert data from a binary FITS table magicTreeRow into the database
     9355 *
     9356 * This function expects a psFits object with a FITS table as the first
     9357 * extension.  The table must have at least one row of data in it, that is of
     9358 * the appropriate format (number of columns and their type).  All other
     9359 * extensions are ignored.
     9360 *
     9361 * @return true on success
     9362 */
     9363
     9364bool magicTreeInsertFits(
     9365    psDB            *dbh,               ///< Database handle
     9366    const psFits    *fits               ///< psFits object
     9367);
     9368
     9369/** Selects up to limit from the database and returns them in a binary FITS table
     9370 *
     9371 * This function assumes an empty psFits object and will create a FITS table
     9372 * as the first extension.
     9373 *
     9374 *  See psDBSelectRows() for documentation on the format of where.
     9375 *
     9376 * @return true on success
     9377 */
     9378
     9379bool magicTreeSelectRowsFits(
     9380    psDB            *dbh,               ///< Database handle
     9381    psFits          *fits,              ///< psFits object
     9382    const psMetadata *where,            ///< Row match criteria
     9383    unsigned long long limit            ///< Maximum number of elements to return
     9384);
     9385
     9386/** Convert a magicTreeRow into an equivalent psMetadata
     9387 *
     9388 * @return A psMetadata pointer or NULL on error
     9389 */
     9390
     9391psMetadata *magicTreeMetadataFromObject(
     9392    const magicTreeRow *object             ///< fooRow to convert into a psMetadata
     9393);
     9394
     9395/** Convert a psMetadata into an equivalent fooRow
     9396 *
     9397 * @return A magicTreeRow pointer or NULL on error
     9398 */
     9399
     9400magicTreeRow *magicTreeObjectFromMetadata(
     9401    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     9402);
     9403/** Selects up to limit rows from the database and returns as magicTreeRow objects in a psArray
     9404 *
     9405 *  See psDBSelectRows() for documentation on the format of where.
     9406 *
     9407 * @return A psArray pointer or NULL on error
     9408 */
     9409
     9410psArray *magicTreeSelectRowObjects(
     9411    psDB            *dbh,               ///< Database handle
     9412    const psMetadata *where,            ///< Row match criteria
     9413    unsigned long long limit            ///< Maximum number of elements to return
     9414);
     9415/** Deletes a row from the database coresponding to an magicTree
     9416 *
     9417 *  Note that a 'where' search psMetadata is constructed from each object and
     9418 *  used to find rows to delete.
     9419 *
     9420 * @return A The number of rows removed or a negative value on error
     9421 */
     9422
     9423bool magicTreeDeleteObject(
     9424    psDB            *dbh,               ///< Database handle
     9425    const magicTreeRow *object    ///< Object to delete
     9426);
     9427/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     9428 *
     9429 *  Note that a 'where' search psMetadata is constructed from each object and
     9430 *  used to find rows to delete.
     9431 *
     9432 * @return A The number of rows removed or a negative value on error
     9433 */
     9434
     9435long long magicTreeDeleteRowObjects(
     9436    psDB            *dbh,               ///< Database handle
     9437    const psArray   *objects,           ///< Array of objects to delete
     9438    unsigned long long limit            ///< Maximum number of elements to delete
     9439);
     9440/** Formats and prints an array of magicTreeRow objects
     9441 *
     9442 * When mdcf is set the formated output is in psMetadataConfig
     9443 * format, otherwise it is in a simple tabular format.
     9444 *
     9445 * @return true on success
     9446 */
     9447
     9448bool magicTreePrintObjects(
     9449    FILE            *stream,            ///< a stream
     9450    psArray         *objects,           ///< An array of magicTreeRow objects
     9451    bool            mdcf                ///< format as mdconfig or simple
     9452);
     9453/** Formats and prints an magicTreeRow object
     9454 *
     9455 * When mdcf is set the formated output is in psMetadataConfig
     9456 * format, otherwise it is in a simple tabular format.
     9457 *
     9458 * @return true on success
     9459 */
     9460
     9461bool magicTreePrintObject(
     9462    FILE            *stream,            ///< a stream
     9463    magicTreeRow *object,    ///< an magicTreeRow object
     9464    bool            mdcf                ///< format as mdconfig or simple
     9465);
     9466/** magicNodeResultRow data structure
     9467 *
     9468 * Structure for representing a single row of magicNodeResult table data.
     9469 */
     9470
     9471typedef struct {
     9472    psS64           magic_id;
     9473    char            *node;
     9474    char            *uri;
     9475} magicNodeResultRow;
     9476
     9477/** Creates a new magicNodeResultRow object
     9478 *
     9479 *  @return A new magicNodeResultRow object or NULL on failure.
     9480 */
     9481
     9482magicNodeResultRow *magicNodeResultRowAlloc(
     9483    psS64           magic_id,
     9484    const char      *node,
     9485    const char      *uri
     9486);
     9487
     9488/** Creates a new magicNodeResult table
     9489 *
     9490 * @return true on success
     9491 */
     9492
     9493bool magicNodeResultCreateTable(
     9494    psDB            *dbh                ///< Database handle
     9495);
     9496
     9497/** Deletes a magicNodeResult table
     9498 *
     9499 * @return true on success
     9500 */
     9501
     9502bool magicNodeResultDropTable(
     9503    psDB            *dbh                ///< Database handle
     9504);
     9505
     9506/** Insert a single row into a table
     9507 *
     9508 * This function constructs and inserts a single row based on it's parameters.
     9509 *
     9510 * @return true on success
     9511 */
     9512
     9513bool magicNodeResultInsert(
     9514    psDB            *dbh,               ///< Database handle
     9515    psS64           magic_id,
     9516    const char      *node,
     9517    const char      *uri
     9518);
     9519
     9520/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     9521 *
     9522 * @return A The number of rows removed or a negative value on error
     9523 */
     9524
     9525long long magicNodeResultDelete(
     9526    psDB            *dbh,               ///< Database handle
     9527    const psMetadata *where,            ///< Row match criteria
     9528    unsigned long long limit            ///< Maximum number of elements to delete
     9529);
     9530
     9531/** Insert a single magicNodeResultRow object into a table
     9532 *
     9533 * This function constructs and inserts a single row based on it's parameters.
     9534 *
     9535 * @return true on success
     9536 */
     9537
     9538bool magicNodeResultInsertObject(
     9539    psDB            *dbh,               ///< Database handle
     9540    magicNodeResultRow *object             ///< magicNodeResultRow object
     9541);
     9542
     9543/** Insert an array of magicNodeResultRow object into a table
     9544 *
     9545 * This function constructs and inserts multiple rows based on it's parameters.
     9546 *
     9547 * @return true on success
     9548 */
     9549
     9550bool magicNodeResultInsertObjects(
     9551    psDB            *dbh,               ///< Database handle
     9552    psArray         *objects            ///< array of magicNodeResultRow objects
     9553);
     9554
     9555/** Insert data from a binary FITS table magicNodeResultRow into the database
     9556 *
     9557 * This function expects a psFits object with a FITS table as the first
     9558 * extension.  The table must have at least one row of data in it, that is of
     9559 * the appropriate format (number of columns and their type).  All other
     9560 * extensions are ignored.
     9561 *
     9562 * @return true on success
     9563 */
     9564
     9565bool magicNodeResultInsertFits(
     9566    psDB            *dbh,               ///< Database handle
     9567    const psFits    *fits               ///< psFits object
     9568);
     9569
     9570/** Selects up to limit from the database and returns them in a binary FITS table
     9571 *
     9572 * This function assumes an empty psFits object and will create a FITS table
     9573 * as the first extension.
     9574 *
     9575 *  See psDBSelectRows() for documentation on the format of where.
     9576 *
     9577 * @return true on success
     9578 */
     9579
     9580bool magicNodeResultSelectRowsFits(
     9581    psDB            *dbh,               ///< Database handle
     9582    psFits          *fits,              ///< psFits object
     9583    const psMetadata *where,            ///< Row match criteria
     9584    unsigned long long limit            ///< Maximum number of elements to return
     9585);
     9586
     9587/** Convert a magicNodeResultRow into an equivalent psMetadata
     9588 *
     9589 * @return A psMetadata pointer or NULL on error
     9590 */
     9591
     9592psMetadata *magicNodeResultMetadataFromObject(
     9593    const magicNodeResultRow *object             ///< fooRow to convert into a psMetadata
     9594);
     9595
     9596/** Convert a psMetadata into an equivalent fooRow
     9597 *
     9598 * @return A magicNodeResultRow pointer or NULL on error
     9599 */
     9600
     9601magicNodeResultRow *magicNodeResultObjectFromMetadata(
     9602    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     9603);
     9604/** Selects up to limit rows from the database and returns as magicNodeResultRow objects in a psArray
     9605 *
     9606 *  See psDBSelectRows() for documentation on the format of where.
     9607 *
     9608 * @return A psArray pointer or NULL on error
     9609 */
     9610
     9611psArray *magicNodeResultSelectRowObjects(
     9612    psDB            *dbh,               ///< Database handle
     9613    const psMetadata *where,            ///< Row match criteria
     9614    unsigned long long limit            ///< Maximum number of elements to return
     9615);
     9616/** Deletes a row from the database coresponding to an magicNodeResult
     9617 *
     9618 *  Note that a 'where' search psMetadata is constructed from each object and
     9619 *  used to find rows to delete.
     9620 *
     9621 * @return A The number of rows removed or a negative value on error
     9622 */
     9623
     9624bool magicNodeResultDeleteObject(
     9625    psDB            *dbh,               ///< Database handle
     9626    const magicNodeResultRow *object    ///< Object to delete
     9627);
     9628/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     9629 *
     9630 *  Note that a 'where' search psMetadata is constructed from each object and
     9631 *  used to find rows to delete.
     9632 *
     9633 * @return A The number of rows removed or a negative value on error
     9634 */
     9635
     9636long long magicNodeResultDeleteRowObjects(
     9637    psDB            *dbh,               ///< Database handle
     9638    const psArray   *objects,           ///< Array of objects to delete
     9639    unsigned long long limit            ///< Maximum number of elements to delete
     9640);
     9641/** Formats and prints an array of magicNodeResultRow objects
     9642 *
     9643 * When mdcf is set the formated output is in psMetadataConfig
     9644 * format, otherwise it is in a simple tabular format.
     9645 *
     9646 * @return true on success
     9647 */
     9648
     9649bool magicNodeResultPrintObjects(
     9650    FILE            *stream,            ///< a stream
     9651    psArray         *objects,           ///< An array of magicNodeResultRow objects
     9652    bool            mdcf                ///< format as mdconfig or simple
     9653);
     9654/** Formats and prints an magicNodeResultRow object
     9655 *
     9656 * When mdcf is set the formated output is in psMetadataConfig
     9657 * format, otherwise it is in a simple tabular format.
     9658 *
     9659 * @return true on success
     9660 */
     9661
     9662bool magicNodeResultPrintObject(
     9663    FILE            *stream,            ///< a stream
     9664    magicNodeResultRow *object,    ///< an magicNodeResultRow object
     9665    bool            mdcf                ///< format as mdconfig or simple
     9666);
     9667/** magicMaskRow data structure
     9668 *
     9669 * Structure for representing a single row of magicMask table data.
     9670 */
     9671
     9672typedef struct {
     9673    psS64           magic_id;
     9674    char            *uri;
     9675} magicMaskRow;
     9676
     9677/** Creates a new magicMaskRow object
     9678 *
     9679 *  @return A new magicMaskRow object or NULL on failure.
     9680 */
     9681
     9682magicMaskRow *magicMaskRowAlloc(
     9683    psS64           magic_id,
     9684    const char      *uri
     9685);
     9686
     9687/** Creates a new magicMask table
     9688 *
     9689 * @return true on success
     9690 */
     9691
     9692bool magicMaskCreateTable(
     9693    psDB            *dbh                ///< Database handle
     9694);
     9695
     9696/** Deletes a magicMask table
     9697 *
     9698 * @return true on success
     9699 */
     9700
     9701bool magicMaskDropTable(
     9702    psDB            *dbh                ///< Database handle
     9703);
     9704
     9705/** Insert a single row into a table
     9706 *
     9707 * This function constructs and inserts a single row based on it's parameters.
     9708 *
     9709 * @return true on success
     9710 */
     9711
     9712bool magicMaskInsert(
     9713    psDB            *dbh,               ///< Database handle
     9714    psS64           magic_id,
     9715    const char      *uri
     9716);
     9717
     9718/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     9719 *
     9720 * @return A The number of rows removed or a negative value on error
     9721 */
     9722
     9723long long magicMaskDelete(
     9724    psDB            *dbh,               ///< Database handle
     9725    const psMetadata *where,            ///< Row match criteria
     9726    unsigned long long limit            ///< Maximum number of elements to delete
     9727);
     9728
     9729/** Insert a single magicMaskRow object into a table
     9730 *
     9731 * This function constructs and inserts a single row based on it's parameters.
     9732 *
     9733 * @return true on success
     9734 */
     9735
     9736bool magicMaskInsertObject(
     9737    psDB            *dbh,               ///< Database handle
     9738    magicMaskRow    *object             ///< magicMaskRow object
     9739);
     9740
     9741/** Insert an array of magicMaskRow object into a table
     9742 *
     9743 * This function constructs and inserts multiple rows based on it's parameters.
     9744 *
     9745 * @return true on success
     9746 */
     9747
     9748bool magicMaskInsertObjects(
     9749    psDB            *dbh,               ///< Database handle
     9750    psArray         *objects            ///< array of magicMaskRow objects
     9751);
     9752
     9753/** Insert data from a binary FITS table magicMaskRow into the database
     9754 *
     9755 * This function expects a psFits object with a FITS table as the first
     9756 * extension.  The table must have at least one row of data in it, that is of
     9757 * the appropriate format (number of columns and their type).  All other
     9758 * extensions are ignored.
     9759 *
     9760 * @return true on success
     9761 */
     9762
     9763bool magicMaskInsertFits(
     9764    psDB            *dbh,               ///< Database handle
     9765    const psFits    *fits               ///< psFits object
     9766);
     9767
     9768/** Selects up to limit from the database and returns them in a binary FITS table
     9769 *
     9770 * This function assumes an empty psFits object and will create a FITS table
     9771 * as the first extension.
     9772 *
     9773 *  See psDBSelectRows() for documentation on the format of where.
     9774 *
     9775 * @return true on success
     9776 */
     9777
     9778bool magicMaskSelectRowsFits(
     9779    psDB            *dbh,               ///< Database handle
     9780    psFits          *fits,              ///< psFits object
     9781    const psMetadata *where,            ///< Row match criteria
     9782    unsigned long long limit            ///< Maximum number of elements to return
     9783);
     9784
     9785/** Convert a magicMaskRow into an equivalent psMetadata
     9786 *
     9787 * @return A psMetadata pointer or NULL on error
     9788 */
     9789
     9790psMetadata *magicMaskMetadataFromObject(
     9791    const magicMaskRow *object             ///< fooRow to convert into a psMetadata
     9792);
     9793
     9794/** Convert a psMetadata into an equivalent fooRow
     9795 *
     9796 * @return A magicMaskRow pointer or NULL on error
     9797 */
     9798
     9799magicMaskRow *magicMaskObjectFromMetadata(
     9800    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     9801);
     9802/** Selects up to limit rows from the database and returns as magicMaskRow objects in a psArray
     9803 *
     9804 *  See psDBSelectRows() for documentation on the format of where.
     9805 *
     9806 * @return A psArray pointer or NULL on error
     9807 */
     9808
     9809psArray *magicMaskSelectRowObjects(
     9810    psDB            *dbh,               ///< Database handle
     9811    const psMetadata *where,            ///< Row match criteria
     9812    unsigned long long limit            ///< Maximum number of elements to return
     9813);
     9814/** Deletes a row from the database coresponding to an magicMask
     9815 *
     9816 *  Note that a 'where' search psMetadata is constructed from each object and
     9817 *  used to find rows to delete.
     9818 *
     9819 * @return A The number of rows removed or a negative value on error
     9820 */
     9821
     9822bool magicMaskDeleteObject(
     9823    psDB            *dbh,               ///< Database handle
     9824    const magicMaskRow *object    ///< Object to delete
     9825);
     9826/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     9827 *
     9828 *  Note that a 'where' search psMetadata is constructed from each object and
     9829 *  used to find rows to delete.
     9830 *
     9831 * @return A The number of rows removed or a negative value on error
     9832 */
     9833
     9834long long magicMaskDeleteRowObjects(
     9835    psDB            *dbh,               ///< Database handle
     9836    const psArray   *objects,           ///< Array of objects to delete
     9837    unsigned long long limit            ///< Maximum number of elements to delete
     9838);
     9839/** Formats and prints an array of magicMaskRow objects
     9840 *
     9841 * When mdcf is set the formated output is in psMetadataConfig
     9842 * format, otherwise it is in a simple tabular format.
     9843 *
     9844 * @return true on success
     9845 */
     9846
     9847bool magicMaskPrintObjects(
     9848    FILE            *stream,            ///< a stream
     9849    psArray         *objects,           ///< An array of magicMaskRow objects
     9850    bool            mdcf                ///< format as mdconfig or simple
     9851);
     9852/** Formats and prints an magicMaskRow object
     9853 *
     9854 * When mdcf is set the formated output is in psMetadataConfig
     9855 * format, otherwise it is in a simple tabular format.
     9856 *
     9857 * @return true on success
     9858 */
     9859
     9860bool magicMaskPrintObject(
     9861    FILE            *stream,            ///< a stream
     9862    magicMaskRow *object,    ///< an magicMaskRow object
     9863    bool            mdcf                ///< format as mdconfig or simple
     9864);
    88549865
    88559866/// @}
     
    88599870#endif
    88609871
    8861 #endif // DETREGISTEREDIMFILE_DB_H
     9872#endif // MAGICMASK_DB_H
Note: See TracChangeset for help on using the changeset viewer.