Changeset 15420 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Oct 30, 2007, 4:42:05 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (38 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r15343 r15420 20 20 /* 21 21 * 22 * This file was generated by glueforge 1.0 122 * This file was generated by glueforge 1.03 23 23 * 24 24 * Do NOT directly edit this file. … … 125 125 ); 126 126 127 /** pzDataStoreRow data structure128 *129 * Structure for representing a single row of pzDataStore table data.130 */131 132 typedef struct {133 char *camera;134 char *telescope;135 char *uri;136 } pzDataStoreRow;137 138 /** Creates a new pzDataStoreRow object139 *140 * @return A new pzDataStoreRow object or NULL on failure.141 */142 143 pzDataStoreRow *pzDataStoreRowAlloc(144 const char *camera,145 const char *telescope,146 const char *uri147 );148 149 /** Creates a new pzDataStore table150 *151 * @return true on success152 */153 154 bool pzDataStoreCreateTable(155 psDB *dbh ///< Database handle156 );157 158 /** Deletes a pzDataStore table159 *160 * @return true on success161 */162 163 bool pzDataStoreDropTable(164 psDB *dbh ///< Database handle165 );166 167 /** Insert a single row into a table168 *169 * This function constructs and inserts a single row based on it's parameters.170 *171 * @return true on success172 */173 174 bool pzDataStoreInsert(175 psDB *dbh, ///< Database handle176 const char *camera,177 const char *telescope,178 const char *uri179 );180 181 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.182 *183 * @return A The number of rows removed or a negative value on error184 */185 186 long long pzDataStoreDelete(187 psDB *dbh, ///< Database handle188 const psMetadata *where, ///< Row match criteria189 unsigned long long limit ///< Maximum number of elements to delete190 );191 192 /** Insert a single pzDataStoreRow object into a table193 *194 * This function constructs and inserts a single row based on it's parameters.195 *196 * @return true on success197 */198 199 bool pzDataStoreInsertObject(200 psDB *dbh, ///< Database handle201 pzDataStoreRow *object ///< pzDataStoreRow object202 );203 204 /** Insert an array of pzDataStoreRow object into a table205 *206 * This function constructs and inserts multiple rows based on it's parameters.207 *208 * @return true on success209 */210 211 bool pzDataStoreInsertObjects(212 psDB *dbh, ///< Database handle213 psArray *objects ///< array of pzDataStoreRow objects214 );215 216 /** Insert data from a binary FITS table pzDataStoreRow into the database217 *218 * This function expects a psFits object with a FITS table as the first219 * extension. The table must have at least one row of data in it, that is of220 * the appropriate format (number of columns and their type). All other221 * extensions are ignored.222 *223 * @return true on success224 */225 226 bool pzDataStoreInsertFits(227 psDB *dbh, ///< Database handle228 const psFits *fits ///< psFits object229 );230 231 /** Selects up to limit from the database and returns them in a binary FITS table232 *233 * This function assumes an empty psFits object and will create a FITS table234 * as the first extension.235 *236 * See psDBSelectRows() for documentation on the format of where.237 *238 * @return true on success239 */240 241 bool pzDataStoreSelectRowsFits(242 psDB *dbh, ///< Database handle243 psFits *fits, ///< psFits object244 const psMetadata *where, ///< Row match criteria245 unsigned long long limit ///< Maximum number of elements to return246 );247 248 /** Convert a pzDataStoreRow into an equivalent psMetadata249 *250 * @return A psMetadata pointer or NULL on error251 */252 253 psMetadata *pzDataStoreMetadataFromObject(254 const pzDataStoreRow *object ///< fooRow to convert into a psMetadata255 );256 257 /** Convert a psMetadata into an equivalent fooRow258 *259 * @return A pzDataStoreRow pointer or NULL on error260 */261 262 pzDataStoreRow *pzDataStoreObjectFromMetadata(263 psMetadata *md ///< psMetadata to convert into a fooRow264 );265 /** Selects up to limit rows from the database and returns as pzDataStoreRow objects in a psArray266 *267 * See psDBSelectRows() for documentation on the format of where.268 *269 * @return A psArray pointer or NULL on error270 */271 272 psArray *pzDataStoreSelectRowObjects(273 psDB *dbh, ///< Database handle274 const psMetadata *where, ///< Row match criteria275 unsigned long long limit ///< Maximum number of elements to return276 );277 /** Deletes a row from the database coresponding to an pzDataStore278 *279 * Note that a 'where' search psMetadata is constructed from each object and280 * used to find rows to delete.281 *282 * @return A The number of rows removed or a negative value on error283 */284 285 bool pzDataStoreDeleteObject(286 psDB *dbh, ///< Database handle287 const pzDataStoreRow *object ///< Object to delete288 );289 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.290 *291 * Note that a 'where' search psMetadata is constructed from each object and292 * used to find rows to delete.293 *294 * @return A The number of rows removed or a negative value on error295 */296 297 long long pzDataStoreDeleteRowObjects(298 psDB *dbh, ///< Database handle299 const psArray *objects, ///< Array of objects to delete300 unsigned long long limit ///< Maximum number of elements to delete301 );302 /** Formats and prints an array of pzDataStoreRow objects303 *304 * When mdcf is set the formated output is in psMetadataConfig305 * format, otherwise it is in a simple tabular format.306 *307 * @return true on success308 */309 310 bool pzDataStorePrintObjects(311 FILE *stream, ///< a stream312 psArray *objects, ///< An array of pzDataStoreRow objects313 bool mdcf ///< format as mdconfig or simple314 );315 /** Formats and prints an pzDataStoreRow object316 *317 * When mdcf is set the formated output is in psMetadataConfig318 * format, otherwise it is in a simple tabular format.319 *320 * @return true on success321 */322 323 bool pzDataStorePrintObject(324 FILE *stream, ///< a stream325 pzDataStoreRow *object, ///< an pzDataStoreRow object326 bool mdcf ///< format as mdconfig or simple327 );328 127 /** summitExpRow data structure 329 128 * … … 970 769 char *class; 971 770 char *class_id; 771 psS64 exp_id; 972 772 } pzPendingImfileRow; 973 773 … … 982 782 const char *telescope, 983 783 const char *class, 984 const char *class_id 784 const char *class_id, 785 psS64 exp_id 985 786 ); 986 787 … … 1016 817 const char *telescope, 1017 818 const char *class, 1018 const char *class_id 819 const char *class_id, 820 psS64 exp_id 1019 821 ); 1020 822 … … 1378 1180 char *class; 1379 1181 char *class_id; 1182 psS64 exp_id; 1380 1183 char *uri; 1381 1184 } pzDoneImfileRow; … … 1392 1195 const char *class, 1393 1196 const char *class_id, 1197 psS64 exp_id, 1394 1198 const char *uri 1395 1199 ); … … 1427 1231 const char *class, 1428 1232 const char *class_id, 1233 psS64 exp_id, 1429 1234 const char *uri 1430 1235 ); … … 1588 1393 char *tmp_telescope; 1589 1394 char *state; 1395 psS32 imfiles; 1590 1396 char *workdir; 1591 1397 char *workdir_state; 1592 char *reduction;1593 1398 } newExpRow; 1594 1399 … … 1604 1409 const char *tmp_telescope, 1605 1410 const char *state, 1411 psS32 imfiles, 1606 1412 const char *workdir, 1607 const char *workdir_state, 1608 const char *reduction 1413 const char *workdir_state 1609 1414 ); 1610 1415 … … 1641 1446 const char *tmp_telescope, 1642 1447 const char *state, 1448 psS32 imfiles, 1643 1449 const char *workdir, 1644 const char *workdir_state, 1645 const char *reduction 1450 const char *workdir_state 1646 1451 ); 1647 1452 … … 2007 1812 char *exp_tag; 2008 1813 char *exp_type; 1814 psS32 imfiles; 2009 1815 char *filelevel; 2010 1816 char *workdir; 2011 char *reduction;2012 1817 char *filter; 2013 1818 psF32 airmass; … … 2046 1851 const char *exp_tag, 2047 1852 const char *exp_type, 1853 psS32 imfiles, 2048 1854 const char *filelevel, 2049 1855 const char *workdir, 2050 const char *reduction,2051 1856 const char *filter, 2052 1857 psF32 airmass, … … 2106 1911 const char *exp_tag, 2107 1912 const char *exp_type, 1913 psS32 imfiles, 2108 1914 const char *filelevel, 2109 1915 const char *workdir, 2110 const char *reduction,2111 1916 const char *filter, 2112 1917 psF32 airmass, … … 2769 2574 typedef struct { 2770 2575 psS64 chip_id; 2771 psS64 exp_id;2772 2576 char *state; 2773 2577 char *workdir; … … 2786 2590 chipRunRow *chipRunRowAlloc( 2787 2591 psS64 chip_id, 2788 psS64 exp_id,2789 2592 const char *state, 2790 2593 const char *workdir, … … 2824 2627 psDB *dbh, ///< Database handle 2825 2628 psS64 chip_id, 2826 psS64 exp_id,2827 2629 const char *state, 2828 2630 const char *workdir, … … 2979 2781 FILE *stream, ///< a stream 2980 2782 chipRunRow *object, ///< an chipRunRow object 2783 bool mdcf ///< format as mdconfig or simple 2784 ); 2785 /** chipInputImfileRow data structure 2786 * 2787 * Structure for representing a single row of chipInputImfile table data. 2788 */ 2789 2790 typedef struct { 2791 psS64 chip_id; 2792 psS64 exp_id; 2793 char *class_id; 2794 } chipInputImfileRow; 2795 2796 /** Creates a new chipInputImfileRow object 2797 * 2798 * @return A new chipInputImfileRow object or NULL on failure. 2799 */ 2800 2801 chipInputImfileRow *chipInputImfileRowAlloc( 2802 psS64 chip_id, 2803 psS64 exp_id, 2804 const char *class_id 2805 ); 2806 2807 /** Creates a new chipInputImfile table 2808 * 2809 * @return true on success 2810 */ 2811 2812 bool chipInputImfileCreateTable( 2813 psDB *dbh ///< Database handle 2814 ); 2815 2816 /** Deletes a chipInputImfile table 2817 * 2818 * @return true on success 2819 */ 2820 2821 bool chipInputImfileDropTable( 2822 psDB *dbh ///< Database handle 2823 ); 2824 2825 /** Insert a single row into a table 2826 * 2827 * This function constructs and inserts a single row based on it's parameters. 2828 * 2829 * @return true on success 2830 */ 2831 2832 bool chipInputImfileInsert( 2833 psDB *dbh, ///< Database handle 2834 psS64 chip_id, 2835 psS64 exp_id, 2836 const char *class_id 2837 ); 2838 2839 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 2840 * 2841 * @return A The number of rows removed or a negative value on error 2842 */ 2843 2844 long long chipInputImfileDelete( 2845 psDB *dbh, ///< Database handle 2846 const psMetadata *where, ///< Row match criteria 2847 unsigned long long limit ///< Maximum number of elements to delete 2848 ); 2849 2850 /** Insert a single chipInputImfileRow object into a table 2851 * 2852 * This function constructs and inserts a single row based on it's parameters. 2853 * 2854 * @return true on success 2855 */ 2856 2857 bool chipInputImfileInsertObject( 2858 psDB *dbh, ///< Database handle 2859 chipInputImfileRow *object ///< chipInputImfileRow object 2860 ); 2861 2862 /** Insert an array of chipInputImfileRow object into a table 2863 * 2864 * This function constructs and inserts multiple rows based on it's parameters. 2865 * 2866 * @return true on success 2867 */ 2868 2869 bool chipInputImfileInsertObjects( 2870 psDB *dbh, ///< Database handle 2871 psArray *objects ///< array of chipInputImfileRow objects 2872 ); 2873 2874 /** Insert data from a binary FITS table chipInputImfileRow into the database 2875 * 2876 * This function expects a psFits object with a FITS table as the first 2877 * extension. The table must have at least one row of data in it, that is of 2878 * the appropriate format (number of columns and their type). All other 2879 * extensions are ignored. 2880 * 2881 * @return true on success 2882 */ 2883 2884 bool chipInputImfileInsertFits( 2885 psDB *dbh, ///< Database handle 2886 const psFits *fits ///< psFits object 2887 ); 2888 2889 /** Selects up to limit from the database and returns them in a binary FITS table 2890 * 2891 * This function assumes an empty psFits object and will create a FITS table 2892 * as the first extension. 2893 * 2894 * See psDBSelectRows() for documentation on the format of where. 2895 * 2896 * @return true on success 2897 */ 2898 2899 bool chipInputImfileSelectRowsFits( 2900 psDB *dbh, ///< Database handle 2901 psFits *fits, ///< psFits object 2902 const psMetadata *where, ///< Row match criteria 2903 unsigned long long limit ///< Maximum number of elements to return 2904 ); 2905 2906 /** Convert a chipInputImfileRow into an equivalent psMetadata 2907 * 2908 * @return A psMetadata pointer or NULL on error 2909 */ 2910 2911 psMetadata *chipInputImfileMetadataFromObject( 2912 const chipInputImfileRow *object ///< fooRow to convert into a psMetadata 2913 ); 2914 2915 /** Convert a psMetadata into an equivalent fooRow 2916 * 2917 * @return A chipInputImfileRow pointer or NULL on error 2918 */ 2919 2920 chipInputImfileRow *chipInputImfileObjectFromMetadata( 2921 psMetadata *md ///< psMetadata to convert into a fooRow 2922 ); 2923 /** Selects up to limit rows from the database and returns as chipInputImfileRow objects in a psArray 2924 * 2925 * See psDBSelectRows() for documentation on the format of where. 2926 * 2927 * @return A psArray pointer or NULL on error 2928 */ 2929 2930 psArray *chipInputImfileSelectRowObjects( 2931 psDB *dbh, ///< Database handle 2932 const psMetadata *where, ///< Row match criteria 2933 unsigned long long limit ///< Maximum number of elements to return 2934 ); 2935 /** Deletes a row from the database coresponding to an chipInputImfile 2936 * 2937 * Note that a 'where' search psMetadata is constructed from each object and 2938 * used to find rows to delete. 2939 * 2940 * @return A The number of rows removed or a negative value on error 2941 */ 2942 2943 bool chipInputImfileDeleteObject( 2944 psDB *dbh, ///< Database handle 2945 const chipInputImfileRow *object ///< Object to delete 2946 ); 2947 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 2948 * 2949 * Note that a 'where' search psMetadata is constructed from each object and 2950 * used to find rows to delete. 2951 * 2952 * @return A The number of rows removed or a negative value on error 2953 */ 2954 2955 long long chipInputImfileDeleteRowObjects( 2956 psDB *dbh, ///< Database handle 2957 const psArray *objects, ///< Array of objects to delete 2958 unsigned long long limit ///< Maximum number of elements to delete 2959 ); 2960 /** Formats and prints an array of chipInputImfileRow objects 2961 * 2962 * When mdcf is set the formated output is in psMetadataConfig 2963 * format, otherwise it is in a simple tabular format. 2964 * 2965 * @return true on success 2966 */ 2967 2968 bool chipInputImfilePrintObjects( 2969 FILE *stream, ///< a stream 2970 psArray *objects, ///< An array of chipInputImfileRow objects 2971 bool mdcf ///< format as mdconfig or simple 2972 ); 2973 /** Formats and prints an chipInputImfileRow object 2974 * 2975 * When mdcf is set the formated output is in psMetadataConfig 2976 * format, otherwise it is in a simple tabular format. 2977 * 2978 * @return true on success 2979 */ 2980 2981 bool chipInputImfilePrintObject( 2982 FILE *stream, ///< a stream 2983 chipInputImfileRow *object, ///< an chipInputImfileRow object 2981 2984 bool mdcf ///< format as mdconfig or simple 2982 2985 ); … … 4734 4737 psF64 bg; 4735 4738 psF64 bg_stdev; 4736 psF64 pixel_fill;4737 psS16 fault;4738 4739 } warpSkyfileRow; 4739 4740 … … 4750 4751 const char *path_base, 4751 4752 psF64 bg, 4752 psF64 bg_stdev, 4753 psF64 pixel_fill, 4754 psS16 fault 4753 psF64 bg_stdev 4755 4754 ); 4756 4755 … … 4788 4787 const char *path_base, 4789 4788 psF64 bg, 4790 psF64 bg_stdev, 4791 psF64 pixel_fill, 4792 psS16 fault 4789 psF64 bg_stdev 4793 4790 ); 4794 4791 … … 5160 5157 typedef struct { 5161 5158 psS64 diff_id; 5162 bool template;5163 psS64 stack_id;5164 5159 psS64 warp_id; 5165 5160 char *skycell_id; 5166 5161 char *tess_id; 5167 5162 char *kind; 5163 bool template; 5168 5164 } diffInputSkyfileRow; 5169 5165 … … 5175 5171 diffInputSkyfileRow *diffInputSkyfileRowAlloc( 5176 5172 psS64 diff_id, 5177 bool template,5178 psS64 stack_id,5179 5173 psS64 warp_id, 5180 5174 const char *skycell_id, 5181 5175 const char *tess_id, 5182 const char *kind 5176 const char *kind, 5177 bool template 5183 5178 ); 5184 5179 … … 5211 5206 psDB *dbh, ///< Database handle 5212 5207 psS64 diff_id, 5213 bool template,5214 psS64 stack_id,5215 5208 psS64 warp_id, 5216 5209 const char *skycell_id, 5217 5210 const char *tess_id, 5218 const char *kind 5211 const char *kind, 5212 bool template 5219 5213 ); 5220 5214 … … 5377 5371 psF64 bg; 5378 5372 psF64 bg_stdev; 5379 psS16 fault;5380 5373 } diffSkyfileRow; 5381 5374 … … 5390 5383 const char *path_base, 5391 5384 psF64 bg, 5392 psF64 bg_stdev, 5393 psS16 fault 5385 psF64 bg_stdev 5394 5386 ); 5395 5387 … … 5425 5417 const char *path_base, 5426 5418 psF64 bg, 5427 psF64 bg_stdev, 5428 psS16 fault 5419 psF64 bg_stdev 5429 5420 ); 5430 5421 … … 5998 5989 psF64 bg; 5999 5990 psF64 bg_stdev; 6000 psS16 fault;6001 5991 } stackSumSkyfileRow; 6002 5992 … … 6011 6001 const char *path_base, 6012 6002 psF64 bg, 6013 psF64 bg_stdev, 6014 psS16 fault 6003 psF64 bg_stdev 6015 6004 ); 6016 6005 … … 6046 6035 const char *path_base, 6047 6036 psF64 bg, 6048 psF64 bg_stdev, 6049 psS16 fault 6037 psF64 bg_stdev 6050 6038 ); 6051 6039 … … 8087 8075 psF64 bg_stdev; 8088 8076 psF64 bg_mean_stdev; 8089 psF64 bg_skewness;8090 psF64 bg_kurtosis;8091 8077 psF64 bin_stdev; 8092 8078 psF64 fringe_0; 8093 8079 psF64 fringe_1; 8094 8080 psF64 fringe_2; 8095 psF64 fringe_resid_0;8096 psF64 fringe_resid_1;8097 psF64 fringe_resid_2;8098 8081 psF64 user_1; 8099 8082 psF64 user_2; … … 8120 8103 psF64 bg_stdev, 8121 8104 psF64 bg_mean_stdev, 8122 psF64 bg_skewness,8123 psF64 bg_kurtosis,8124 8105 psF64 bin_stdev, 8125 8106 psF64 fringe_0, 8126 8107 psF64 fringe_1, 8127 8108 psF64 fringe_2, 8128 psF64 fringe_resid_0,8129 psF64 fringe_resid_1,8130 psF64 fringe_resid_2,8131 8109 psF64 user_1, 8132 8110 psF64 user_2, … … 8174 8152 psF64 bg_stdev, 8175 8153 psF64 bg_mean_stdev, 8176 psF64 bg_skewness,8177 psF64 bg_kurtosis,8178 8154 psF64 bin_stdev, 8179 8155 psF64 fringe_0, 8180 8156 psF64 fringe_1, 8181 8157 psF64 fringe_2, 8182 psF64 fringe_resid_0,8183 psF64 fringe_resid_1,8184 psF64 fringe_resid_2,8185 8158 psF64 user_1, 8186 8159 psF64 user_2, … … 8352 8325 psF64 bg_stdev; 8353 8326 psF64 bg_mean_stdev; 8354 psF64 bg_skewness;8355 psF64 bg_kurtosis;8356 8327 psF64 bin_stdev; 8357 8328 psF64 fringe_0; 8358 8329 psF64 fringe_1; 8359 8330 psF64 fringe_2; 8360 psF64 fringe_resid_0;8361 psF64 fringe_resid_1;8362 psF64 fringe_resid_2;8363 8331 psF64 user_1; 8364 8332 psF64 user_2; … … 8384 8352 psF64 bg_stdev, 8385 8353 psF64 bg_mean_stdev, 8386 psF64 bg_skewness,8387 psF64 bg_kurtosis,8388 8354 psF64 bin_stdev, 8389 8355 psF64 fringe_0, 8390 8356 psF64 fringe_1, 8391 8357 psF64 fringe_2, 8392 psF64 fringe_resid_0,8393 psF64 fringe_resid_1,8394 psF64 fringe_resid_2,8395 8358 psF64 user_1, 8396 8359 psF64 user_2, … … 8437 8400 psF64 bg_stdev, 8438 8401 psF64 bg_mean_stdev, 8439 psF64 bg_skewness,8440 psF64 bg_kurtosis,8441 8402 psF64 bin_stdev, 8442 8403 psF64 fringe_0, 8443 8404 psF64 fringe_1, 8444 8405 psF64 fringe_2, 8445 psF64 fringe_resid_0,8446 psF64 fringe_resid_1,8447 psF64 fringe_resid_2,8448 8406 psF64 user_1, 8449 8407 psF64 user_2, … … 8816 8774 bool mdcf ///< format as mdconfig or simple 8817 8775 ); 8818 /** detRegisteredImfileRow data structure8819 *8820 * Structure for representing a single row of detRegisteredImfile table data.8821 */8822 8823 typedef struct {8824 psS64 det_id;8825 psS32 iteration;8826 char *class_id;8827 char *uri;8828 psF64 bg;8829 psF64 bg_stdev;8830 psF64 bg_mean_stdev;8831 psF64 user_1;8832 psF64 user_2;8833 psF64 user_3;8834 psF64 user_4;8835 psF64 user_5;8836 char *path_base;8837 psS16 fault;8838 } detRegisteredImfileRow;8839 8840 /** Creates a new detRegisteredImfileRow object8841 *8842 * @return A new detRegisteredImfileRow object or NULL on failure.8843 */8844 8845 detRegisteredImfileRow *detRegisteredImfileRowAlloc(8846 psS64 det_id,8847 psS32 iteration,8848 const char *class_id,8849 const char *uri,8850 psF64 bg,8851 psF64 bg_stdev,8852 psF64 bg_mean_stdev,8853 psF64 user_1,8854 psF64 user_2,8855 psF64 user_3,8856 psF64 user_4,8857 psF64 user_5,8858 const char *path_base,8859 psS16 fault8860 );8861 8862 /** Creates a new detRegisteredImfile table8863 *8864 * @return true on success8865 */8866 8867 bool detRegisteredImfileCreateTable(8868 psDB *dbh ///< Database handle8869 );8870 8871 /** Deletes a detRegisteredImfile table8872 *8873 * @return true on success8874 */8875 8876 bool detRegisteredImfileDropTable(8877 psDB *dbh ///< Database handle8878 );8879 8880 /** Insert a single row into a table8881 *8882 * This function constructs and inserts a single row based on it's parameters.8883 *8884 * @return true on success8885 */8886 8887 bool detRegisteredImfileInsert(8888 psDB *dbh, ///< Database handle8889 psS64 det_id,8890 psS32 iteration,8891 const char *class_id,8892 const char *uri,8893 psF64 bg,8894 psF64 bg_stdev,8895 psF64 bg_mean_stdev,8896 psF64 user_1,8897 psF64 user_2,8898 psF64 user_3,8899 psF64 user_4,8900 psF64 user_5,8901 const char *path_base,8902 psS16 fault8903 );8904 8905 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.8906 *8907 * @return A The number of rows removed or a negative value on error8908 */8909 8910 long long detRegisteredImfileDelete(8911 psDB *dbh, ///< Database handle8912 const psMetadata *where, ///< Row match criteria8913 unsigned long long limit ///< Maximum number of elements to delete8914 );8915 8916 /** Insert a single detRegisteredImfileRow object into a table8917 *8918 * This function constructs and inserts a single row based on it's parameters.8919 *8920 * @return true on success8921 */8922 8923 bool detRegisteredImfileInsertObject(8924 psDB *dbh, ///< Database handle8925 detRegisteredImfileRow *object ///< detRegisteredImfileRow object8926 );8927 8928 /** Insert an array of detRegisteredImfileRow object into a table8929 *8930 * This function constructs and inserts multiple rows based on it's parameters.8931 *8932 * @return true on success8933 */8934 8935 bool detRegisteredImfileInsertObjects(8936 psDB *dbh, ///< Database handle8937 psArray *objects ///< array of detRegisteredImfileRow objects8938 );8939 8940 /** Insert data from a binary FITS table detRegisteredImfileRow into the database8941 *8942 * This function expects a psFits object with a FITS table as the first8943 * extension. The table must have at least one row of data in it, that is of8944 * the appropriate format (number of columns and their type). All other8945 * extensions are ignored.8946 *8947 * @return true on success8948 */8949 8950 bool detRegisteredImfileInsertFits(8951 psDB *dbh, ///< Database handle8952 const psFits *fits ///< psFits object8953 );8954 8955 /** Selects up to limit from the database and returns them in a binary FITS table8956 *8957 * This function assumes an empty psFits object and will create a FITS table8958 * as the first extension.8959 *8960 * See psDBSelectRows() for documentation on the format of where.8961 *8962 * @return true on success8963 */8964 8965 bool detRegisteredImfileSelectRowsFits(8966 psDB *dbh, ///< Database handle8967 psFits *fits, ///< psFits object8968 const psMetadata *where, ///< Row match criteria8969 unsigned long long limit ///< Maximum number of elements to return8970 );8971 8972 /** Convert a detRegisteredImfileRow into an equivalent psMetadata8973 *8974 * @return A psMetadata pointer or NULL on error8975 */8976 8977 psMetadata *detRegisteredImfileMetadataFromObject(8978 const detRegisteredImfileRow *object ///< fooRow to convert into a psMetadata8979 );8980 8981 /** Convert a psMetadata into an equivalent fooRow8982 *8983 * @return A detRegisteredImfileRow pointer or NULL on error8984 */8985 8986 detRegisteredImfileRow *detRegisteredImfileObjectFromMetadata(8987 psMetadata *md ///< psMetadata to convert into a fooRow8988 );8989 /** Selects up to limit rows from the database and returns as detRegisteredImfileRow objects in a psArray8990 *8991 * See psDBSelectRows() for documentation on the format of where.8992 *8993 * @return A psArray pointer or NULL on error8994 */8995 8996 psArray *detRegisteredImfileSelectRowObjects(8997 psDB *dbh, ///< Database handle8998 const psMetadata *where, ///< Row match criteria8999 unsigned long long limit ///< Maximum number of elements to return9000 );9001 /** Deletes a row from the database coresponding to an detRegisteredImfile9002 *9003 * Note that a 'where' search psMetadata is constructed from each object and9004 * used to find rows to delete.9005 *9006 * @return A The number of rows removed or a negative value on error9007 */9008 9009 bool detRegisteredImfileDeleteObject(9010 psDB *dbh, ///< Database handle9011 const detRegisteredImfileRow *object ///< Object to delete9012 );9013 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9014 *9015 * Note that a 'where' search psMetadata is constructed from each object and9016 * used to find rows to delete.9017 *9018 * @return A The number of rows removed or a negative value on error9019 */9020 9021 long long detRegisteredImfileDeleteRowObjects(9022 psDB *dbh, ///< Database handle9023 const psArray *objects, ///< Array of objects to delete9024 unsigned long long limit ///< Maximum number of elements to delete9025 );9026 /** Formats and prints an array of detRegisteredImfileRow objects9027 *9028 * When mdcf is set the formated output is in psMetadataConfig9029 * format, otherwise it is in a simple tabular format.9030 *9031 * @return true on success9032 */9033 9034 bool detRegisteredImfilePrintObjects(9035 FILE *stream, ///< a stream9036 psArray *objects, ///< An array of detRegisteredImfileRow objects9037 bool mdcf ///< format as mdconfig or simple9038 );9039 /** Formats and prints an detRegisteredImfileRow object9040 *9041 * When mdcf is set the formated output is in psMetadataConfig9042 * format, otherwise it is in a simple tabular format.9043 *9044 * @return true on success9045 */9046 9047 bool detRegisteredImfilePrintObject(9048 FILE *stream, ///< a stream9049 detRegisteredImfileRow *object, ///< an detRegisteredImfileRow object9050 bool mdcf ///< format as mdconfig or simple9051 );9052 /** detCorrectedExpRow data structure9053 *9054 * Structure for representing a single row of detCorrectedExp table data.9055 */9056 9057 typedef struct {9058 psS64 det_id;9059 psS64 exp_id;9060 char *uri;9061 psS64 corr_id;9062 char *corr_type;9063 char *recipe;9064 char *path_base;9065 psS16 fault;9066 } detCorrectedExpRow;9067 9068 /** Creates a new detCorrectedExpRow object9069 *9070 * @return A new detCorrectedExpRow object or NULL on failure.9071 */9072 9073 detCorrectedExpRow *detCorrectedExpRowAlloc(9074 psS64 det_id,9075 psS64 exp_id,9076 const char *uri,9077 psS64 corr_id,9078 const char *corr_type,9079 const char *recipe,9080 const char *path_base,9081 psS16 fault9082 );9083 9084 /** Creates a new detCorrectedExp table9085 *9086 * @return true on success9087 */9088 9089 bool detCorrectedExpCreateTable(9090 psDB *dbh ///< Database handle9091 );9092 9093 /** Deletes a detCorrectedExp table9094 *9095 * @return true on success9096 */9097 9098 bool detCorrectedExpDropTable(9099 psDB *dbh ///< Database handle9100 );9101 9102 /** Insert a single row into a table9103 *9104 * This function constructs and inserts a single row based on it's parameters.9105 *9106 * @return true on success9107 */9108 9109 bool detCorrectedExpInsert(9110 psDB *dbh, ///< Database handle9111 psS64 det_id,9112 psS64 exp_id,9113 const char *uri,9114 psS64 corr_id,9115 const char *corr_type,9116 const char *recipe,9117 const char *path_base,9118 psS16 fault9119 );9120 9121 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9122 *9123 * @return A The number of rows removed or a negative value on error9124 */9125 9126 long long detCorrectedExpDelete(9127 psDB *dbh, ///< Database handle9128 const psMetadata *where, ///< Row match criteria9129 unsigned long long limit ///< Maximum number of elements to delete9130 );9131 9132 /** Insert a single detCorrectedExpRow object into a table9133 *9134 * This function constructs and inserts a single row based on it's parameters.9135 *9136 * @return true on success9137 */9138 9139 bool detCorrectedExpInsertObject(9140 psDB *dbh, ///< Database handle9141 detCorrectedExpRow *object ///< detCorrectedExpRow object9142 );9143 9144 /** Insert an array of detCorrectedExpRow object into a table9145 *9146 * This function constructs and inserts multiple rows based on it's parameters.9147 *9148 * @return true on success9149 */9150 9151 bool detCorrectedExpInsertObjects(9152 psDB *dbh, ///< Database handle9153 psArray *objects ///< array of detCorrectedExpRow objects9154 );9155 9156 /** Insert data from a binary FITS table detCorrectedExpRow into the database9157 *9158 * This function expects a psFits object with a FITS table as the first9159 * extension. The table must have at least one row of data in it, that is of9160 * the appropriate format (number of columns and their type). All other9161 * extensions are ignored.9162 *9163 * @return true on success9164 */9165 9166 bool detCorrectedExpInsertFits(9167 psDB *dbh, ///< Database handle9168 const psFits *fits ///< psFits object9169 );9170 9171 /** Selects up to limit from the database and returns them in a binary FITS table9172 *9173 * This function assumes an empty psFits object and will create a FITS table9174 * as the first extension.9175 *9176 * See psDBSelectRows() for documentation on the format of where.9177 *9178 * @return true on success9179 */9180 9181 bool detCorrectedExpSelectRowsFits(9182 psDB *dbh, ///< Database handle9183 psFits *fits, ///< psFits object9184 const psMetadata *where, ///< Row match criteria9185 unsigned long long limit ///< Maximum number of elements to return9186 );9187 9188 /** Convert a detCorrectedExpRow into an equivalent psMetadata9189 *9190 * @return A psMetadata pointer or NULL on error9191 */9192 9193 psMetadata *detCorrectedExpMetadataFromObject(9194 const detCorrectedExpRow *object ///< fooRow to convert into a psMetadata9195 );9196 9197 /** Convert a psMetadata into an equivalent fooRow9198 *9199 * @return A detCorrectedExpRow pointer or NULL on error9200 */9201 9202 detCorrectedExpRow *detCorrectedExpObjectFromMetadata(9203 psMetadata *md ///< psMetadata to convert into a fooRow9204 );9205 /** Selects up to limit rows from the database and returns as detCorrectedExpRow objects in a psArray9206 *9207 * See psDBSelectRows() for documentation on the format of where.9208 *9209 * @return A psArray pointer or NULL on error9210 */9211 9212 psArray *detCorrectedExpSelectRowObjects(9213 psDB *dbh, ///< Database handle9214 const psMetadata *where, ///< Row match criteria9215 unsigned long long limit ///< Maximum number of elements to return9216 );9217 /** Deletes a row from the database coresponding to an detCorrectedExp9218 *9219 * Note that a 'where' search psMetadata is constructed from each object and9220 * used to find rows to delete.9221 *9222 * @return A The number of rows removed or a negative value on error9223 */9224 9225 bool detCorrectedExpDeleteObject(9226 psDB *dbh, ///< Database handle9227 const detCorrectedExpRow *object ///< Object to delete9228 );9229 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9230 *9231 * Note that a 'where' search psMetadata is constructed from each object and9232 * used to find rows to delete.9233 *9234 * @return A The number of rows removed or a negative value on error9235 */9236 9237 long long detCorrectedExpDeleteRowObjects(9238 psDB *dbh, ///< Database handle9239 const psArray *objects, ///< Array of objects to delete9240 unsigned long long limit ///< Maximum number of elements to delete9241 );9242 /** Formats and prints an array of detCorrectedExpRow objects9243 *9244 * When mdcf is set the formated output is in psMetadataConfig9245 * format, otherwise it is in a simple tabular format.9246 *9247 * @return true on success9248 */9249 9250 bool detCorrectedExpPrintObjects(9251 FILE *stream, ///< a stream9252 psArray *objects, ///< An array of detCorrectedExpRow objects9253 bool mdcf ///< format as mdconfig or simple9254 );9255 /** Formats and prints an detCorrectedExpRow object9256 *9257 * When mdcf is set the formated output is in psMetadataConfig9258 * format, otherwise it is in a simple tabular format.9259 *9260 * @return true on success9261 */9262 9263 bool detCorrectedExpPrintObject(9264 FILE *stream, ///< a stream9265 detCorrectedExpRow *object, ///< an detCorrectedExpRow object9266 bool mdcf ///< format as mdconfig or simple9267 );9268 /** detCorrectedImfileRow data structure9269 *9270 * Structure for representing a single row of detCorrectedImfile table data.9271 */9272 9273 typedef struct {9274 psS64 det_id;9275 psS64 exp_id;9276 char *class_id;9277 char *uri;9278 char *path_base;9279 psS16 fault;9280 } detCorrectedImfileRow;9281 9282 /** Creates a new detCorrectedImfileRow object9283 *9284 * @return A new detCorrectedImfileRow object or NULL on failure.9285 */9286 9287 detCorrectedImfileRow *detCorrectedImfileRowAlloc(9288 psS64 det_id,9289 psS64 exp_id,9290 const char *class_id,9291 const char *uri,9292 const char *path_base,9293 psS16 fault9294 );9295 9296 /** Creates a new detCorrectedImfile table9297 *9298 * @return true on success9299 */9300 9301 bool detCorrectedImfileCreateTable(9302 psDB *dbh ///< Database handle9303 );9304 9305 /** Deletes a detCorrectedImfile table9306 *9307 * @return true on success9308 */9309 9310 bool detCorrectedImfileDropTable(9311 psDB *dbh ///< Database handle9312 );9313 9314 /** Insert a single row into a table9315 *9316 * This function constructs and inserts a single row based on it's parameters.9317 *9318 * @return true on success9319 */9320 9321 bool detCorrectedImfileInsert(9322 psDB *dbh, ///< Database handle9323 psS64 det_id,9324 psS64 exp_id,9325 const char *class_id,9326 const char *uri,9327 const char *path_base,9328 psS16 fault9329 );9330 9331 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9332 *9333 * @return A The number of rows removed or a negative value on error9334 */9335 9336 long long detCorrectedImfileDelete(9337 psDB *dbh, ///< Database handle9338 const psMetadata *where, ///< Row match criteria9339 unsigned long long limit ///< Maximum number of elements to delete9340 );9341 9342 /** Insert a single detCorrectedImfileRow object into a table9343 *9344 * This function constructs and inserts a single row based on it's parameters.9345 *9346 * @return true on success9347 */9348 9349 bool detCorrectedImfileInsertObject(9350 psDB *dbh, ///< Database handle9351 detCorrectedImfileRow *object ///< detCorrectedImfileRow object9352 );9353 9354 /** Insert an array of detCorrectedImfileRow object into a table9355 *9356 * This function constructs and inserts multiple rows based on it's parameters.9357 *9358 * @return true on success9359 */9360 9361 bool detCorrectedImfileInsertObjects(9362 psDB *dbh, ///< Database handle9363 psArray *objects ///< array of detCorrectedImfileRow objects9364 );9365 9366 /** Insert data from a binary FITS table detCorrectedImfileRow into the database9367 *9368 * This function expects a psFits object with a FITS table as the first9369 * extension. The table must have at least one row of data in it, that is of9370 * the appropriate format (number of columns and their type). All other9371 * extensions are ignored.9372 *9373 * @return true on success9374 */9375 9376 bool detCorrectedImfileInsertFits(9377 psDB *dbh, ///< Database handle9378 const psFits *fits ///< psFits object9379 );9380 9381 /** Selects up to limit from the database and returns them in a binary FITS table9382 *9383 * This function assumes an empty psFits object and will create a FITS table9384 * as the first extension.9385 *9386 * See psDBSelectRows() for documentation on the format of where.9387 *9388 * @return true on success9389 */9390 9391 bool detCorrectedImfileSelectRowsFits(9392 psDB *dbh, ///< Database handle9393 psFits *fits, ///< psFits object9394 const psMetadata *where, ///< Row match criteria9395 unsigned long long limit ///< Maximum number of elements to return9396 );9397 9398 /** Convert a detCorrectedImfileRow into an equivalent psMetadata9399 *9400 * @return A psMetadata pointer or NULL on error9401 */9402 9403 psMetadata *detCorrectedImfileMetadataFromObject(9404 const detCorrectedImfileRow *object ///< fooRow to convert into a psMetadata9405 );9406 9407 /** Convert a psMetadata into an equivalent fooRow9408 *9409 * @return A detCorrectedImfileRow pointer or NULL on error9410 */9411 9412 detCorrectedImfileRow *detCorrectedImfileObjectFromMetadata(9413 psMetadata *md ///< psMetadata to convert into a fooRow9414 );9415 /** Selects up to limit rows from the database and returns as detCorrectedImfileRow objects in a psArray9416 *9417 * See psDBSelectRows() for documentation on the format of where.9418 *9419 * @return A psArray pointer or NULL on error9420 */9421 9422 psArray *detCorrectedImfileSelectRowObjects(9423 psDB *dbh, ///< Database handle9424 const psMetadata *where, ///< Row match criteria9425 unsigned long long limit ///< Maximum number of elements to return9426 );9427 /** Deletes a row from the database coresponding to an detCorrectedImfile9428 *9429 * Note that a 'where' search psMetadata is constructed from each object and9430 * used to find rows to delete.9431 *9432 * @return A The number of rows removed or a negative value on error9433 */9434 9435 bool detCorrectedImfileDeleteObject(9436 psDB *dbh, ///< Database handle9437 const detCorrectedImfileRow *object ///< Object to delete9438 );9439 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9440 *9441 * Note that a 'where' search psMetadata is constructed from each object and9442 * used to find rows to delete.9443 *9444 * @return A The number of rows removed or a negative value on error9445 */9446 9447 long long detCorrectedImfileDeleteRowObjects(9448 psDB *dbh, ///< Database handle9449 const psArray *objects, ///< Array of objects to delete9450 unsigned long long limit ///< Maximum number of elements to delete9451 );9452 /** Formats and prints an array of detCorrectedImfileRow objects9453 *9454 * When mdcf is set the formated output is in psMetadataConfig9455 * format, otherwise it is in a simple tabular format.9456 *9457 * @return true on success9458 */9459 9460 bool detCorrectedImfilePrintObjects(9461 FILE *stream, ///< a stream9462 psArray *objects, ///< An array of detCorrectedImfileRow objects9463 bool mdcf ///< format as mdconfig or simple9464 );9465 /** Formats and prints an detCorrectedImfileRow object9466 *9467 * When mdcf is set the formated output is in psMetadataConfig9468 * format, otherwise it is in a simple tabular format.9469 *9470 * @return true on success9471 */9472 9473 bool detCorrectedImfilePrintObject(9474 FILE *stream, ///< a stream9475 detCorrectedImfileRow *object, ///< an detCorrectedImfileRow object9476 bool mdcf ///< format as mdconfig or simple9477 );9478 /** magicRunRow data structure9479 *9480 * Structure for representing a single row of magicRun table data.9481 */9482 9483 typedef struct {9484 psS64 magic_id;9485 char *state;9486 char *workdir;9487 char *workdir_state;9488 char *label;9489 char *dvodb;9490 psTime* registered;9491 } magicRunRow;9492 9493 /** Creates a new magicRunRow object9494 *9495 * @return A new magicRunRow object or NULL on failure.9496 */9497 9498 magicRunRow *magicRunRowAlloc(9499 psS64 magic_id,9500 const char *state,9501 const char *workdir,9502 const char *workdir_state,9503 const char *label,9504 const char *dvodb,9505 psTime* registered9506 );9507 9508 /** Creates a new magicRun table9509 *9510 * @return true on success9511 */9512 9513 bool magicRunCreateTable(9514 psDB *dbh ///< Database handle9515 );9516 9517 /** Deletes a magicRun table9518 *9519 * @return true on success9520 */9521 9522 bool magicRunDropTable(9523 psDB *dbh ///< Database handle9524 );9525 9526 /** Insert a single row into a table9527 *9528 * This function constructs and inserts a single row based on it's parameters.9529 *9530 * @return true on success9531 */9532 9533 bool magicRunInsert(9534 psDB *dbh, ///< Database handle9535 psS64 magic_id,9536 const char *state,9537 const char *workdir,9538 const char *workdir_state,9539 const char *label,9540 const char *dvodb,9541 psTime* registered9542 );9543 9544 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9545 *9546 * @return A The number of rows removed or a negative value on error9547 */9548 9549 long long magicRunDelete(9550 psDB *dbh, ///< Database handle9551 const psMetadata *where, ///< Row match criteria9552 unsigned long long limit ///< Maximum number of elements to delete9553 );9554 9555 /** Insert a single magicRunRow object into a table9556 *9557 * This function constructs and inserts a single row based on it's parameters.9558 *9559 * @return true on success9560 */9561 9562 bool magicRunInsertObject(9563 psDB *dbh, ///< Database handle9564 magicRunRow *object ///< magicRunRow object9565 );9566 9567 /** Insert an array of magicRunRow object into a table9568 *9569 * This function constructs and inserts multiple rows based on it's parameters.9570 *9571 * @return true on success9572 */9573 9574 bool magicRunInsertObjects(9575 psDB *dbh, ///< Database handle9576 psArray *objects ///< array of magicRunRow objects9577 );9578 9579 /** Insert data from a binary FITS table magicRunRow into the database9580 *9581 * This function expects a psFits object with a FITS table as the first9582 * extension. The table must have at least one row of data in it, that is of9583 * the appropriate format (number of columns and their type). All other9584 * extensions are ignored.9585 *9586 * @return true on success9587 */9588 9589 bool magicRunInsertFits(9590 psDB *dbh, ///< Database handle9591 const psFits *fits ///< psFits object9592 );9593 9594 /** Selects up to limit from the database and returns them in a binary FITS table9595 *9596 * This function assumes an empty psFits object and will create a FITS table9597 * as the first extension.9598 *9599 * See psDBSelectRows() for documentation on the format of where.9600 *9601 * @return true on success9602 */9603 9604 bool magicRunSelectRowsFits(9605 psDB *dbh, ///< Database handle9606 psFits *fits, ///< psFits object9607 const psMetadata *where, ///< Row match criteria9608 unsigned long long limit ///< Maximum number of elements to return9609 );9610 9611 /** Convert a magicRunRow into an equivalent psMetadata9612 *9613 * @return A psMetadata pointer or NULL on error9614 */9615 9616 psMetadata *magicRunMetadataFromObject(9617 const magicRunRow *object ///< fooRow to convert into a psMetadata9618 );9619 9620 /** Convert a psMetadata into an equivalent fooRow9621 *9622 * @return A magicRunRow pointer or NULL on error9623 */9624 9625 magicRunRow *magicRunObjectFromMetadata(9626 psMetadata *md ///< psMetadata to convert into a fooRow9627 );9628 /** Selects up to limit rows from the database and returns as magicRunRow objects in a psArray9629 *9630 * See psDBSelectRows() for documentation on the format of where.9631 *9632 * @return A psArray pointer or NULL on error9633 */9634 9635 psArray *magicRunSelectRowObjects(9636 psDB *dbh, ///< Database handle9637 const psMetadata *where, ///< Row match criteria9638 unsigned long long limit ///< Maximum number of elements to return9639 );9640 /** Deletes a row from the database coresponding to an magicRun9641 *9642 * Note that a 'where' search psMetadata is constructed from each object and9643 * used to find rows to delete.9644 *9645 * @return A The number of rows removed or a negative value on error9646 */9647 9648 bool magicRunDeleteObject(9649 psDB *dbh, ///< Database handle9650 const magicRunRow *object ///< Object to delete9651 );9652 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9653 *9654 * Note that a 'where' search psMetadata is constructed from each object and9655 * used to find rows to delete.9656 *9657 * @return A The number of rows removed or a negative value on error9658 */9659 9660 long long magicRunDeleteRowObjects(9661 psDB *dbh, ///< Database handle9662 const psArray *objects, ///< Array of objects to delete9663 unsigned long long limit ///< Maximum number of elements to delete9664 );9665 /** Formats and prints an array of magicRunRow objects9666 *9667 * When mdcf is set the formated output is in psMetadataConfig9668 * format, otherwise it is in a simple tabular format.9669 *9670 * @return true on success9671 */9672 9673 bool magicRunPrintObjects(9674 FILE *stream, ///< a stream9675 psArray *objects, ///< An array of magicRunRow objects9676 bool mdcf ///< format as mdconfig or simple9677 );9678 /** Formats and prints an magicRunRow object9679 *9680 * When mdcf is set the formated output is in psMetadataConfig9681 * format, otherwise it is in a simple tabular format.9682 *9683 * @return true on success9684 */9685 9686 bool magicRunPrintObject(9687 FILE *stream, ///< a stream9688 magicRunRow *object, ///< an magicRunRow object9689 bool mdcf ///< format as mdconfig or simple9690 );9691 /** magicInputSkyfileRow data structure9692 *9693 * Structure for representing a single row of magicInputSkyfile table data.9694 */9695 9696 typedef struct {9697 psS64 magic_id;9698 psS64 diff_id;9699 char *node;9700 } magicInputSkyfileRow;9701 9702 /** Creates a new magicInputSkyfileRow object9703 *9704 * @return A new magicInputSkyfileRow object or NULL on failure.9705 */9706 9707 magicInputSkyfileRow *magicInputSkyfileRowAlloc(9708 psS64 magic_id,9709 psS64 diff_id,9710 const char *node9711 );9712 9713 /** Creates a new magicInputSkyfile table9714 *9715 * @return true on success9716 */9717 9718 bool magicInputSkyfileCreateTable(9719 psDB *dbh ///< Database handle9720 );9721 9722 /** Deletes a magicInputSkyfile table9723 *9724 * @return true on success9725 */9726 9727 bool magicInputSkyfileDropTable(9728 psDB *dbh ///< Database handle9729 );9730 9731 /** Insert a single row into a table9732 *9733 * This function constructs and inserts a single row based on it's parameters.9734 *9735 * @return true on success9736 */9737 9738 bool magicInputSkyfileInsert(9739 psDB *dbh, ///< Database handle9740 psS64 magic_id,9741 psS64 diff_id,9742 const char *node9743 );9744 9745 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9746 *9747 * @return A The number of rows removed or a negative value on error9748 */9749 9750 long long magicInputSkyfileDelete(9751 psDB *dbh, ///< Database handle9752 const psMetadata *where, ///< Row match criteria9753 unsigned long long limit ///< Maximum number of elements to delete9754 );9755 9756 /** Insert a single magicInputSkyfileRow object into a table9757 *9758 * This function constructs and inserts a single row based on it's parameters.9759 *9760 * @return true on success9761 */9762 9763 bool magicInputSkyfileInsertObject(9764 psDB *dbh, ///< Database handle9765 magicInputSkyfileRow *object ///< magicInputSkyfileRow object9766 );9767 9768 /** Insert an array of magicInputSkyfileRow object into a table9769 *9770 * This function constructs and inserts multiple rows based on it's parameters.9771 *9772 * @return true on success9773 */9774 9775 bool magicInputSkyfileInsertObjects(9776 psDB *dbh, ///< Database handle9777 psArray *objects ///< array of magicInputSkyfileRow objects9778 );9779 9780 /** Insert data from a binary FITS table magicInputSkyfileRow into the database9781 *9782 * This function expects a psFits object with a FITS table as the first9783 * extension. The table must have at least one row of data in it, that is of9784 * the appropriate format (number of columns and their type). All other9785 * extensions are ignored.9786 *9787 * @return true on success9788 */9789 9790 bool magicInputSkyfileInsertFits(9791 psDB *dbh, ///< Database handle9792 const psFits *fits ///< psFits object9793 );9794 9795 /** Selects up to limit from the database and returns them in a binary FITS table9796 *9797 * This function assumes an empty psFits object and will create a FITS table9798 * as the first extension.9799 *9800 * See psDBSelectRows() for documentation on the format of where.9801 *9802 * @return true on success9803 */9804 9805 bool magicInputSkyfileSelectRowsFits(9806 psDB *dbh, ///< Database handle9807 psFits *fits, ///< psFits object9808 const psMetadata *where, ///< Row match criteria9809 unsigned long long limit ///< Maximum number of elements to return9810 );9811 9812 /** Convert a magicInputSkyfileRow into an equivalent psMetadata9813 *9814 * @return A psMetadata pointer or NULL on error9815 */9816 9817 psMetadata *magicInputSkyfileMetadataFromObject(9818 const magicInputSkyfileRow *object ///< fooRow to convert into a psMetadata9819 );9820 9821 /** Convert a psMetadata into an equivalent fooRow9822 *9823 * @return A magicInputSkyfileRow pointer or NULL on error9824 */9825 9826 magicInputSkyfileRow *magicInputSkyfileObjectFromMetadata(9827 psMetadata *md ///< psMetadata to convert into a fooRow9828 );9829 /** Selects up to limit rows from the database and returns as magicInputSkyfileRow objects in a psArray9830 *9831 * See psDBSelectRows() for documentation on the format of where.9832 *9833 * @return A psArray pointer or NULL on error9834 */9835 9836 psArray *magicInputSkyfileSelectRowObjects(9837 psDB *dbh, ///< Database handle9838 const psMetadata *where, ///< Row match criteria9839 unsigned long long limit ///< Maximum number of elements to return9840 );9841 /** Deletes a row from the database coresponding to an magicInputSkyfile9842 *9843 * Note that a 'where' search psMetadata is constructed from each object and9844 * used to find rows to delete.9845 *9846 * @return A The number of rows removed or a negative value on error9847 */9848 9849 bool magicInputSkyfileDeleteObject(9850 psDB *dbh, ///< Database handle9851 const magicInputSkyfileRow *object ///< Object to delete9852 );9853 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9854 *9855 * Note that a 'where' search psMetadata is constructed from each object and9856 * used to find rows to delete.9857 *9858 * @return A The number of rows removed or a negative value on error9859 */9860 9861 long long magicInputSkyfileDeleteRowObjects(9862 psDB *dbh, ///< Database handle9863 const psArray *objects, ///< Array of objects to delete9864 unsigned long long limit ///< Maximum number of elements to delete9865 );9866 /** Formats and prints an array of magicInputSkyfileRow objects9867 *9868 * When mdcf is set the formated output is in psMetadataConfig9869 * format, otherwise it is in a simple tabular format.9870 *9871 * @return true on success9872 */9873 9874 bool magicInputSkyfilePrintObjects(9875 FILE *stream, ///< a stream9876 psArray *objects, ///< An array of magicInputSkyfileRow objects9877 bool mdcf ///< format as mdconfig or simple9878 );9879 /** Formats and prints an magicInputSkyfileRow object9880 *9881 * When mdcf is set the formated output is in psMetadataConfig9882 * format, otherwise it is in a simple tabular format.9883 *9884 * @return true on success9885 */9886 9887 bool magicInputSkyfilePrintObject(9888 FILE *stream, ///< a stream9889 magicInputSkyfileRow *object, ///< an magicInputSkyfileRow object9890 bool mdcf ///< format as mdconfig or simple9891 );9892 /** magicTreeRow data structure9893 *9894 * Structure for representing a single row of magicTree table data.9895 */9896 9897 typedef struct {9898 psS64 magic_id;9899 char *node;9900 char *dep;9901 } magicTreeRow;9902 9903 /** Creates a new magicTreeRow object9904 *9905 * @return A new magicTreeRow object or NULL on failure.9906 */9907 9908 magicTreeRow *magicTreeRowAlloc(9909 psS64 magic_id,9910 const char *node,9911 const char *dep9912 );9913 9914 /** Creates a new magicTree table9915 *9916 * @return true on success9917 */9918 9919 bool magicTreeCreateTable(9920 psDB *dbh ///< Database handle9921 );9922 9923 /** Deletes a magicTree table9924 *9925 * @return true on success9926 */9927 9928 bool magicTreeDropTable(9929 psDB *dbh ///< Database handle9930 );9931 9932 /** Insert a single row into a table9933 *9934 * This function constructs and inserts a single row based on it's parameters.9935 *9936 * @return true on success9937 */9938 9939 bool magicTreeInsert(9940 psDB *dbh, ///< Database handle9941 psS64 magic_id,9942 const char *node,9943 const char *dep9944 );9945 9946 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.9947 *9948 * @return A The number of rows removed or a negative value on error9949 */9950 9951 long long magicTreeDelete(9952 psDB *dbh, ///< Database handle9953 const psMetadata *where, ///< Row match criteria9954 unsigned long long limit ///< Maximum number of elements to delete9955 );9956 9957 /** Insert a single magicTreeRow object into a table9958 *9959 * This function constructs and inserts a single row based on it's parameters.9960 *9961 * @return true on success9962 */9963 9964 bool magicTreeInsertObject(9965 psDB *dbh, ///< Database handle9966 magicTreeRow *object ///< magicTreeRow object9967 );9968 9969 /** Insert an array of magicTreeRow object into a table9970 *9971 * This function constructs and inserts multiple rows based on it's parameters.9972 *9973 * @return true on success9974 */9975 9976 bool magicTreeInsertObjects(9977 psDB *dbh, ///< Database handle9978 psArray *objects ///< array of magicTreeRow objects9979 );9980 9981 /** Insert data from a binary FITS table magicTreeRow into the database9982 *9983 * This function expects a psFits object with a FITS table as the first9984 * extension. The table must have at least one row of data in it, that is of9985 * the appropriate format (number of columns and their type). All other9986 * extensions are ignored.9987 *9988 * @return true on success9989 */9990 9991 bool magicTreeInsertFits(9992 psDB *dbh, ///< Database handle9993 const psFits *fits ///< psFits object9994 );9995 9996 /** Selects up to limit from the database and returns them in a binary FITS table9997 *9998 * This function assumes an empty psFits object and will create a FITS table9999 * as the first extension.10000 *10001 * See psDBSelectRows() for documentation on the format of where.10002 *10003 * @return true on success10004 */10005 10006 bool magicTreeSelectRowsFits(10007 psDB *dbh, ///< Database handle10008 psFits *fits, ///< psFits object10009 const psMetadata *where, ///< Row match criteria10010 unsigned long long limit ///< Maximum number of elements to return10011 );10012 10013 /** Convert a magicTreeRow into an equivalent psMetadata10014 *10015 * @return A psMetadata pointer or NULL on error10016 */10017 10018 psMetadata *magicTreeMetadataFromObject(10019 const magicTreeRow *object ///< fooRow to convert into a psMetadata10020 );10021 10022 /** Convert a psMetadata into an equivalent fooRow10023 *10024 * @return A magicTreeRow pointer or NULL on error10025 */10026 10027 magicTreeRow *magicTreeObjectFromMetadata(10028 psMetadata *md ///< psMetadata to convert into a fooRow10029 );10030 /** Selects up to limit rows from the database and returns as magicTreeRow objects in a psArray10031 *10032 * See psDBSelectRows() for documentation on the format of where.10033 *10034 * @return A psArray pointer or NULL on error10035 */10036 10037 psArray *magicTreeSelectRowObjects(10038 psDB *dbh, ///< Database handle10039 const psMetadata *where, ///< Row match criteria10040 unsigned long long limit ///< Maximum number of elements to return10041 );10042 /** Deletes a row from the database coresponding to an magicTree10043 *10044 * Note that a 'where' search psMetadata is constructed from each object and10045 * used to find rows to delete.10046 *10047 * @return A The number of rows removed or a negative value on error10048 */10049 10050 bool magicTreeDeleteObject(10051 psDB *dbh, ///< Database handle10052 const magicTreeRow *object ///< Object to delete10053 );10054 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.10055 *10056 * Note that a 'where' search psMetadata is constructed from each object and10057 * used to find rows to delete.10058 *10059 * @return A The number of rows removed or a negative value on error10060 */10061 10062 long long magicTreeDeleteRowObjects(10063 psDB *dbh, ///< Database handle10064 const psArray *objects, ///< Array of objects to delete10065 unsigned long long limit ///< Maximum number of elements to delete10066 );10067 /** Formats and prints an array of magicTreeRow objects10068 *10069 * When mdcf is set the formated output is in psMetadataConfig10070 * format, otherwise it is in a simple tabular format.10071 *10072 * @return true on success10073 */10074 10075 bool magicTreePrintObjects(10076 FILE *stream, ///< a stream10077 psArray *objects, ///< An array of magicTreeRow objects10078 bool mdcf ///< format as mdconfig or simple10079 );10080 /** Formats and prints an magicTreeRow object10081 *10082 * When mdcf is set the formated output is in psMetadataConfig10083 * format, otherwise it is in a simple tabular format.10084 *10085 * @return true on success10086 */10087 10088 bool magicTreePrintObject(10089 FILE *stream, ///< a stream10090 magicTreeRow *object, ///< an magicTreeRow object10091 bool mdcf ///< format as mdconfig or simple10092 );10093 /** magicNodeResultRow data structure10094 *10095 * Structure for representing a single row of magicNodeResult table data.10096 */10097 10098 typedef struct {10099 psS64 magic_id;10100 char *node;10101 char *uri;10102 } magicNodeResultRow;10103 10104 /** Creates a new magicNodeResultRow object10105 *10106 * @return A new magicNodeResultRow object or NULL on failure.10107 */10108 10109 magicNodeResultRow *magicNodeResultRowAlloc(10110 psS64 magic_id,10111 const char *node,10112 const char *uri10113 );10114 10115 /** Creates a new magicNodeResult table10116 *10117 * @return true on success10118 */10119 10120 bool magicNodeResultCreateTable(10121 psDB *dbh ///< Database handle10122 );10123 10124 /** Deletes a magicNodeResult table10125 *10126 * @return true on success10127 */10128 10129 bool magicNodeResultDropTable(10130 psDB *dbh ///< Database handle10131 );10132 10133 /** Insert a single row into a table10134 *10135 * This function constructs and inserts a single row based on it's parameters.10136 *10137 * @return true on success10138 */10139 10140 bool magicNodeResultInsert(10141 psDB *dbh, ///< Database handle10142 psS64 magic_id,10143 const char *node,10144 const char *uri10145 );10146 10147 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.10148 *10149 * @return A The number of rows removed or a negative value on error10150 */10151 10152 long long magicNodeResultDelete(10153 psDB *dbh, ///< Database handle10154 const psMetadata *where, ///< Row match criteria10155 unsigned long long limit ///< Maximum number of elements to delete10156 );10157 10158 /** Insert a single magicNodeResultRow object into a table10159 *10160 * This function constructs and inserts a single row based on it's parameters.10161 *10162 * @return true on success10163 */10164 10165 bool magicNodeResultInsertObject(10166 psDB *dbh, ///< Database handle10167 magicNodeResultRow *object ///< magicNodeResultRow object10168 );10169 10170 /** Insert an array of magicNodeResultRow object into a table10171 *10172 * This function constructs and inserts multiple rows based on it's parameters.10173 *10174 * @return true on success10175 */10176 10177 bool magicNodeResultInsertObjects(10178 psDB *dbh, ///< Database handle10179 psArray *objects ///< array of magicNodeResultRow objects10180 );10181 10182 /** Insert data from a binary FITS table magicNodeResultRow into the database10183 *10184 * This function expects a psFits object with a FITS table as the first10185 * extension. The table must have at least one row of data in it, that is of10186 * the appropriate format (number of columns and their type). All other10187 * extensions are ignored.10188 *10189 * @return true on success10190 */10191 10192 bool magicNodeResultInsertFits(10193 psDB *dbh, ///< Database handle10194 const psFits *fits ///< psFits object10195 );10196 10197 /** Selects up to limit from the database and returns them in a binary FITS table10198 *10199 * This function assumes an empty psFits object and will create a FITS table10200 * as the first extension.10201 *10202 * See psDBSelectRows() for documentation on the format of where.10203 *10204 * @return true on success10205 */10206 10207 bool magicNodeResultSelectRowsFits(10208 psDB *dbh, ///< Database handle10209 psFits *fits, ///< psFits object10210 const psMetadata *where, ///< Row match criteria10211 unsigned long long limit ///< Maximum number of elements to return10212 );10213 10214 /** Convert a magicNodeResultRow into an equivalent psMetadata10215 *10216 * @return A psMetadata pointer or NULL on error10217 */10218 10219 psMetadata *magicNodeResultMetadataFromObject(10220 const magicNodeResultRow *object ///< fooRow to convert into a psMetadata10221 );10222 10223 /** Convert a psMetadata into an equivalent fooRow10224 *10225 * @return A magicNodeResultRow pointer or NULL on error10226 */10227 10228 magicNodeResultRow *magicNodeResultObjectFromMetadata(10229 psMetadata *md ///< psMetadata to convert into a fooRow10230 );10231 /** Selects up to limit rows from the database and returns as magicNodeResultRow objects in a psArray10232 *10233 * See psDBSelectRows() for documentation on the format of where.10234 *10235 * @return A psArray pointer or NULL on error10236 */10237 10238 psArray *magicNodeResultSelectRowObjects(10239 psDB *dbh, ///< Database handle10240 const psMetadata *where, ///< Row match criteria10241 unsigned long long limit ///< Maximum number of elements to return10242 );10243 /** Deletes a row from the database coresponding to an magicNodeResult10244 *10245 * Note that a 'where' search psMetadata is constructed from each object and10246 * used to find rows to delete.10247 *10248 * @return A The number of rows removed or a negative value on error10249 */10250 10251 bool magicNodeResultDeleteObject(10252 psDB *dbh, ///< Database handle10253 const magicNodeResultRow *object ///< Object to delete10254 );10255 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.10256 *10257 * Note that a 'where' search psMetadata is constructed from each object and10258 * used to find rows to delete.10259 *10260 * @return A The number of rows removed or a negative value on error10261 */10262 10263 long long magicNodeResultDeleteRowObjects(10264 psDB *dbh, ///< Database handle10265 const psArray *objects, ///< Array of objects to delete10266 unsigned long long limit ///< Maximum number of elements to delete10267 );10268 /** Formats and prints an array of magicNodeResultRow objects10269 *10270 * When mdcf is set the formated output is in psMetadataConfig10271 * format, otherwise it is in a simple tabular format.10272 *10273 * @return true on success10274 */10275 10276 bool magicNodeResultPrintObjects(10277 FILE *stream, ///< a stream10278 psArray *objects, ///< An array of magicNodeResultRow objects10279 bool mdcf ///< format as mdconfig or simple10280 );10281 /** Formats and prints an magicNodeResultRow object10282 *10283 * When mdcf is set the formated output is in psMetadataConfig10284 * format, otherwise it is in a simple tabular format.10285 *10286 * @return true on success10287 */10288 10289 bool magicNodeResultPrintObject(10290 FILE *stream, ///< a stream10291 magicNodeResultRow *object, ///< an magicNodeResultRow object10292 bool mdcf ///< format as mdconfig or simple10293 );10294 /** magicMaskRow data structure10295 *10296 * Structure for representing a single row of magicMask table data.10297 */10298 10299 typedef struct {10300 psS64 magic_id;10301 char *uri;10302 } magicMaskRow;10303 10304 /** Creates a new magicMaskRow object10305 *10306 * @return A new magicMaskRow object or NULL on failure.10307 */10308 10309 magicMaskRow *magicMaskRowAlloc(10310 psS64 magic_id,10311 const char *uri10312 );10313 10314 /** Creates a new magicMask table10315 *10316 * @return true on success10317 */10318 10319 bool magicMaskCreateTable(10320 psDB *dbh ///< Database handle10321 );10322 10323 /** Deletes a magicMask table10324 *10325 * @return true on success10326 */10327 10328 bool magicMaskDropTable(10329 psDB *dbh ///< Database handle10330 );10331 10332 /** Insert a single row into a table10333 *10334 * This function constructs and inserts a single row based on it's parameters.10335 *10336 * @return true on success10337 */10338 10339 bool magicMaskInsert(10340 psDB *dbh, ///< Database handle10341 psS64 magic_id,10342 const char *uri10343 );10344 10345 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.10346 *10347 * @return A The number of rows removed or a negative value on error10348 */10349 10350 long long magicMaskDelete(10351 psDB *dbh, ///< Database handle10352 const psMetadata *where, ///< Row match criteria10353 unsigned long long limit ///< Maximum number of elements to delete10354 );10355 10356 /** Insert a single magicMaskRow object into a table10357 *10358 * This function constructs and inserts a single row based on it's parameters.10359 *10360 * @return true on success10361 */10362 10363 bool magicMaskInsertObject(10364 psDB *dbh, ///< Database handle10365 magicMaskRow *object ///< magicMaskRow object10366 );10367 10368 /** Insert an array of magicMaskRow object into a table10369 *10370 * This function constructs and inserts multiple rows based on it's parameters.10371 *10372 * @return true on success10373 */10374 10375 bool magicMaskInsertObjects(10376 psDB *dbh, ///< Database handle10377 psArray *objects ///< array of magicMaskRow objects10378 );10379 10380 /** Insert data from a binary FITS table magicMaskRow into the database10381 *10382 * This function expects a psFits object with a FITS table as the first10383 * extension. The table must have at least one row of data in it, that is of10384 * the appropriate format (number of columns and their type). All other10385 * extensions are ignored.10386 *10387 * @return true on success10388 */10389 10390 bool magicMaskInsertFits(10391 psDB *dbh, ///< Database handle10392 const psFits *fits ///< psFits object10393 );10394 10395 /** Selects up to limit from the database and returns them in a binary FITS table10396 *10397 * This function assumes an empty psFits object and will create a FITS table10398 * as the first extension.10399 *10400 * See psDBSelectRows() for documentation on the format of where.10401 *10402 * @return true on success10403 */10404 10405 bool magicMaskSelectRowsFits(10406 psDB *dbh, ///< Database handle10407 psFits *fits, ///< psFits object10408 const psMetadata *where, ///< Row match criteria10409 unsigned long long limit ///< Maximum number of elements to return10410 );10411 10412 /** Convert a magicMaskRow into an equivalent psMetadata10413 *10414 * @return A psMetadata pointer or NULL on error10415 */10416 10417 psMetadata *magicMaskMetadataFromObject(10418 const magicMaskRow *object ///< fooRow to convert into a psMetadata10419 );10420 10421 /** Convert a psMetadata into an equivalent fooRow10422 *10423 * @return A magicMaskRow pointer or NULL on error10424 */10425 10426 magicMaskRow *magicMaskObjectFromMetadata(10427 psMetadata *md ///< psMetadata to convert into a fooRow10428 );10429 /** Selects up to limit rows from the database and returns as magicMaskRow objects in a psArray10430 *10431 * See psDBSelectRows() for documentation on the format of where.10432 *10433 * @return A psArray pointer or NULL on error10434 */10435 10436 psArray *magicMaskSelectRowObjects(10437 psDB *dbh, ///< Database handle10438 const psMetadata *where, ///< Row match criteria10439 unsigned long long limit ///< Maximum number of elements to return10440 );10441 /** Deletes a row from the database coresponding to an magicMask10442 *10443 * Note that a 'where' search psMetadata is constructed from each object and10444 * used to find rows to delete.10445 *10446 * @return A The number of rows removed or a negative value on error10447 */10448 10449 bool magicMaskDeleteObject(10450 psDB *dbh, ///< Database handle10451 const magicMaskRow *object ///< Object to delete10452 );10453 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.10454 *10455 * Note that a 'where' search psMetadata is constructed from each object and10456 * used to find rows to delete.10457 *10458 * @return A The number of rows removed or a negative value on error10459 */10460 10461 long long magicMaskDeleteRowObjects(10462 psDB *dbh, ///< Database handle10463 const psArray *objects, ///< Array of objects to delete10464 unsigned long long limit ///< Maximum number of elements to delete10465 );10466 /** Formats and prints an array of magicMaskRow objects10467 *10468 * When mdcf is set the formated output is in psMetadataConfig10469 * format, otherwise it is in a simple tabular format.10470 *10471 * @return true on success10472 */10473 10474 bool magicMaskPrintObjects(10475 FILE *stream, ///< a stream10476 psArray *objects, ///< An array of magicMaskRow objects10477 bool mdcf ///< format as mdconfig or simple10478 );10479 /** Formats and prints an magicMaskRow object10480 *10481 * When mdcf is set the formated output is in psMetadataConfig10482 * format, otherwise it is in a simple tabular format.10483 *10484 * @return true on success10485 */10486 10487 bool magicMaskPrintObject(10488 FILE *stream, ///< a stream10489 magicMaskRow *object, ///< an magicMaskRow object10490 bool mdcf ///< format as mdconfig or simple10491 );10492 /** magicSkyfileMaskRow data structure10493 *10494 * Structure for representing a single row of magicSkyfileMask table data.10495 */10496 10497 typedef struct {10498 psS64 magic_id;10499 psS64 diff_id;10500 char *uri;10501 } magicSkyfileMaskRow;10502 10503 /** Creates a new magicSkyfileMaskRow object10504 *10505 * @return A new magicSkyfileMaskRow object or NULL on failure.10506 */10507 10508 magicSkyfileMaskRow *magicSkyfileMaskRowAlloc(10509 psS64 magic_id,10510 psS64 diff_id,10511 const char *uri10512 );10513 10514 /** Creates a new magicSkyfileMask table10515 *10516 * @return true on success10517 */10518 10519 bool magicSkyfileMaskCreateTable(10520 psDB *dbh ///< Database handle10521 );10522 10523 /** Deletes a magicSkyfileMask table10524 *10525 * @return true on success10526 */10527 10528 bool magicSkyfileMaskDropTable(10529 psDB *dbh ///< Database handle10530 );10531 10532 /** Insert a single row into a table10533 *10534 * This function constructs and inserts a single row based on it's parameters.10535 *10536 * @return true on success10537 */10538 10539 bool magicSkyfileMaskInsert(10540 psDB *dbh, ///< Database handle10541 psS64 magic_id,10542 psS64 diff_id,10543 const char *uri10544 );10545 10546 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.10547 *10548 * @return A The number of rows removed or a negative value on error10549 */10550 10551 long long magicSkyfileMaskDelete(10552 psDB *dbh, ///< Database handle10553 const psMetadata *where, ///< Row match criteria10554 unsigned long long limit ///< Maximum number of elements to delete10555 );10556 10557 /** Insert a single magicSkyfileMaskRow object into a table10558 *10559 * This function constructs and inserts a single row based on it's parameters.10560 *10561 * @return true on success10562 */10563 10564 bool magicSkyfileMaskInsertObject(10565 psDB *dbh, ///< Database handle10566 magicSkyfileMaskRow *object ///< magicSkyfileMaskRow object10567 );10568 10569 /** Insert an array of magicSkyfileMaskRow object into a table10570 *10571 * This function constructs and inserts multiple rows based on it's parameters.10572 *10573 * @return true on success10574 */10575 10576 bool magicSkyfileMaskInsertObjects(10577 psDB *dbh, ///< Database handle10578 psArray *objects ///< array of magicSkyfileMaskRow objects10579 );10580 10581 /** Insert data from a binary FITS table magicSkyfileMaskRow into the database10582 *10583 * This function expects a psFits object with a FITS table as the first10584 * extension. The table must have at least one row of data in it, that is of10585 * the appropriate format (number of columns and their type). All other10586 * extensions are ignored.10587 *10588 * @return true on success10589 */10590 10591 bool magicSkyfileMaskInsertFits(10592 psDB *dbh, ///< Database handle10593 const psFits *fits ///< psFits object10594 );10595 10596 /** Selects up to limit from the database and returns them in a binary FITS table10597 *10598 * This function assumes an empty psFits object and will create a FITS table10599 * as the first extension.10600 *10601 * See psDBSelectRows() for documentation on the format of where.10602 *10603 * @return true on success10604 */10605 10606 bool magicSkyfileMaskSelectRowsFits(10607 psDB *dbh, ///< Database handle10608 psFits *fits, ///< psFits object10609 const psMetadata *where, ///< Row match criteria10610 unsigned long long limit ///< Maximum number of elements to return10611 );10612 10613 /** Convert a magicSkyfileMaskRow into an equivalent psMetadata10614 *10615 * @return A psMetadata pointer or NULL on error10616 */10617 10618 psMetadata *magicSkyfileMaskMetadataFromObject(10619 const magicSkyfileMaskRow *object ///< fooRow to convert into a psMetadata10620 );10621 10622 /** Convert a psMetadata into an equivalent fooRow10623 *10624 * @return A magicSkyfileMaskRow pointer or NULL on error10625 */10626 10627 magicSkyfileMaskRow *magicSkyfileMaskObjectFromMetadata(10628 psMetadata *md ///< psMetadata to convert into a fooRow10629 );10630 /** Selects up to limit rows from the database and returns as magicSkyfileMaskRow objects in a psArray10631 *10632 * See psDBSelectRows() for documentation on the format of where.10633 *10634 * @return A psArray pointer or NULL on error10635 */10636 10637 psArray *magicSkyfileMaskSelectRowObjects(10638 psDB *dbh, ///< Database handle10639 const psMetadata *where, ///< Row match criteria10640 unsigned long long limit ///< Maximum number of elements to return10641 );10642 /** Deletes a row from the database coresponding to an magicSkyfileMask10643 *10644 * Note that a 'where' search psMetadata is constructed from each object and10645 * used to find rows to delete.10646 *10647 * @return A The number of rows removed or a negative value on error10648 */10649 10650 bool magicSkyfileMaskDeleteObject(10651 psDB *dbh, ///< Database handle10652 const magicSkyfileMaskRow *object ///< Object to delete10653 );10654 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.10655 *10656 * Note that a 'where' search psMetadata is constructed from each object and10657 * used to find rows to delete.10658 *10659 * @return A The number of rows removed or a negative value on error10660 */10661 10662 long long magicSkyfileMaskDeleteRowObjects(10663 psDB *dbh, ///< Database handle10664 const psArray *objects, ///< Array of objects to delete10665 unsigned long long limit ///< Maximum number of elements to delete10666 );10667 /** Formats and prints an array of magicSkyfileMaskRow objects10668 *10669 * When mdcf is set the formated output is in psMetadataConfig10670 * format, otherwise it is in a simple tabular format.10671 *10672 * @return true on success10673 */10674 10675 bool magicSkyfileMaskPrintObjects(10676 FILE *stream, ///< a stream10677 psArray *objects, ///< An array of magicSkyfileMaskRow objects10678 bool mdcf ///< format as mdconfig or simple10679 );10680 /** Formats and prints an magicSkyfileMaskRow object10681 *10682 * When mdcf is set the formated output is in psMetadataConfig10683 * format, otherwise it is in a simple tabular format.10684 *10685 * @return true on success10686 */10687 10688 bool magicSkyfileMaskPrintObject(10689 FILE *stream, ///< a stream10690 magicSkyfileMaskRow *object, ///< an magicSkyfileMaskRow object10691 bool mdcf ///< format as mdconfig or simple10692 );10693 8776 10694 8777 /// @} … … 10698 8781 #endif 10699 8782 10700 #endif // MAGICSKYFILEMASK_DB_H8783 #endif // DETRUNSUMMARY_DB_H
Note:
See TracChangeset
for help on using the changeset viewer.
