Changeset 17144 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Mar 25, 2008, 1:14:07 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r17142 r17144 4580 4580 bool mdcf ///< format as mdconfig or simple 4581 4581 ); 4582 /** warpMaskRow data structure 4583 * 4584 * Structure for representing a single row of warpMask table data. 4585 */ 4586 4587 typedef struct { 4588 char *label; 4589 } warpMaskRow; 4590 4591 /** Creates a new warpMaskRow object 4592 * 4593 * @return A new warpMaskRow object or NULL on failure. 4594 */ 4595 4596 warpMaskRow *warpMaskRowAlloc( 4597 const char *label 4598 ); 4599 4600 /** Creates a new warpMask table 4601 * 4602 * @return true on success 4603 */ 4604 4605 bool warpMaskCreateTable( 4606 psDB *dbh ///< Database handle 4607 ); 4608 4609 /** Deletes a warpMask table 4610 * 4611 * @return true on success 4612 */ 4613 4614 bool warpMaskDropTable( 4615 psDB *dbh ///< Database handle 4616 ); 4617 4618 /** Insert a single row into a table 4619 * 4620 * This function constructs and inserts a single row based on it's parameters. 4621 * 4622 * @return true on success 4623 */ 4624 4625 bool warpMaskInsert( 4626 psDB *dbh, ///< Database handle 4627 const char *label 4628 ); 4629 4630 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 4631 * 4632 * @return A The number of rows removed or a negative value on error 4633 */ 4634 4635 long long warpMaskDelete( 4636 psDB *dbh, ///< Database handle 4637 const psMetadata *where, ///< Row match criteria 4638 unsigned long long limit ///< Maximum number of elements to delete 4639 ); 4640 4641 /** Insert a single warpMaskRow object into a table 4642 * 4643 * This function constructs and inserts a single row based on it's parameters. 4644 * 4645 * @return true on success 4646 */ 4647 4648 bool warpMaskInsertObject( 4649 psDB *dbh, ///< Database handle 4650 warpMaskRow *object ///< warpMaskRow object 4651 ); 4652 4653 /** Insert an array of warpMaskRow object into a table 4654 * 4655 * This function constructs and inserts multiple rows based on it's parameters. 4656 * 4657 * @return true on success 4658 */ 4659 4660 bool warpMaskInsertObjects( 4661 psDB *dbh, ///< Database handle 4662 psArray *objects ///< array of warpMaskRow objects 4663 ); 4664 4665 /** Insert data from a binary FITS table warpMaskRow into the database 4666 * 4667 * This function expects a psFits object with a FITS table as the first 4668 * extension. The table must have at least one row of data in it, that is of 4669 * the appropriate format (number of columns and their type). All other 4670 * extensions are ignored. 4671 * 4672 * @return true on success 4673 */ 4674 4675 bool warpMaskInsertFits( 4676 psDB *dbh, ///< Database handle 4677 const psFits *fits ///< psFits object 4678 ); 4679 4680 /** Selects up to limit from the database and returns them in a binary FITS table 4681 * 4682 * This function assumes an empty psFits object and will create a FITS table 4683 * as the first extension. 4684 * 4685 * See psDBSelectRows() for documentation on the format of where. 4686 * 4687 * @return true on success 4688 */ 4689 4690 bool warpMaskSelectRowsFits( 4691 psDB *dbh, ///< Database handle 4692 psFits *fits, ///< psFits object 4693 const psMetadata *where, ///< Row match criteria 4694 unsigned long long limit ///< Maximum number of elements to return 4695 ); 4696 4697 /** Convert a warpMaskRow into an equivalent psMetadata 4698 * 4699 * @return A psMetadata pointer or NULL on error 4700 */ 4701 4702 psMetadata *warpMaskMetadataFromObject( 4703 const warpMaskRow *object ///< fooRow to convert into a psMetadata 4704 ); 4705 4706 /** Convert a psMetadata into an equivalent fooRow 4707 * 4708 * @return A warpMaskRow pointer or NULL on error 4709 */ 4710 4711 warpMaskRow *warpMaskObjectFromMetadata( 4712 psMetadata *md ///< psMetadata to convert into a fooRow 4713 ); 4714 /** Selects up to limit rows from the database and returns as warpMaskRow objects in a psArray 4715 * 4716 * See psDBSelectRows() for documentation on the format of where. 4717 * 4718 * @return A psArray pointer or NULL on error 4719 */ 4720 4721 psArray *warpMaskSelectRowObjects( 4722 psDB *dbh, ///< Database handle 4723 const psMetadata *where, ///< Row match criteria 4724 unsigned long long limit ///< Maximum number of elements to return 4725 ); 4726 /** Deletes a row from the database coresponding to an warpMask 4727 * 4728 * Note that a 'where' search psMetadata is constructed from each object and 4729 * used to find rows to delete. 4730 * 4731 * @return A The number of rows removed or a negative value on error 4732 */ 4733 4734 bool warpMaskDeleteObject( 4735 psDB *dbh, ///< Database handle 4736 const warpMaskRow *object ///< Object to delete 4737 ); 4738 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 4739 * 4740 * Note that a 'where' search psMetadata is constructed from each object and 4741 * used to find rows to delete. 4742 * 4743 * @return A The number of rows removed or a negative value on error 4744 */ 4745 4746 long long warpMaskDeleteRowObjects( 4747 psDB *dbh, ///< Database handle 4748 const psArray *objects, ///< Array of objects to delete 4749 unsigned long long limit ///< Maximum number of elements to delete 4750 ); 4751 /** Formats and prints an array of warpMaskRow objects 4752 * 4753 * When mdcf is set the formated output is in psMetadataConfig 4754 * format, otherwise it is in a simple tabular format. 4755 * 4756 * @return true on success 4757 */ 4758 4759 bool warpMaskPrintObjects( 4760 FILE *stream, ///< a stream 4761 psArray *objects, ///< An array of warpMaskRow objects 4762 bool mdcf ///< format as mdconfig or simple 4763 ); 4764 /** Formats and prints an warpMaskRow object 4765 * 4766 * When mdcf is set the formated output is in psMetadataConfig 4767 * format, otherwise it is in a simple tabular format. 4768 * 4769 * @return true on success 4770 */ 4771 4772 bool warpMaskPrintObject( 4773 FILE *stream, ///< a stream 4774 warpMaskRow *object, ///< an warpMaskRow object 4775 bool mdcf ///< format as mdconfig or simple 4776 ); 4582 4777 /** diffRunRow data structure 4583 4778 *
Note:
See TracChangeset
for help on using the changeset viewer.
