Changeset 9788 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Oct 30, 2006, 11:55:36 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r9783 r9788 2985 2985 psS32 p2_version; 2986 2986 psS32 p3_version; 2987 char *label; 2987 2988 } p3PendingExpRow; 2988 2989 … … 2995 2996 const char *exp_tag, 2996 2997 psS32 p2_version, 2997 psS32 p3_version 2998 psS32 p3_version, 2999 const char *label 2998 3000 ); 2999 3001 … … 3027 3029 const char *exp_tag, 3028 3030 psS32 p2_version, 3029 psS32 p3_version 3031 psS32 p3_version, 3032 const char *label 3030 3033 ); 3031 3034 … … 3185 3188 psS32 p2_version; 3186 3189 psS32 p3_version; 3190 char *label; 3187 3191 } p3ProcessedExpRow; 3188 3192 … … 3207 3211 psF32 zp_stdev, 3208 3212 psS32 p2_version, 3209 psS32 p3_version 3213 psS32 p3_version, 3214 const char *label 3210 3215 ); 3211 3216 … … 3251 3256 psF32 zp_stdev, 3252 3257 psS32 p2_version, 3253 psS32 p3_version 3258 psS32 p3_version, 3259 const char *label 3254 3260 ); 3255 3261 … … 3386 3392 FILE *stream, ///< a stream 3387 3393 psArray *objects, ///< An array of p3ProcessedExpRow objects 3394 bool mdcf ///< format as mdconfig or simple 3395 ); 3396 /** p3MaskRow data structure 3397 * 3398 * Structure for representing a single row of p3Mask table data. 3399 */ 3400 3401 typedef struct { 3402 char *label; 3403 } p3MaskRow; 3404 3405 /** Creates a new p3MaskRow object 3406 * 3407 * @return A new p3MaskRow object or NULL on failure. 3408 */ 3409 3410 p3MaskRow *p3MaskRowAlloc( 3411 const char *label 3412 ); 3413 3414 /** Creates a new p3Mask table 3415 * 3416 * @return true on success 3417 */ 3418 3419 bool p3MaskCreateTable( 3420 psDB *dbh ///< Database handle 3421 ); 3422 3423 /** Deletes a p3Mask table 3424 * 3425 * @return true on success 3426 */ 3427 3428 bool p3MaskDropTable( 3429 psDB *dbh ///< Database handle 3430 ); 3431 3432 /** Insert a single row into a table 3433 * 3434 * This function constructs and inserts a single row based on it's parameters. 3435 * 3436 * @return true on success 3437 */ 3438 3439 bool p3MaskInsert( 3440 psDB *dbh, ///< Database handle 3441 const char *label 3442 ); 3443 3444 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 3445 * 3446 * @return A The number of rows removed or a negative value on error 3447 */ 3448 3449 long long p3MaskDelete( 3450 psDB *dbh, ///< Database handle 3451 const psMetadata *where, ///< Row match criteria 3452 unsigned long long limit ///< Maximum number of elements to delete 3453 ); 3454 3455 /** Insert a single p3MaskRow object into a table 3456 * 3457 * This function constructs and inserts a single row based on it's parameters. 3458 * 3459 * @return true on success 3460 */ 3461 3462 bool p3MaskInsertObject( 3463 psDB *dbh, ///< Database handle 3464 p3MaskRow *object ///< p3MaskRow object 3465 ); 3466 3467 /** Insert an array of p3MaskRow object into a table 3468 * 3469 * This function constructs and inserts multiple rows based on it's parameters. 3470 * 3471 * @return true on success 3472 */ 3473 3474 bool p3MaskInsertObjects( 3475 psDB *dbh, ///< Database handle 3476 psArray *objects ///< array of p3MaskRow objects 3477 ); 3478 3479 /** Insert data from a binary FITS table p3MaskRow into the database 3480 * 3481 * This function expects a psFits object with a FITS table as the first 3482 * extension. The table must have at least one row of data in it, that is of 3483 * the appropriate format (number of columns and their type). All other 3484 * extensions are ignored. 3485 * 3486 * @return true on success 3487 */ 3488 3489 bool p3MaskInsertFits( 3490 psDB *dbh, ///< Database handle 3491 const psFits *fits ///< psFits object 3492 ); 3493 3494 /** Selects up to limit from the database and returns them in a binary FITS table 3495 * 3496 * This function assumes an empty psFits object and will create a FITS table 3497 * as the first extension. 3498 * 3499 * See psDBSelectRows() for documentation on the format of where. 3500 * 3501 * @return true on success 3502 */ 3503 3504 bool p3MaskSelectRowsFits( 3505 psDB *dbh, ///< Database handle 3506 psFits *fits, ///< psFits object 3507 const psMetadata *where, ///< Row match criteria 3508 unsigned long long limit ///< Maximum number of elements to return 3509 ); 3510 3511 /** Convert a p3MaskRow into an equivalent psMetadata 3512 * 3513 * @return A psMetadata pointer or NULL on error 3514 */ 3515 3516 psMetadata *p3MaskMetadataFromObject( 3517 const p3MaskRow *object ///< fooRow to convert into a psMetadata 3518 ); 3519 3520 /** Convert a psMetadata into an equivalent fooRow 3521 * 3522 * @return A p3MaskRow pointer or NULL on error 3523 */ 3524 3525 p3MaskRow *p3MaskObjectFromMetadata( 3526 psMetadata *md ///< psMetadata to convert into a fooRow 3527 ); 3528 /** Selects up to limit rows from the database and returns as p3MaskRow objects in a psArray 3529 * 3530 * See psDBSelectRows() for documentation on the format of where. 3531 * 3532 * @return A psArray pointer or NULL on error 3533 */ 3534 3535 psArray *p3MaskSelectRowObjects( 3536 psDB *dbh, ///< Database handle 3537 const psMetadata *where, ///< Row match criteria 3538 unsigned long long limit ///< Maximum number of elements to return 3539 ); 3540 /** Deletes a row from the database coresponding to an p3Mask 3541 * 3542 * Note that a 'where' search psMetadata is constructed from each object and 3543 * used to find rows to delete. 3544 * 3545 * @return A The number of rows removed or a negative value on error 3546 */ 3547 3548 bool p3MaskDeleteObject( 3549 psDB *dbh, ///< Database handle 3550 const p3MaskRow *object ///< Object to delete 3551 ); 3552 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 3553 * 3554 * Note that a 'where' search psMetadata is constructed from each object and 3555 * used to find rows to delete. 3556 * 3557 * @return A The number of rows removed or a negative value on error 3558 */ 3559 3560 long long p3MaskDeleteRowObjects( 3561 psDB *dbh, ///< Database handle 3562 const psArray *objects, ///< Array of objects to delete 3563 unsigned long long limit ///< Maximum number of elements to delete 3564 ); 3565 /** Formats and prints an array of p3MaskRow objects 3566 * 3567 * When mdcf is set the formated output is in psMetadataConfig 3568 * format, otherwise it is in a simple tabular format. 3569 * 3570 * @return true on success 3571 */ 3572 3573 bool p3MaskPrintObjects( 3574 FILE *stream, ///< a stream 3575 psArray *objects, ///< An array of p3MaskRow objects 3388 3576 bool mdcf ///< format as mdconfig or simple 3389 3577 );
Note:
See TracChangeset
for help on using the changeset viewer.
