Changeset 11679 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Feb 6, 2007, 3:46:45 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (72 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r11635 r11679 20 20 /* 21 21 * 22 * This file was generated by glueforge 1.0022 * This file was generated by glueforge 0.36 23 23 * 24 24 * Do NOT directly edit this file. … … 6830 6830 bool mdcf ///< format as mdconfig or simple 6831 6831 ); 6832 /** p4 RunRow data structure6833 * 6834 * Structure for representing a single row of p4 Run table data.6832 /** p4aRunRow data structure 6833 * 6834 * Structure for representing a single row of p4aRun table data. 6835 6835 */ 6836 6836 6837 6837 typedef struct { 6838 psS32 p4_id; 6839 char *survey_mode; 6838 psS32 p4a_id; 6840 6839 char *state; 6841 6840 char *workdir; 6842 char *filter; 6843 char *skycell_id; 6844 char *tess_id; 6845 psF64 ra; 6846 psF64 decl; 6847 char *input_ss; 6848 char *output_ss; 6849 } p4RunRow; 6850 6851 /** Creates a new p4RunRow object 6852 * 6853 * @return A new p4RunRow object or NULL on failure. 6854 */ 6855 6856 p4RunRow *p4RunRowAlloc( 6857 psS32 p4_id, 6858 const char *survey_mode, 6841 bool magic; 6842 } p4aRunRow; 6843 6844 /** Creates a new p4aRunRow object 6845 * 6846 * @return A new p4aRunRow object or NULL on failure. 6847 */ 6848 6849 p4aRunRow *p4aRunRowAlloc( 6850 psS32 p4a_id, 6859 6851 const char *state, 6860 6852 const char *workdir, 6861 const char *filter, 6862 const char *skycell_id, 6863 const char *tess_id, 6864 psF64 ra, 6865 psF64 decl, 6866 const char *input_ss, 6867 const char *output_ss 6868 ); 6869 6870 /** Creates a new p4Run table 6871 * 6872 * @return true on success 6873 */ 6874 6875 bool p4RunCreateTable( 6853 bool magic 6854 ); 6855 6856 /** Creates a new p4aRun table 6857 * 6858 * @return true on success 6859 */ 6860 6861 bool p4aRunCreateTable( 6876 6862 psDB *dbh ///< Database handle 6877 6863 ); 6878 6864 6879 /** Deletes a p4 Run table6880 * 6881 * @return true on success 6882 */ 6883 6884 bool p4 RunDropTable(6865 /** Deletes a p4aRun table 6866 * 6867 * @return true on success 6868 */ 6869 6870 bool p4aRunDropTable( 6885 6871 psDB *dbh ///< Database handle 6886 6872 ); … … 6893 6879 */ 6894 6880 6895 bool p4RunInsert( 6896 psDB *dbh, ///< Database handle 6897 psS32 p4_id, 6898 const char *survey_mode, 6881 bool p4aRunInsert( 6882 psDB *dbh, ///< Database handle 6883 psS32 p4a_id, 6899 6884 const char *state, 6900 6885 const char *workdir, 6901 const char *filter, 6902 const char *skycell_id, 6903 const char *tess_id, 6904 psF64 ra, 6905 psF64 decl, 6906 const char *input_ss, 6907 const char *output_ss 6886 bool magic 6908 6887 ); 6909 6888 … … 6913 6892 */ 6914 6893 6915 long long p4 RunDelete(6894 long long p4aRunDelete( 6916 6895 psDB *dbh, ///< Database handle 6917 6896 const psMetadata *where, ///< Row match criteria … … 6919 6898 ); 6920 6899 6921 /** Insert a single p4 RunRow object into a table6900 /** Insert a single p4aRunRow object into a table 6922 6901 * 6923 6902 * This function constructs and inserts a single row based on it's parameters. … … 6926 6905 */ 6927 6906 6928 bool p4 RunInsertObject(6929 psDB *dbh, ///< Database handle 6930 p4 RunRow *object ///< p4RunRow object6931 ); 6932 6933 /** Insert an array of p4 RunRow object into a table6907 bool p4aRunInsertObject( 6908 psDB *dbh, ///< Database handle 6909 p4aRunRow *object ///< p4aRunRow object 6910 ); 6911 6912 /** Insert an array of p4aRunRow object into a table 6934 6913 * 6935 6914 * This function constructs and inserts multiple rows based on it's parameters. … … 6938 6917 */ 6939 6918 6940 bool p4 RunInsertObjects(6941 psDB *dbh, ///< Database handle 6942 psArray *objects ///< array of p4 RunRow objects6943 ); 6944 6945 /** Insert data from a binary FITS table p4 RunRow into the database6919 bool p4aRunInsertObjects( 6920 psDB *dbh, ///< Database handle 6921 psArray *objects ///< array of p4aRunRow objects 6922 ); 6923 6924 /** Insert data from a binary FITS table p4aRunRow into the database 6946 6925 * 6947 6926 * This function expects a psFits object with a FITS table as the first … … 6953 6932 */ 6954 6933 6955 bool p4 RunInsertFits(6934 bool p4aRunInsertFits( 6956 6935 psDB *dbh, ///< Database handle 6957 6936 const psFits *fits ///< psFits object … … 6968 6947 */ 6969 6948 6970 bool p4 RunSelectRowsFits(6949 bool p4aRunSelectRowsFits( 6971 6950 psDB *dbh, ///< Database handle 6972 6951 psFits *fits, ///< psFits object … … 6975 6954 ); 6976 6955 6977 /** Convert a p4 RunRow into an equivalent psMetadata6956 /** Convert a p4aRunRow into an equivalent psMetadata 6978 6957 * 6979 6958 * @return A psMetadata pointer or NULL on error 6980 6959 */ 6981 6960 6982 psMetadata *p4 RunMetadataFromObject(6983 const p4 RunRow*object ///< fooRow to convert into a psMetadata6961 psMetadata *p4aRunMetadataFromObject( 6962 const p4aRunRow *object ///< fooRow to convert into a psMetadata 6984 6963 ); 6985 6964 6986 6965 /** Convert a psMetadata into an equivalent fooRow 6987 6966 * 6988 * @return A p4 RunRow pointer or NULL on error6989 */ 6990 6991 p4 RunRow *p4RunObjectFromMetadata(6967 * @return A p4aRunRow pointer or NULL on error 6968 */ 6969 6970 p4aRunRow *p4aRunObjectFromMetadata( 6992 6971 psMetadata *md ///< psMetadata to convert into a fooRow 6993 6972 ); 6994 /** Selects up to limit rows from the database and returns as p4 RunRow objects in a psArray6973 /** Selects up to limit rows from the database and returns as p4aRunRow objects in a psArray 6995 6974 * 6996 6975 * See psDBSelectRows() for documentation on the format of where. … … 6999 6978 */ 7000 6979 7001 psArray *p4 RunSelectRowObjects(6980 psArray *p4aRunSelectRowObjects( 7002 6981 psDB *dbh, ///< Database handle 7003 6982 const psMetadata *where, ///< Row match criteria 7004 6983 unsigned long long limit ///< Maximum number of elements to return 7005 6984 ); 7006 /** Deletes a row from the database coresponding to an p4 Run6985 /** Deletes a row from the database coresponding to an p4aRun 7007 6986 * 7008 6987 * Note that a 'where' search psMetadata is constructed from each object and … … 7012 6991 */ 7013 6992 7014 bool p4 RunDeleteObject(7015 psDB *dbh, ///< Database handle 7016 const p4 RunRow *object ///< Object to delete6993 bool p4aRunDeleteObject( 6994 psDB *dbh, ///< Database handle 6995 const p4aRunRow *object ///< Object to delete 7017 6996 ); 7018 6997 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 7024 7003 */ 7025 7004 7026 long long p4 RunDeleteRowObjects(7005 long long p4aRunDeleteRowObjects( 7027 7006 psDB *dbh, ///< Database handle 7028 7007 const psArray *objects, ///< Array of objects to delete 7029 7008 unsigned long long limit ///< Maximum number of elements to delete 7030 7009 ); 7031 /** Formats and prints an array of p4 RunRow objects7010 /** Formats and prints an array of p4aRunRow objects 7032 7011 * 7033 7012 * When mdcf is set the formated output is in psMetadataConfig … … 7037 7016 */ 7038 7017 7039 bool p4 RunPrintObjects(7018 bool p4aRunPrintObjects( 7040 7019 FILE *stream, ///< a stream 7041 psArray *objects, ///< An array of p4 RunRow objects7020 psArray *objects, ///< An array of p4aRunRow objects 7042 7021 bool mdcf ///< format as mdconfig or simple 7043 7022 ); 7044 /** Formats and prints an p4 RunRow object7023 /** Formats and prints an p4aRunRow object 7045 7024 * 7046 7025 * When mdcf is set the formated output is in psMetadataConfig … … 7050 7029 */ 7051 7030 7052 bool p4 RunPrintObject(7031 bool p4aRunPrintObject( 7053 7032 FILE *stream, ///< a stream 7054 p4 RunRow *object, ///< an p4RunRow object7033 p4aRunRow *object, ///< an p4aRunRow object 7055 7034 bool mdcf ///< format as mdconfig or simple 7056 7035 ); 7057 /** p4 InputImfileRow data structure7058 * 7059 * Structure for representing a single row of p4 InputImfiletable data.7036 /** p4aInputExpRow data structure 7037 * 7038 * Structure for representing a single row of p4aInputExp table data. 7060 7039 */ 7061 7040 7062 7041 typedef struct { 7063 psS32 p4 _id;7042 psS32 p4a_id; 7064 7043 char *exp_tag; 7065 7044 psS32 p3_version; 7066 char *class_id; 7067 } p4InputImfileRow; 7068 7069 /** Creates a new p4InputImfileRow object 7070 * 7071 * @return A new p4InputImfileRow object or NULL on failure. 7072 */ 7073 7074 p4InputImfileRow *p4InputImfileRowAlloc( 7075 psS32 p4_id, 7045 } p4aInputExpRow; 7046 7047 /** Creates a new p4aInputExpRow object 7048 * 7049 * @return A new p4aInputExpRow object or NULL on failure. 7050 */ 7051 7052 p4aInputExpRow *p4aInputExpRowAlloc( 7053 psS32 p4a_id, 7076 7054 const char *exp_tag, 7077 psS32 p3_version, 7078 const char *class_id 7079 ); 7080 7081 /** Creates a new p4InputImfile table 7082 * 7083 * @return true on success 7084 */ 7085 7086 bool p4InputImfileCreateTable( 7055 psS32 p3_version 7056 ); 7057 7058 /** Creates a new p4aInputExp table 7059 * 7060 * @return true on success 7061 */ 7062 7063 bool p4aInputExpCreateTable( 7087 7064 psDB *dbh ///< Database handle 7088 7065 ); 7089 7066 7090 /** Deletes a p4 InputImfiletable7091 * 7092 * @return true on success 7093 */ 7094 7095 bool p4 InputImfileDropTable(7067 /** Deletes a p4aInputExp table 7068 * 7069 * @return true on success 7070 */ 7071 7072 bool p4aInputExpDropTable( 7096 7073 psDB *dbh ///< Database handle 7097 7074 ); … … 7104 7081 */ 7105 7082 7106 bool p4 InputImfileInsert(7107 psDB *dbh, ///< Database handle 7108 psS32 p4 _id,7083 bool p4aInputExpInsert( 7084 psDB *dbh, ///< Database handle 7085 psS32 p4a_id, 7109 7086 const char *exp_tag, 7110 psS32 p3_version, 7111 const char *class_id 7087 psS32 p3_version 7112 7088 ); 7113 7089 … … 7117 7093 */ 7118 7094 7119 long long p4 InputImfileDelete(7095 long long p4aInputExpDelete( 7120 7096 psDB *dbh, ///< Database handle 7121 7097 const psMetadata *where, ///< Row match criteria … … 7123 7099 ); 7124 7100 7125 /** Insert a single p4 InputImfileRow object into a table7101 /** Insert a single p4aInputExpRow object into a table 7126 7102 * 7127 7103 * This function constructs and inserts a single row based on it's parameters. … … 7130 7106 */ 7131 7107 7132 bool p4 InputImfileInsertObject(7133 psDB *dbh, ///< Database handle 7134 p4 InputImfileRow *object ///< p4InputImfileRow object7135 ); 7136 7137 /** Insert an array of p4 InputImfileRow object into a table7108 bool p4aInputExpInsertObject( 7109 psDB *dbh, ///< Database handle 7110 p4aInputExpRow *object ///< p4aInputExpRow object 7111 ); 7112 7113 /** Insert an array of p4aInputExpRow object into a table 7138 7114 * 7139 7115 * This function constructs and inserts multiple rows based on it's parameters. … … 7142 7118 */ 7143 7119 7144 bool p4 InputImfileInsertObjects(7145 psDB *dbh, ///< Database handle 7146 psArray *objects ///< array of p4 InputImfileRow objects7147 ); 7148 7149 /** Insert data from a binary FITS table p4 InputImfileRow into the database7120 bool p4aInputExpInsertObjects( 7121 psDB *dbh, ///< Database handle 7122 psArray *objects ///< array of p4aInputExpRow objects 7123 ); 7124 7125 /** Insert data from a binary FITS table p4aInputExpRow into the database 7150 7126 * 7151 7127 * This function expects a psFits object with a FITS table as the first … … 7157 7133 */ 7158 7134 7159 bool p4 InputImfileInsertFits(7135 bool p4aInputExpInsertFits( 7160 7136 psDB *dbh, ///< Database handle 7161 7137 const psFits *fits ///< psFits object … … 7172 7148 */ 7173 7149 7174 bool p4 InputImfileSelectRowsFits(7150 bool p4aInputExpSelectRowsFits( 7175 7151 psDB *dbh, ///< Database handle 7176 7152 psFits *fits, ///< psFits object … … 7179 7155 ); 7180 7156 7181 /** Convert a p4 InputImfileRow into an equivalent psMetadata7157 /** Convert a p4aInputExpRow into an equivalent psMetadata 7182 7158 * 7183 7159 * @return A psMetadata pointer or NULL on error 7184 7160 */ 7185 7161 7186 psMetadata *p4 InputImfileMetadataFromObject(7187 const p4 InputImfileRow *object ///< fooRow to convert into a psMetadata7162 psMetadata *p4aInputExpMetadataFromObject( 7163 const p4aInputExpRow *object ///< fooRow to convert into a psMetadata 7188 7164 ); 7189 7165 7190 7166 /** Convert a psMetadata into an equivalent fooRow 7191 7167 * 7192 * @return A p4 InputImfileRow pointer or NULL on error7193 */ 7194 7195 p4 InputImfileRow *p4InputImfileObjectFromMetadata(7168 * @return A p4aInputExpRow pointer or NULL on error 7169 */ 7170 7171 p4aInputExpRow *p4aInputExpObjectFromMetadata( 7196 7172 psMetadata *md ///< psMetadata to convert into a fooRow 7197 7173 ); 7198 /** Selects up to limit rows from the database and returns as p4 InputImfileRow objects in a psArray7174 /** Selects up to limit rows from the database and returns as p4aInputExpRow objects in a psArray 7199 7175 * 7200 7176 * See psDBSelectRows() for documentation on the format of where. … … 7203 7179 */ 7204 7180 7205 psArray *p4 InputImfileSelectRowObjects(7181 psArray *p4aInputExpSelectRowObjects( 7206 7182 psDB *dbh, ///< Database handle 7207 7183 const psMetadata *where, ///< Row match criteria 7208 7184 unsigned long long limit ///< Maximum number of elements to return 7209 7185 ); 7210 /** Deletes a row from the database coresponding to an p4 InputImfile7186 /** Deletes a row from the database coresponding to an p4aInputExp 7211 7187 * 7212 7188 * Note that a 'where' search psMetadata is constructed from each object and … … 7216 7192 */ 7217 7193 7218 bool p4 InputImfileDeleteObject(7219 psDB *dbh, ///< Database handle 7220 const p4 InputImfileRow *object ///< Object to delete7194 bool p4aInputExpDeleteObject( 7195 psDB *dbh, ///< Database handle 7196 const p4aInputExpRow *object ///< Object to delete 7221 7197 ); 7222 7198 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 7228 7204 */ 7229 7205 7230 long long p4 InputImfileDeleteRowObjects(7206 long long p4aInputExpDeleteRowObjects( 7231 7207 psDB *dbh, ///< Database handle 7232 7208 const psArray *objects, ///< Array of objects to delete 7233 7209 unsigned long long limit ///< Maximum number of elements to delete 7234 7210 ); 7235 /** Formats and prints an array of p4 InputImfileRow objects7211 /** Formats and prints an array of p4aInputExpRow objects 7236 7212 * 7237 7213 * When mdcf is set the formated output is in psMetadataConfig … … 7241 7217 */ 7242 7218 7243 bool p4 InputImfilePrintObjects(7219 bool p4aInputExpPrintObjects( 7244 7220 FILE *stream, ///< a stream 7245 psArray *objects, ///< An array of p4 InputImfileRow objects7221 psArray *objects, ///< An array of p4aInputExpRow objects 7246 7222 bool mdcf ///< format as mdconfig or simple 7247 7223 ); 7248 /** Formats and prints an p4 InputImfileRow object7224 /** Formats and prints an p4aInputExpRow object 7249 7225 * 7250 7226 * When mdcf is set the formated output is in psMetadataConfig … … 7254 7230 */ 7255 7231 7256 bool p4 InputImfilePrintObject(7232 bool p4aInputExpPrintObject( 7257 7233 FILE *stream, ///< a stream 7258 p4 InputImfileRow *object, ///< an p4InputImfileRow object7234 p4aInputExpRow *object, ///< an p4aInputExpRow object 7259 7235 bool mdcf ///< format as mdconfig or simple 7260 7236 ); 7261 /** p4 WarpedImfileRow data structure7262 * 7263 * Structure for representing a single row of p4 WarpedImfile table data.7237 /** p4aScfileRow data structure 7238 * 7239 * Structure for representing a single row of p4aScfile table data. 7264 7240 */ 7265 7241 7266 7242 typedef struct { 7267 psS32 p4_id; 7243 psS32 p4a_id; 7244 char *skycell_id; 7245 char *tess_id; 7268 7246 char *exp_tag; 7269 7247 psS32 p3_version; 7270 char *class_id;7271 7248 char *uri; 7272 char *b1_uri; 7273 char *b2_uri; 7274 } p4WarpedImfileRow; 7275 7276 /** Creates a new p4WarpedImfileRow object 7277 * 7278 * @return A new p4WarpedImfileRow object or NULL on failure. 7279 */ 7280 7281 p4WarpedImfileRow *p4WarpedImfileRowAlloc( 7282 psS32 p4_id, 7249 psF64 bg; 7250 psF64 bg_mean_stdev; 7251 } p4aScfileRow; 7252 7253 /** Creates a new p4aScfileRow object 7254 * 7255 * @return A new p4aScfileRow object or NULL on failure. 7256 */ 7257 7258 p4aScfileRow *p4aScfileRowAlloc( 7259 psS32 p4a_id, 7260 const char *skycell_id, 7261 const char *tess_id, 7283 7262 const char *exp_tag, 7284 7263 psS32 p3_version, 7285 const char *class_id,7286 7264 const char *uri, 7287 const char *b1_uri,7288 const char *b2_uri7289 ); 7290 7291 /** Creates a new p4 WarpedImfile table7292 * 7293 * @return true on success 7294 */ 7295 7296 bool p4 WarpedImfileCreateTable(7265 psF64 bg, 7266 psF64 bg_mean_stdev 7267 ); 7268 7269 /** Creates a new p4aScfile table 7270 * 7271 * @return true on success 7272 */ 7273 7274 bool p4aScfileCreateTable( 7297 7275 psDB *dbh ///< Database handle 7298 7276 ); 7299 7277 7300 /** Deletes a p4 WarpedImfile table7301 * 7302 * @return true on success 7303 */ 7304 7305 bool p4 WarpedImfileDropTable(7278 /** Deletes a p4aScfile table 7279 * 7280 * @return true on success 7281 */ 7282 7283 bool p4aScfileDropTable( 7306 7284 psDB *dbh ///< Database handle 7307 7285 ); … … 7314 7292 */ 7315 7293 7316 bool p4WarpedImfileInsert( 7317 psDB *dbh, ///< Database handle 7318 psS32 p4_id, 7294 bool p4aScfileInsert( 7295 psDB *dbh, ///< Database handle 7296 psS32 p4a_id, 7297 const char *skycell_id, 7298 const char *tess_id, 7319 7299 const char *exp_tag, 7320 7300 psS32 p3_version, 7321 const char *class_id,7322 7301 const char *uri, 7323 const char *b1_uri,7324 const char *b2_uri7302 psF64 bg, 7303 psF64 bg_mean_stdev 7325 7304 ); 7326 7305 … … 7330 7309 */ 7331 7310 7332 long long p4 WarpedImfileDelete(7311 long long p4aScfileDelete( 7333 7312 psDB *dbh, ///< Database handle 7334 7313 const psMetadata *where, ///< Row match criteria … … 7336 7315 ); 7337 7316 7338 /** Insert a single p4 WarpedImfileRow object into a table7317 /** Insert a single p4aScfileRow object into a table 7339 7318 * 7340 7319 * This function constructs and inserts a single row based on it's parameters. … … 7343 7322 */ 7344 7323 7345 bool p4 WarpedImfileInsertObject(7346 psDB *dbh, ///< Database handle 7347 p4 WarpedImfileRow *object ///< p4WarpedImfileRow object7348 ); 7349 7350 /** Insert an array of p4 WarpedImfileRow object into a table7324 bool p4aScfileInsertObject( 7325 psDB *dbh, ///< Database handle 7326 p4aScfileRow *object ///< p4aScfileRow object 7327 ); 7328 7329 /** Insert an array of p4aScfileRow object into a table 7351 7330 * 7352 7331 * This function constructs and inserts multiple rows based on it's parameters. … … 7355 7334 */ 7356 7335 7357 bool p4 WarpedImfileInsertObjects(7358 psDB *dbh, ///< Database handle 7359 psArray *objects ///< array of p4 WarpedImfileRow objects7360 ); 7361 7362 /** Insert data from a binary FITS table p4 WarpedImfileRow into the database7336 bool p4aScfileInsertObjects( 7337 psDB *dbh, ///< Database handle 7338 psArray *objects ///< array of p4aScfileRow objects 7339 ); 7340 7341 /** Insert data from a binary FITS table p4aScfileRow into the database 7363 7342 * 7364 7343 * This function expects a psFits object with a FITS table as the first … … 7370 7349 */ 7371 7350 7372 bool p4 WarpedImfileInsertFits(7351 bool p4aScfileInsertFits( 7373 7352 psDB *dbh, ///< Database handle 7374 7353 const psFits *fits ///< psFits object … … 7385 7364 */ 7386 7365 7387 bool p4 WarpedImfileSelectRowsFits(7366 bool p4aScfileSelectRowsFits( 7388 7367 psDB *dbh, ///< Database handle 7389 7368 psFits *fits, ///< psFits object … … 7392 7371 ); 7393 7372 7394 /** Convert a p4 WarpedImfileRow into an equivalent psMetadata7373 /** Convert a p4aScfileRow into an equivalent psMetadata 7395 7374 * 7396 7375 * @return A psMetadata pointer or NULL on error 7397 7376 */ 7398 7377 7399 psMetadata *p4 WarpedImfileMetadataFromObject(7400 const p4 WarpedImfileRow *object ///< fooRow to convert into a psMetadata7378 psMetadata *p4aScfileMetadataFromObject( 7379 const p4aScfileRow *object ///< fooRow to convert into a psMetadata 7401 7380 ); 7402 7381 7403 7382 /** Convert a psMetadata into an equivalent fooRow 7404 7383 * 7405 * @return A p4 WarpedImfileRow pointer or NULL on error7406 */ 7407 7408 p4 WarpedImfileRow *p4WarpedImfileObjectFromMetadata(7384 * @return A p4aScfileRow pointer or NULL on error 7385 */ 7386 7387 p4aScfileRow *p4aScfileObjectFromMetadata( 7409 7388 psMetadata *md ///< psMetadata to convert into a fooRow 7410 7389 ); 7411 /** Selects up to limit rows from the database and returns as p4 WarpedImfileRow objects in a psArray7390 /** Selects up to limit rows from the database and returns as p4aScfileRow objects in a psArray 7412 7391 * 7413 7392 * See psDBSelectRows() for documentation on the format of where. … … 7416 7395 */ 7417 7396 7418 psArray *p4 WarpedImfileSelectRowObjects(7397 psArray *p4aScfileSelectRowObjects( 7419 7398 psDB *dbh, ///< Database handle 7420 7399 const psMetadata *where, ///< Row match criteria 7421 7400 unsigned long long limit ///< Maximum number of elements to return 7422 7401 ); 7423 /** Deletes a row from the database coresponding to an p4 WarpedImfile7402 /** Deletes a row from the database coresponding to an p4aScfile 7424 7403 * 7425 7404 * Note that a 'where' search psMetadata is constructed from each object and … … 7429 7408 */ 7430 7409 7431 bool p4 WarpedImfileDeleteObject(7432 psDB *dbh, ///< Database handle 7433 const p4 WarpedImfileRow *object ///< Object to delete7410 bool p4aScfileDeleteObject( 7411 psDB *dbh, ///< Database handle 7412 const p4aScfileRow *object ///< Object to delete 7434 7413 ); 7435 7414 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 7441 7420 */ 7442 7421 7443 long long p4 WarpedImfileDeleteRowObjects(7422 long long p4aScfileDeleteRowObjects( 7444 7423 psDB *dbh, ///< Database handle 7445 7424 const psArray *objects, ///< Array of objects to delete 7446 7425 unsigned long long limit ///< Maximum number of elements to delete 7447 7426 ); 7448 /** Formats and prints an array of p4 WarpedImfileRow objects7427 /** Formats and prints an array of p4aScfileRow objects 7449 7428 * 7450 7429 * When mdcf is set the formated output is in psMetadataConfig … … 7454 7433 */ 7455 7434 7456 bool p4 WarpedImfilePrintObjects(7435 bool p4aScfilePrintObjects( 7457 7436 FILE *stream, ///< a stream 7458 psArray *objects, ///< An array of p4 WarpedImfileRow objects7437 psArray *objects, ///< An array of p4aScfileRow objects 7459 7438 bool mdcf ///< format as mdconfig or simple 7460 7439 ); 7461 /** Formats and prints an p4 WarpedImfileRow object7440 /** Formats and prints an p4aScfileRow object 7462 7441 * 7463 7442 * When mdcf is set the formated output is in psMetadataConfig … … 7467 7446 */ 7468 7447 7469 bool p4 WarpedImfilePrintObject(7448 bool p4aScfilePrintObject( 7470 7449 FILE *stream, ///< a stream 7471 p4 WarpedImfileRow *object, ///< an p4WarpedImfileRow object7450 p4aScfileRow *object, ///< an p4aScfileRow object 7472 7451 bool mdcf ///< format as mdconfig or simple 7473 7452 ); 7474 /** p4 StackedImfileRow data structure7475 * 7476 * Structure for representing a single row of p4 StackedImfiletable data.7453 /** p4bRunRow data structure 7454 * 7455 * Structure for representing a single row of p4bRun table data. 7477 7456 */ 7478 7457 7479 7458 typedef struct { 7480 psS32 p4_id; 7481 char *class_id; 7482 char *uri; 7483 char *b1_uri; 7484 char *b2_uri; 7485 } p4StackedImfileRow; 7486 7487 /** Creates a new p4StackedImfileRow object 7488 * 7489 * @return A new p4StackedImfileRow object or NULL on failure. 7490 */ 7491 7492 p4StackedImfileRow *p4StackedImfileRowAlloc( 7493 psS32 p4_id, 7494 const char *class_id, 7495 const char *uri, 7496 const char *b1_uri, 7497 const char *b2_uri 7498 ); 7499 7500 /** Creates a new p4StackedImfile table 7501 * 7502 * @return true on success 7503 */ 7504 7505 bool p4StackedImfileCreateTable( 7459 psS32 p4b_id; 7460 char *state; 7461 char *workdir; 7462 bool magic; 7463 } p4bRunRow; 7464 7465 /** Creates a new p4bRunRow object 7466 * 7467 * @return A new p4bRunRow object or NULL on failure. 7468 */ 7469 7470 p4bRunRow *p4bRunRowAlloc( 7471 psS32 p4b_id, 7472 const char *state, 7473 const char *workdir, 7474 bool magic 7475 ); 7476 7477 /** Creates a new p4bRun table 7478 * 7479 * @return true on success 7480 */ 7481 7482 bool p4bRunCreateTable( 7506 7483 psDB *dbh ///< Database handle 7507 7484 ); 7508 7485 7509 /** Deletes a p4 StackedImfiletable7510 * 7511 * @return true on success 7512 */ 7513 7514 bool p4 StackedImfileDropTable(7486 /** Deletes a p4bRun table 7487 * 7488 * @return true on success 7489 */ 7490 7491 bool p4bRunDropTable( 7515 7492 psDB *dbh ///< Database handle 7516 7493 ); … … 7523 7500 */ 7524 7501 7525 bool p4StackedImfileInsert( 7526 psDB *dbh, ///< Database handle 7527 psS32 p4_id, 7528 const char *class_id, 7529 const char *uri, 7530 const char *b1_uri, 7531 const char *b2_uri 7502 bool p4bRunInsert( 7503 psDB *dbh, ///< Database handle 7504 psS32 p4b_id, 7505 const char *state, 7506 const char *workdir, 7507 bool magic 7532 7508 ); 7533 7509 … … 7537 7513 */ 7538 7514 7539 long long p4 StackedImfileDelete(7515 long long p4bRunDelete( 7540 7516 psDB *dbh, ///< Database handle 7541 7517 const psMetadata *where, ///< Row match criteria … … 7543 7519 ); 7544 7520 7545 /** Insert a single p4 StackedImfileRow object into a table7521 /** Insert a single p4bRunRow object into a table 7546 7522 * 7547 7523 * This function constructs and inserts a single row based on it's parameters. … … 7550 7526 */ 7551 7527 7552 bool p4 StackedImfileInsertObject(7553 psDB *dbh, ///< Database handle 7554 p4 StackedImfileRow *object ///< p4StackedImfileRow object7555 ); 7556 7557 /** Insert an array of p4 StackedImfileRow object into a table7528 bool p4bRunInsertObject( 7529 psDB *dbh, ///< Database handle 7530 p4bRunRow *object ///< p4bRunRow object 7531 ); 7532 7533 /** Insert an array of p4bRunRow object into a table 7558 7534 * 7559 7535 * This function constructs and inserts multiple rows based on it's parameters. … … 7562 7538 */ 7563 7539 7564 bool p4 StackedImfileInsertObjects(7565 psDB *dbh, ///< Database handle 7566 psArray *objects ///< array of p4 StackedImfileRow objects7567 ); 7568 7569 /** Insert data from a binary FITS table p4 StackedImfileRow into the database7540 bool p4bRunInsertObjects( 7541 psDB *dbh, ///< Database handle 7542 psArray *objects ///< array of p4bRunRow objects 7543 ); 7544 7545 /** Insert data from a binary FITS table p4bRunRow into the database 7570 7546 * 7571 7547 * This function expects a psFits object with a FITS table as the first … … 7577 7553 */ 7578 7554 7579 bool p4 StackedImfileInsertFits(7555 bool p4bRunInsertFits( 7580 7556 psDB *dbh, ///< Database handle 7581 7557 const psFits *fits ///< psFits object … … 7592 7568 */ 7593 7569 7594 bool p4 StackedImfileSelectRowsFits(7570 bool p4bRunSelectRowsFits( 7595 7571 psDB *dbh, ///< Database handle 7596 7572 psFits *fits, ///< psFits object … … 7599 7575 ); 7600 7576 7601 /** Convert a p4 StackedImfileRow into an equivalent psMetadata7577 /** Convert a p4bRunRow into an equivalent psMetadata 7602 7578 * 7603 7579 * @return A psMetadata pointer or NULL on error 7604 7580 */ 7605 7581 7606 psMetadata *p4 StackedImfileMetadataFromObject(7607 const p4 StackedImfileRow *object ///< fooRow to convert into a psMetadata7582 psMetadata *p4bRunMetadataFromObject( 7583 const p4bRunRow *object ///< fooRow to convert into a psMetadata 7608 7584 ); 7609 7585 7610 7586 /** Convert a psMetadata into an equivalent fooRow 7611 7587 * 7612 * @return A p4 StackedImfileRow pointer or NULL on error7613 */ 7614 7615 p4 StackedImfileRow *p4StackedImfileObjectFromMetadata(7588 * @return A p4bRunRow pointer or NULL on error 7589 */ 7590 7591 p4bRunRow *p4bRunObjectFromMetadata( 7616 7592 psMetadata *md ///< psMetadata to convert into a fooRow 7617 7593 ); 7618 /** Selects up to limit rows from the database and returns as p4 StackedImfileRow objects in a psArray7594 /** Selects up to limit rows from the database and returns as p4bRunRow objects in a psArray 7619 7595 * 7620 7596 * See psDBSelectRows() for documentation on the format of where. … … 7623 7599 */ 7624 7600 7625 psArray *p4 StackedImfileSelectRowObjects(7601 psArray *p4bRunSelectRowObjects( 7626 7602 psDB *dbh, ///< Database handle 7627 7603 const psMetadata *where, ///< Row match criteria 7628 7604 unsigned long long limit ///< Maximum number of elements to return 7629 7605 ); 7630 /** Deletes a row from the database coresponding to an p4 StackedImfile7606 /** Deletes a row from the database coresponding to an p4bRun 7631 7607 * 7632 7608 * Note that a 'where' search psMetadata is constructed from each object and … … 7636 7612 */ 7637 7613 7638 bool p4 StackedImfileDeleteObject(7639 psDB *dbh, ///< Database handle 7640 const p4 StackedImfileRow *object ///< Object to delete7614 bool p4bRunDeleteObject( 7615 psDB *dbh, ///< Database handle 7616 const p4bRunRow *object ///< Object to delete 7641 7617 ); 7642 7618 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 7648 7624 */ 7649 7625 7650 long long p4 StackedImfileDeleteRowObjects(7626 long long p4bRunDeleteRowObjects( 7651 7627 psDB *dbh, ///< Database handle 7652 7628 const psArray *objects, ///< Array of objects to delete 7653 7629 unsigned long long limit ///< Maximum number of elements to delete 7654 7630 ); 7655 /** Formats and prints an array of p4 StackedImfileRow objects7631 /** Formats and prints an array of p4bRunRow objects 7656 7632 * 7657 7633 * When mdcf is set the formated output is in psMetadataConfig … … 7661 7637 */ 7662 7638 7663 bool p4 StackedImfilePrintObjects(7639 bool p4bRunPrintObjects( 7664 7640 FILE *stream, ///< a stream 7665 psArray *objects, ///< An array of p4 StackedImfileRow objects7641 psArray *objects, ///< An array of p4bRunRow objects 7666 7642 bool mdcf ///< format as mdconfig or simple 7667 7643 ); 7668 /** Formats and prints an p4 StackedImfileRow object7644 /** Formats and prints an p4bRunRow object 7669 7645 * 7670 7646 * When mdcf is set the formated output is in psMetadataConfig … … 7674 7650 */ 7675 7651 7676 bool p4 StackedImfilePrintObject(7652 bool p4bRunPrintObject( 7677 7653 FILE *stream, ///< a stream 7678 p4 StackedImfileRow *object, ///< an p4StackedImfileRow object7654 p4bRunRow *object, ///< an p4bRunRow object 7679 7655 bool mdcf ///< format as mdconfig or simple 7680 7656 ); 7681 /** p4 DiffImfileRow data structure7682 * 7683 * Structure for representing a single row of p4 DiffImfile table data.7657 /** p4bInputScfileRow data structure 7658 * 7659 * Structure for representing a single row of p4bInputScfile table data. 7684 7660 */ 7685 7661 7686 7662 typedef struct { 7687 psS32 p4_id; 7663 psS32 p4b_id; 7664 char *skycell_id; 7665 char *tess_id; 7688 7666 char *exp_tag; 7689 7667 psS32 p3_version; 7690 char *class_id; 7691 char *uri; 7692 char *b1_uri; 7693 char *b2_uri; 7694 } p4DiffImfileRow; 7695 7696 /** Creates a new p4DiffImfileRow object 7697 * 7698 * @return A new p4DiffImfileRow object or NULL on failure. 7699 */ 7700 7701 p4DiffImfileRow *p4DiffImfileRowAlloc( 7702 psS32 p4_id, 7668 char *kind; 7669 } p4bInputScfileRow; 7670 7671 /** Creates a new p4bInputScfileRow object 7672 * 7673 * @return A new p4bInputScfileRow object or NULL on failure. 7674 */ 7675 7676 p4bInputScfileRow *p4bInputScfileRowAlloc( 7677 psS32 p4b_id, 7678 const char *skycell_id, 7679 const char *tess_id, 7703 7680 const char *exp_tag, 7704 7681 psS32 p3_version, 7705 const char *class_id, 7706 const char *uri, 7707 const char *b1_uri, 7708 const char *b2_uri 7709 ); 7710 7711 /** Creates a new p4DiffImfile table 7712 * 7713 * @return true on success 7714 */ 7715 7716 bool p4DiffImfileCreateTable( 7682 const char *kind 7683 ); 7684 7685 /** Creates a new p4bInputScfile table 7686 * 7687 * @return true on success 7688 */ 7689 7690 bool p4bInputScfileCreateTable( 7717 7691 psDB *dbh ///< Database handle 7718 7692 ); 7719 7693 7720 /** Deletes a p4 DiffImfile table7721 * 7722 * @return true on success 7723 */ 7724 7725 bool p4 DiffImfileDropTable(7694 /** Deletes a p4bInputScfile table 7695 * 7696 * @return true on success 7697 */ 7698 7699 bool p4bInputScfileDropTable( 7726 7700 psDB *dbh ///< Database handle 7727 7701 ); … … 7734 7708 */ 7735 7709 7736 bool p4DiffImfileInsert( 7737 psDB *dbh, ///< Database handle 7738 psS32 p4_id, 7710 bool p4bInputScfileInsert( 7711 psDB *dbh, ///< Database handle 7712 psS32 p4b_id, 7713 const char *skycell_id, 7714 const char *tess_id, 7739 7715 const char *exp_tag, 7740 7716 psS32 p3_version, 7741 const char *class_id, 7742 const char *uri, 7743 const char *b1_uri, 7744 const char *b2_uri 7717 const char *kind 7745 7718 ); 7746 7719 … … 7750 7723 */ 7751 7724 7752 long long p4 DiffImfileDelete(7725 long long p4bInputScfileDelete( 7753 7726 psDB *dbh, ///< Database handle 7754 7727 const psMetadata *where, ///< Row match criteria … … 7756 7729 ); 7757 7730 7758 /** Insert a single p4 DiffImfileRow object into a table7731 /** Insert a single p4bInputScfileRow object into a table 7759 7732 * 7760 7733 * This function constructs and inserts a single row based on it's parameters. … … 7763 7736 */ 7764 7737 7765 bool p4 DiffImfileInsertObject(7766 psDB *dbh, ///< Database handle 7767 p4 DiffImfileRow *object ///< p4DiffImfileRow object7768 ); 7769 7770 /** Insert an array of p4 DiffImfileRow object into a table7738 bool p4bInputScfileInsertObject( 7739 psDB *dbh, ///< Database handle 7740 p4bInputScfileRow *object ///< p4bInputScfileRow object 7741 ); 7742 7743 /** Insert an array of p4bInputScfileRow object into a table 7771 7744 * 7772 7745 * This function constructs and inserts multiple rows based on it's parameters. … … 7775 7748 */ 7776 7749 7777 bool p4 DiffImfileInsertObjects(7778 psDB *dbh, ///< Database handle 7779 psArray *objects ///< array of p4 DiffImfileRow objects7780 ); 7781 7782 /** Insert data from a binary FITS table p4 DiffImfileRow into the database7750 bool p4bInputScfileInsertObjects( 7751 psDB *dbh, ///< Database handle 7752 psArray *objects ///< array of p4bInputScfileRow objects 7753 ); 7754 7755 /** Insert data from a binary FITS table p4bInputScfileRow into the database 7783 7756 * 7784 7757 * This function expects a psFits object with a FITS table as the first … … 7790 7763 */ 7791 7764 7792 bool p4 DiffImfileInsertFits(7765 bool p4bInputScfileInsertFits( 7793 7766 psDB *dbh, ///< Database handle 7794 7767 const psFits *fits ///< psFits object … … 7805 7778 */ 7806 7779 7807 bool p4 DiffImfileSelectRowsFits(7780 bool p4bInputScfileSelectRowsFits( 7808 7781 psDB *dbh, ///< Database handle 7809 7782 psFits *fits, ///< psFits object … … 7812 7785 ); 7813 7786 7814 /** Convert a p4 DiffImfileRow into an equivalent psMetadata7787 /** Convert a p4bInputScfileRow into an equivalent psMetadata 7815 7788 * 7816 7789 * @return A psMetadata pointer or NULL on error 7817 7790 */ 7818 7791 7819 psMetadata *p4 DiffImfileMetadataFromObject(7820 const p4 DiffImfileRow *object ///< fooRow to convert into a psMetadata7792 psMetadata *p4bInputScfileMetadataFromObject( 7793 const p4bInputScfileRow *object ///< fooRow to convert into a psMetadata 7821 7794 ); 7822 7795 7823 7796 /** Convert a psMetadata into an equivalent fooRow 7824 7797 * 7825 * @return A p4 DiffImfileRow pointer or NULL on error7826 */ 7827 7828 p4 DiffImfileRow *p4DiffImfileObjectFromMetadata(7798 * @return A p4bInputScfileRow pointer or NULL on error 7799 */ 7800 7801 p4bInputScfileRow *p4bInputScfileObjectFromMetadata( 7829 7802 psMetadata *md ///< psMetadata to convert into a fooRow 7830 7803 ); 7831 /** Selects up to limit rows from the database and returns as p4 DiffImfileRow objects in a psArray7804 /** Selects up to limit rows from the database and returns as p4bInputScfileRow objects in a psArray 7832 7805 * 7833 7806 * See psDBSelectRows() for documentation on the format of where. … … 7836 7809 */ 7837 7810 7838 psArray *p4 DiffImfileSelectRowObjects(7811 psArray *p4bInputScfileSelectRowObjects( 7839 7812 psDB *dbh, ///< Database handle 7840 7813 const psMetadata *where, ///< Row match criteria 7841 7814 unsigned long long limit ///< Maximum number of elements to return 7842 7815 ); 7843 /** Deletes a row from the database coresponding to an p4 DiffImfile7816 /** Deletes a row from the database coresponding to an p4bInputScfile 7844 7817 * 7845 7818 * Note that a 'where' search psMetadata is constructed from each object and … … 7849 7822 */ 7850 7823 7851 bool p4 DiffImfileDeleteObject(7852 psDB *dbh, ///< Database handle 7853 const p4 DiffImfileRow *object ///< Object to delete7824 bool p4bInputScfileDeleteObject( 7825 psDB *dbh, ///< Database handle 7826 const p4bInputScfileRow *object ///< Object to delete 7854 7827 ); 7855 7828 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 7861 7834 */ 7862 7835 7863 long long p4 DiffImfileDeleteRowObjects(7836 long long p4bInputScfileDeleteRowObjects( 7864 7837 psDB *dbh, ///< Database handle 7865 7838 const psArray *objects, ///< Array of objects to delete 7866 7839 unsigned long long limit ///< Maximum number of elements to delete 7867 7840 ); 7868 /** Formats and prints an array of p4 DiffImfileRow objects7841 /** Formats and prints an array of p4bInputScfileRow objects 7869 7842 * 7870 7843 * When mdcf is set the formated output is in psMetadataConfig … … 7874 7847 */ 7875 7848 7876 bool p4 DiffImfilePrintObjects(7849 bool p4bInputScfilePrintObjects( 7877 7850 FILE *stream, ///< a stream 7878 psArray *objects, ///< An array of p4 DiffImfileRow objects7851 psArray *objects, ///< An array of p4bInputScfileRow objects 7879 7852 bool mdcf ///< format as mdconfig or simple 7880 7853 ); 7881 /** Formats and prints an p4 DiffImfileRow object7854 /** Formats and prints an p4bInputScfileRow object 7882 7855 * 7883 7856 * When mdcf is set the formated output is in psMetadataConfig … … 7887 7860 */ 7888 7861 7889 bool p4 DiffImfilePrintObject(7862 bool p4bInputScfilePrintObject( 7890 7863 FILE *stream, ///< a stream 7891 p4 DiffImfileRow *object, ///< an p4DiffImfileRow object7864 p4bInputScfileRow *object, ///< an p4bInputScfileRow object 7892 7865 bool mdcf ///< format as mdconfig or simple 7893 7866 ); 7867 /** p4bDiffScfileRow data structure 7868 * 7869 * Structure for representing a single row of p4bDiffScfile table data. 7870 */ 7871 7872 typedef struct { 7873 psS32 p4b_id; 7874 char *skycell_id; 7875 char *tess_id; 7876 char *exp_tag; 7877 psS32 p3_version; 7878 char *uri; 7879 psF64 bg; 7880 psF64 bg_mean_stdev; 7881 } p4bDiffScfileRow; 7882 7883 /** Creates a new p4bDiffScfileRow object 7884 * 7885 * @return A new p4bDiffScfileRow object or NULL on failure. 7886 */ 7887 7888 p4bDiffScfileRow *p4bDiffScfileRowAlloc( 7889 psS32 p4b_id, 7890 const char *skycell_id, 7891 const char *tess_id, 7892 const char *exp_tag, 7893 psS32 p3_version, 7894 const char *uri, 7895 psF64 bg, 7896 psF64 bg_mean_stdev 7897 ); 7898 7899 /** Creates a new p4bDiffScfile table 7900 * 7901 * @return true on success 7902 */ 7903 7904 bool p4bDiffScfileCreateTable( 7905 psDB *dbh ///< Database handle 7906 ); 7907 7908 /** Deletes a p4bDiffScfile table 7909 * 7910 * @return true on success 7911 */ 7912 7913 bool p4bDiffScfileDropTable( 7914 psDB *dbh ///< Database handle 7915 ); 7916 7917 /** Insert a single row into a table 7918 * 7919 * This function constructs and inserts a single row based on it's parameters. 7920 * 7921 * @return true on success 7922 */ 7923 7924 bool p4bDiffScfileInsert( 7925 psDB *dbh, ///< Database handle 7926 psS32 p4b_id, 7927 const char *skycell_id, 7928 const char *tess_id, 7929 const char *exp_tag, 7930 psS32 p3_version, 7931 const char *uri, 7932 psF64 bg, 7933 psF64 bg_mean_stdev 7934 ); 7935 7936 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 7937 * 7938 * @return A The number of rows removed or a negative value on error 7939 */ 7940 7941 long long p4bDiffScfileDelete( 7942 psDB *dbh, ///< Database handle 7943 const psMetadata *where, ///< Row match criteria 7944 unsigned long long limit ///< Maximum number of elements to delete 7945 ); 7946 7947 /** Insert a single p4bDiffScfileRow object into a table 7948 * 7949 * This function constructs and inserts a single row based on it's parameters. 7950 * 7951 * @return true on success 7952 */ 7953 7954 bool p4bDiffScfileInsertObject( 7955 psDB *dbh, ///< Database handle 7956 p4bDiffScfileRow *object ///< p4bDiffScfileRow object 7957 ); 7958 7959 /** Insert an array of p4bDiffScfileRow object into a table 7960 * 7961 * This function constructs and inserts multiple rows based on it's parameters. 7962 * 7963 * @return true on success 7964 */ 7965 7966 bool p4bDiffScfileInsertObjects( 7967 psDB *dbh, ///< Database handle 7968 psArray *objects ///< array of p4bDiffScfileRow objects 7969 ); 7970 7971 /** Insert data from a binary FITS table p4bDiffScfileRow into the database 7972 * 7973 * This function expects a psFits object with a FITS table as the first 7974 * extension. The table must have at least one row of data in it, that is of 7975 * the appropriate format (number of columns and their type). All other 7976 * extensions are ignored. 7977 * 7978 * @return true on success 7979 */ 7980 7981 bool p4bDiffScfileInsertFits( 7982 psDB *dbh, ///< Database handle 7983 const psFits *fits ///< psFits object 7984 ); 7985 7986 /** Selects up to limit from the database and returns them in a binary FITS table 7987 * 7988 * This function assumes an empty psFits object and will create a FITS table 7989 * as the first extension. 7990 * 7991 * See psDBSelectRows() for documentation on the format of where. 7992 * 7993 * @return true on success 7994 */ 7995 7996 bool p4bDiffScfileSelectRowsFits( 7997 psDB *dbh, ///< Database handle 7998 psFits *fits, ///< psFits object 7999 const psMetadata *where, ///< Row match criteria 8000 unsigned long long limit ///< Maximum number of elements to return 8001 ); 8002 8003 /** Convert a p4bDiffScfileRow into an equivalent psMetadata 8004 * 8005 * @return A psMetadata pointer or NULL on error 8006 */ 8007 8008 psMetadata *p4bDiffScfileMetadataFromObject( 8009 const p4bDiffScfileRow *object ///< fooRow to convert into a psMetadata 8010 ); 8011 8012 /** Convert a psMetadata into an equivalent fooRow 8013 * 8014 * @return A p4bDiffScfileRow pointer or NULL on error 8015 */ 8016 8017 p4bDiffScfileRow *p4bDiffScfileObjectFromMetadata( 8018 psMetadata *md ///< psMetadata to convert into a fooRow 8019 ); 8020 /** Selects up to limit rows from the database and returns as p4bDiffScfileRow objects in a psArray 8021 * 8022 * See psDBSelectRows() for documentation on the format of where. 8023 * 8024 * @return A psArray pointer or NULL on error 8025 */ 8026 8027 psArray *p4bDiffScfileSelectRowObjects( 8028 psDB *dbh, ///< Database handle 8029 const psMetadata *where, ///< Row match criteria 8030 unsigned long long limit ///< Maximum number of elements to return 8031 ); 8032 /** Deletes a row from the database coresponding to an p4bDiffScfile 8033 * 8034 * Note that a 'where' search psMetadata is constructed from each object and 8035 * used to find rows to delete. 8036 * 8037 * @return A The number of rows removed or a negative value on error 8038 */ 8039 8040 bool p4bDiffScfileDeleteObject( 8041 psDB *dbh, ///< Database handle 8042 const p4bDiffScfileRow *object ///< Object to delete 8043 ); 8044 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8045 * 8046 * Note that a 'where' search psMetadata is constructed from each object and 8047 * used to find rows to delete. 8048 * 8049 * @return A The number of rows removed or a negative value on error 8050 */ 8051 8052 long long p4bDiffScfileDeleteRowObjects( 8053 psDB *dbh, ///< Database handle 8054 const psArray *objects, ///< Array of objects to delete 8055 unsigned long long limit ///< Maximum number of elements to delete 8056 ); 8057 /** Formats and prints an array of p4bDiffScfileRow objects 8058 * 8059 * When mdcf is set the formated output is in psMetadataConfig 8060 * format, otherwise it is in a simple tabular format. 8061 * 8062 * @return true on success 8063 */ 8064 8065 bool p4bDiffScfilePrintObjects( 8066 FILE *stream, ///< a stream 8067 psArray *objects, ///< An array of p4bDiffScfileRow objects 8068 bool mdcf ///< format as mdconfig or simple 8069 ); 8070 /** Formats and prints an p4bDiffScfileRow object 8071 * 8072 * When mdcf is set the formated output is in psMetadataConfig 8073 * format, otherwise it is in a simple tabular format. 8074 * 8075 * @return true on success 8076 */ 8077 8078 bool p4bDiffScfilePrintObject( 8079 FILE *stream, ///< a stream 8080 p4bDiffScfileRow *object, ///< an p4bDiffScfileRow object 8081 bool mdcf ///< format as mdconfig or simple 8082 ); 8083 /** p4cRunRow data structure 8084 * 8085 * Structure for representing a single row of p4cRun table data. 8086 */ 8087 8088 typedef struct { 8089 psS32 p4c_id; 8090 char *state; 8091 char *workdir; 8092 bool magic; 8093 } p4cRunRow; 8094 8095 /** Creates a new p4cRunRow object 8096 * 8097 * @return A new p4cRunRow object or NULL on failure. 8098 */ 8099 8100 p4cRunRow *p4cRunRowAlloc( 8101 psS32 p4c_id, 8102 const char *state, 8103 const char *workdir, 8104 bool magic 8105 ); 8106 8107 /** Creates a new p4cRun table 8108 * 8109 * @return true on success 8110 */ 8111 8112 bool p4cRunCreateTable( 8113 psDB *dbh ///< Database handle 8114 ); 8115 8116 /** Deletes a p4cRun table 8117 * 8118 * @return true on success 8119 */ 8120 8121 bool p4cRunDropTable( 8122 psDB *dbh ///< Database handle 8123 ); 8124 8125 /** Insert a single row into a table 8126 * 8127 * This function constructs and inserts a single row based on it's parameters. 8128 * 8129 * @return true on success 8130 */ 8131 8132 bool p4cRunInsert( 8133 psDB *dbh, ///< Database handle 8134 psS32 p4c_id, 8135 const char *state, 8136 const char *workdir, 8137 bool magic 8138 ); 8139 8140 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8141 * 8142 * @return A The number of rows removed or a negative value on error 8143 */ 8144 8145 long long p4cRunDelete( 8146 psDB *dbh, ///< Database handle 8147 const psMetadata *where, ///< Row match criteria 8148 unsigned long long limit ///< Maximum number of elements to delete 8149 ); 8150 8151 /** Insert a single p4cRunRow object into a table 8152 * 8153 * This function constructs and inserts a single row based on it's parameters. 8154 * 8155 * @return true on success 8156 */ 8157 8158 bool p4cRunInsertObject( 8159 psDB *dbh, ///< Database handle 8160 p4cRunRow *object ///< p4cRunRow object 8161 ); 8162 8163 /** Insert an array of p4cRunRow object into a table 8164 * 8165 * This function constructs and inserts multiple rows based on it's parameters. 8166 * 8167 * @return true on success 8168 */ 8169 8170 bool p4cRunInsertObjects( 8171 psDB *dbh, ///< Database handle 8172 psArray *objects ///< array of p4cRunRow objects 8173 ); 8174 8175 /** Insert data from a binary FITS table p4cRunRow into the database 8176 * 8177 * This function expects a psFits object with a FITS table as the first 8178 * extension. The table must have at least one row of data in it, that is of 8179 * the appropriate format (number of columns and their type). All other 8180 * extensions are ignored. 8181 * 8182 * @return true on success 8183 */ 8184 8185 bool p4cRunInsertFits( 8186 psDB *dbh, ///< Database handle 8187 const psFits *fits ///< psFits object 8188 ); 8189 8190 /** Selects up to limit from the database and returns them in a binary FITS table 8191 * 8192 * This function assumes an empty psFits object and will create a FITS table 8193 * as the first extension. 8194 * 8195 * See psDBSelectRows() for documentation on the format of where. 8196 * 8197 * @return true on success 8198 */ 8199 8200 bool p4cRunSelectRowsFits( 8201 psDB *dbh, ///< Database handle 8202 psFits *fits, ///< psFits object 8203 const psMetadata *where, ///< Row match criteria 8204 unsigned long long limit ///< Maximum number of elements to return 8205 ); 8206 8207 /** Convert a p4cRunRow into an equivalent psMetadata 8208 * 8209 * @return A psMetadata pointer or NULL on error 8210 */ 8211 8212 psMetadata *p4cRunMetadataFromObject( 8213 const p4cRunRow *object ///< fooRow to convert into a psMetadata 8214 ); 8215 8216 /** Convert a psMetadata into an equivalent fooRow 8217 * 8218 * @return A p4cRunRow pointer or NULL on error 8219 */ 8220 8221 p4cRunRow *p4cRunObjectFromMetadata( 8222 psMetadata *md ///< psMetadata to convert into a fooRow 8223 ); 8224 /** Selects up to limit rows from the database and returns as p4cRunRow objects in a psArray 8225 * 8226 * See psDBSelectRows() for documentation on the format of where. 8227 * 8228 * @return A psArray pointer or NULL on error 8229 */ 8230 8231 psArray *p4cRunSelectRowObjects( 8232 psDB *dbh, ///< Database handle 8233 const psMetadata *where, ///< Row match criteria 8234 unsigned long long limit ///< Maximum number of elements to return 8235 ); 8236 /** Deletes a row from the database coresponding to an p4cRun 8237 * 8238 * Note that a 'where' search psMetadata is constructed from each object and 8239 * used to find rows to delete. 8240 * 8241 * @return A The number of rows removed or a negative value on error 8242 */ 8243 8244 bool p4cRunDeleteObject( 8245 psDB *dbh, ///< Database handle 8246 const p4cRunRow *object ///< Object to delete 8247 ); 8248 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8249 * 8250 * Note that a 'where' search psMetadata is constructed from each object and 8251 * used to find rows to delete. 8252 * 8253 * @return A The number of rows removed or a negative value on error 8254 */ 8255 8256 long long p4cRunDeleteRowObjects( 8257 psDB *dbh, ///< Database handle 8258 const psArray *objects, ///< Array of objects to delete 8259 unsigned long long limit ///< Maximum number of elements to delete 8260 ); 8261 /** Formats and prints an array of p4cRunRow objects 8262 * 8263 * When mdcf is set the formated output is in psMetadataConfig 8264 * format, otherwise it is in a simple tabular format. 8265 * 8266 * @return true on success 8267 */ 8268 8269 bool p4cRunPrintObjects( 8270 FILE *stream, ///< a stream 8271 psArray *objects, ///< An array of p4cRunRow objects 8272 bool mdcf ///< format as mdconfig or simple 8273 ); 8274 /** Formats and prints an p4cRunRow object 8275 * 8276 * When mdcf is set the formated output is in psMetadataConfig 8277 * format, otherwise it is in a simple tabular format. 8278 * 8279 * @return true on success 8280 */ 8281 8282 bool p4cRunPrintObject( 8283 FILE *stream, ///< a stream 8284 p4cRunRow *object, ///< an p4cRunRow object 8285 bool mdcf ///< format as mdconfig or simple 8286 ); 8287 /** p4cInputExpRow data structure 8288 * 8289 * Structure for representing a single row of p4cInputExp table data. 8290 */ 8291 8292 typedef struct { 8293 psS32 p4c_id; 8294 char *exp_tag; 8295 psS32 p3_version; 8296 } p4cInputExpRow; 8297 8298 /** Creates a new p4cInputExpRow object 8299 * 8300 * @return A new p4cInputExpRow object or NULL on failure. 8301 */ 8302 8303 p4cInputExpRow *p4cInputExpRowAlloc( 8304 psS32 p4c_id, 8305 const char *exp_tag, 8306 psS32 p3_version 8307 ); 8308 8309 /** Creates a new p4cInputExp table 8310 * 8311 * @return true on success 8312 */ 8313 8314 bool p4cInputExpCreateTable( 8315 psDB *dbh ///< Database handle 8316 ); 8317 8318 /** Deletes a p4cInputExp table 8319 * 8320 * @return true on success 8321 */ 8322 8323 bool p4cInputExpDropTable( 8324 psDB *dbh ///< Database handle 8325 ); 8326 8327 /** Insert a single row into a table 8328 * 8329 * This function constructs and inserts a single row based on it's parameters. 8330 * 8331 * @return true on success 8332 */ 8333 8334 bool p4cInputExpInsert( 8335 psDB *dbh, ///< Database handle 8336 psS32 p4c_id, 8337 const char *exp_tag, 8338 psS32 p3_version 8339 ); 8340 8341 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8342 * 8343 * @return A The number of rows removed or a negative value on error 8344 */ 8345 8346 long long p4cInputExpDelete( 8347 psDB *dbh, ///< Database handle 8348 const psMetadata *where, ///< Row match criteria 8349 unsigned long long limit ///< Maximum number of elements to delete 8350 ); 8351 8352 /** Insert a single p4cInputExpRow object into a table 8353 * 8354 * This function constructs and inserts a single row based on it's parameters. 8355 * 8356 * @return true on success 8357 */ 8358 8359 bool p4cInputExpInsertObject( 8360 psDB *dbh, ///< Database handle 8361 p4cInputExpRow *object ///< p4cInputExpRow object 8362 ); 8363 8364 /** Insert an array of p4cInputExpRow object into a table 8365 * 8366 * This function constructs and inserts multiple rows based on it's parameters. 8367 * 8368 * @return true on success 8369 */ 8370 8371 bool p4cInputExpInsertObjects( 8372 psDB *dbh, ///< Database handle 8373 psArray *objects ///< array of p4cInputExpRow objects 8374 ); 8375 8376 /** Insert data from a binary FITS table p4cInputExpRow into the database 8377 * 8378 * This function expects a psFits object with a FITS table as the first 8379 * extension. The table must have at least one row of data in it, that is of 8380 * the appropriate format (number of columns and their type). All other 8381 * extensions are ignored. 8382 * 8383 * @return true on success 8384 */ 8385 8386 bool p4cInputExpInsertFits( 8387 psDB *dbh, ///< Database handle 8388 const psFits *fits ///< psFits object 8389 ); 8390 8391 /** Selects up to limit from the database and returns them in a binary FITS table 8392 * 8393 * This function assumes an empty psFits object and will create a FITS table 8394 * as the first extension. 8395 * 8396 * See psDBSelectRows() for documentation on the format of where. 8397 * 8398 * @return true on success 8399 */ 8400 8401 bool p4cInputExpSelectRowsFits( 8402 psDB *dbh, ///< Database handle 8403 psFits *fits, ///< psFits object 8404 const psMetadata *where, ///< Row match criteria 8405 unsigned long long limit ///< Maximum number of elements to return 8406 ); 8407 8408 /** Convert a p4cInputExpRow into an equivalent psMetadata 8409 * 8410 * @return A psMetadata pointer or NULL on error 8411 */ 8412 8413 psMetadata *p4cInputExpMetadataFromObject( 8414 const p4cInputExpRow *object ///< fooRow to convert into a psMetadata 8415 ); 8416 8417 /** Convert a psMetadata into an equivalent fooRow 8418 * 8419 * @return A p4cInputExpRow pointer or NULL on error 8420 */ 8421 8422 p4cInputExpRow *p4cInputExpObjectFromMetadata( 8423 psMetadata *md ///< psMetadata to convert into a fooRow 8424 ); 8425 /** Selects up to limit rows from the database and returns as p4cInputExpRow objects in a psArray 8426 * 8427 * See psDBSelectRows() for documentation on the format of where. 8428 * 8429 * @return A psArray pointer or NULL on error 8430 */ 8431 8432 psArray *p4cInputExpSelectRowObjects( 8433 psDB *dbh, ///< Database handle 8434 const psMetadata *where, ///< Row match criteria 8435 unsigned long long limit ///< Maximum number of elements to return 8436 ); 8437 /** Deletes a row from the database coresponding to an p4cInputExp 8438 * 8439 * Note that a 'where' search psMetadata is constructed from each object and 8440 * used to find rows to delete. 8441 * 8442 * @return A The number of rows removed or a negative value on error 8443 */ 8444 8445 bool p4cInputExpDeleteObject( 8446 psDB *dbh, ///< Database handle 8447 const p4cInputExpRow *object ///< Object to delete 8448 ); 8449 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8450 * 8451 * Note that a 'where' search psMetadata is constructed from each object and 8452 * used to find rows to delete. 8453 * 8454 * @return A The number of rows removed or a negative value on error 8455 */ 8456 8457 long long p4cInputExpDeleteRowObjects( 8458 psDB *dbh, ///< Database handle 8459 const psArray *objects, ///< Array of objects to delete 8460 unsigned long long limit ///< Maximum number of elements to delete 8461 ); 8462 /** Formats and prints an array of p4cInputExpRow objects 8463 * 8464 * When mdcf is set the formated output is in psMetadataConfig 8465 * format, otherwise it is in a simple tabular format. 8466 * 8467 * @return true on success 8468 */ 8469 8470 bool p4cInputExpPrintObjects( 8471 FILE *stream, ///< a stream 8472 psArray *objects, ///< An array of p4cInputExpRow objects 8473 bool mdcf ///< format as mdconfig or simple 8474 ); 8475 /** Formats and prints an p4cInputExpRow object 8476 * 8477 * When mdcf is set the formated output is in psMetadataConfig 8478 * format, otherwise it is in a simple tabular format. 8479 * 8480 * @return true on success 8481 */ 8482 8483 bool p4cInputExpPrintObject( 8484 FILE *stream, ///< a stream 8485 p4cInputExpRow *object, ///< an p4cInputExpRow object 8486 bool mdcf ///< format as mdconfig or simple 8487 ); 7894 8488 /** p4MagicMaskImfileRow data structure 7895 8489 * … … 7898 8492 7899 8493 typedef struct { 7900 psS32 p4 _id;8494 psS32 p4c_id; 7901 8495 char *exp_tag; 7902 8496 psS32 p3_version; … … 7911 8505 7912 8506 p4MagicMaskImfileRow *p4MagicMaskImfileRowAlloc( 7913 psS32 p4 _id,8507 psS32 p4c_id, 7914 8508 const char *exp_tag, 7915 8509 psS32 p3_version, … … 7945 8539 bool p4MagicMaskImfileInsert( 7946 8540 psDB *dbh, ///< Database handle 7947 psS32 p4 _id,8541 psS32 p4c_id, 7948 8542 const char *exp_tag, 7949 8543 psS32 p3_version, … … 8099 8693 bool mdcf ///< format as mdconfig or simple 8100 8694 ); 8695 /** skyCellRow data structure 8696 * 8697 * Structure for representing a single row of skyCell table data. 8698 */ 8699 8700 typedef struct { 8701 char *skycell_id; 8702 char *tess_id; 8703 psF64 ra1; 8704 psF64 decl1; 8705 psF64 ra2; 8706 psF64 decl2; 8707 psF64 ra3; 8708 psF64 decl3; 8709 psF64 ra4; 8710 psF64 decl4; 8711 } skyCellRow; 8712 8713 /** Creates a new skyCellRow object 8714 * 8715 * @return A new skyCellRow object or NULL on failure. 8716 */ 8717 8718 skyCellRow *skyCellRowAlloc( 8719 const char *skycell_id, 8720 const char *tess_id, 8721 psF64 ra1, 8722 psF64 decl1, 8723 psF64 ra2, 8724 psF64 decl2, 8725 psF64 ra3, 8726 psF64 decl3, 8727 psF64 ra4, 8728 psF64 decl4 8729 ); 8730 8731 /** Creates a new skyCell table 8732 * 8733 * @return true on success 8734 */ 8735 8736 bool skyCellCreateTable( 8737 psDB *dbh ///< Database handle 8738 ); 8739 8740 /** Deletes a skyCell table 8741 * 8742 * @return true on success 8743 */ 8744 8745 bool skyCellDropTable( 8746 psDB *dbh ///< Database handle 8747 ); 8748 8749 /** Insert a single row into a table 8750 * 8751 * This function constructs and inserts a single row based on it's parameters. 8752 * 8753 * @return true on success 8754 */ 8755 8756 bool skyCellInsert( 8757 psDB *dbh, ///< Database handle 8758 const char *skycell_id, 8759 const char *tess_id, 8760 psF64 ra1, 8761 psF64 decl1, 8762 psF64 ra2, 8763 psF64 decl2, 8764 psF64 ra3, 8765 psF64 decl3, 8766 psF64 ra4, 8767 psF64 decl4 8768 ); 8769 8770 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8771 * 8772 * @return A The number of rows removed or a negative value on error 8773 */ 8774 8775 long long skyCellDelete( 8776 psDB *dbh, ///< Database handle 8777 const psMetadata *where, ///< Row match criteria 8778 unsigned long long limit ///< Maximum number of elements to delete 8779 ); 8780 8781 /** Insert a single skyCellRow object into a table 8782 * 8783 * This function constructs and inserts a single row based on it's parameters. 8784 * 8785 * @return true on success 8786 */ 8787 8788 bool skyCellInsertObject( 8789 psDB *dbh, ///< Database handle 8790 skyCellRow *object ///< skyCellRow object 8791 ); 8792 8793 /** Insert an array of skyCellRow object into a table 8794 * 8795 * This function constructs and inserts multiple rows based on it's parameters. 8796 * 8797 * @return true on success 8798 */ 8799 8800 bool skyCellInsertObjects( 8801 psDB *dbh, ///< Database handle 8802 psArray *objects ///< array of skyCellRow objects 8803 ); 8804 8805 /** Insert data from a binary FITS table skyCellRow into the database 8806 * 8807 * This function expects a psFits object with a FITS table as the first 8808 * extension. The table must have at least one row of data in it, that is of 8809 * the appropriate format (number of columns and their type). All other 8810 * extensions are ignored. 8811 * 8812 * @return true on success 8813 */ 8814 8815 bool skyCellInsertFits( 8816 psDB *dbh, ///< Database handle 8817 const psFits *fits ///< psFits object 8818 ); 8819 8820 /** Selects up to limit from the database and returns them in a binary FITS table 8821 * 8822 * This function assumes an empty psFits object and will create a FITS table 8823 * as the first extension. 8824 * 8825 * See psDBSelectRows() for documentation on the format of where. 8826 * 8827 * @return true on success 8828 */ 8829 8830 bool skyCellSelectRowsFits( 8831 psDB *dbh, ///< Database handle 8832 psFits *fits, ///< psFits object 8833 const psMetadata *where, ///< Row match criteria 8834 unsigned long long limit ///< Maximum number of elements to return 8835 ); 8836 8837 /** Convert a skyCellRow into an equivalent psMetadata 8838 * 8839 * @return A psMetadata pointer or NULL on error 8840 */ 8841 8842 psMetadata *skyCellMetadataFromObject( 8843 const skyCellRow *object ///< fooRow to convert into a psMetadata 8844 ); 8845 8846 /** Convert a psMetadata into an equivalent fooRow 8847 * 8848 * @return A skyCellRow pointer or NULL on error 8849 */ 8850 8851 skyCellRow *skyCellObjectFromMetadata( 8852 psMetadata *md ///< psMetadata to convert into a fooRow 8853 ); 8854 /** Selects up to limit rows from the database and returns as skyCellRow objects in a psArray 8855 * 8856 * See psDBSelectRows() for documentation on the format of where. 8857 * 8858 * @return A psArray pointer or NULL on error 8859 */ 8860 8861 psArray *skyCellSelectRowObjects( 8862 psDB *dbh, ///< Database handle 8863 const psMetadata *where, ///< Row match criteria 8864 unsigned long long limit ///< Maximum number of elements to return 8865 ); 8866 /** Deletes a row from the database coresponding to an skyCell 8867 * 8868 * Note that a 'where' search psMetadata is constructed from each object and 8869 * used to find rows to delete. 8870 * 8871 * @return A The number of rows removed or a negative value on error 8872 */ 8873 8874 bool skyCellDeleteObject( 8875 psDB *dbh, ///< Database handle 8876 const skyCellRow *object ///< Object to delete 8877 ); 8878 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8879 * 8880 * Note that a 'where' search psMetadata is constructed from each object and 8881 * used to find rows to delete. 8882 * 8883 * @return A The number of rows removed or a negative value on error 8884 */ 8885 8886 long long skyCellDeleteRowObjects( 8887 psDB *dbh, ///< Database handle 8888 const psArray *objects, ///< Array of objects to delete 8889 unsigned long long limit ///< Maximum number of elements to delete 8890 ); 8891 /** Formats and prints an array of skyCellRow objects 8892 * 8893 * When mdcf is set the formated output is in psMetadataConfig 8894 * format, otherwise it is in a simple tabular format. 8895 * 8896 * @return true on success 8897 */ 8898 8899 bool skyCellPrintObjects( 8900 FILE *stream, ///< a stream 8901 psArray *objects, ///< An array of skyCellRow objects 8902 bool mdcf ///< format as mdconfig or simple 8903 ); 8904 /** Formats and prints an skyCellRow object 8905 * 8906 * When mdcf is set the formated output is in psMetadataConfig 8907 * format, otherwise it is in a simple tabular format. 8908 * 8909 * @return true on success 8910 */ 8911 8912 bool skyCellPrintObject( 8913 FILE *stream, ///< a stream 8914 skyCellRow *object, ///< an skyCellRow object 8915 bool mdcf ///< format as mdconfig or simple 8916 ); 8917 /** skyCellMapRow data structure 8918 * 8919 * Structure for representing a single row of skyCellMap table data. 8920 */ 8921 8922 typedef struct { 8923 char *skycell_id; 8924 char *tess_id; 8925 char *exp_tag; 8926 char *class_id; 8927 } skyCellMapRow; 8928 8929 /** Creates a new skyCellMapRow object 8930 * 8931 * @return A new skyCellMapRow object or NULL on failure. 8932 */ 8933 8934 skyCellMapRow *skyCellMapRowAlloc( 8935 const char *skycell_id, 8936 const char *tess_id, 8937 const char *exp_tag, 8938 const char *class_id 8939 ); 8940 8941 /** Creates a new skyCellMap table 8942 * 8943 * @return true on success 8944 */ 8945 8946 bool skyCellMapCreateTable( 8947 psDB *dbh ///< Database handle 8948 ); 8949 8950 /** Deletes a skyCellMap table 8951 * 8952 * @return true on success 8953 */ 8954 8955 bool skyCellMapDropTable( 8956 psDB *dbh ///< Database handle 8957 ); 8958 8959 /** Insert a single row into a table 8960 * 8961 * This function constructs and inserts a single row based on it's parameters. 8962 * 8963 * @return true on success 8964 */ 8965 8966 bool skyCellMapInsert( 8967 psDB *dbh, ///< Database handle 8968 const char *skycell_id, 8969 const char *tess_id, 8970 const char *exp_tag, 8971 const char *class_id 8972 ); 8973 8974 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8975 * 8976 * @return A The number of rows removed or a negative value on error 8977 */ 8978 8979 long long skyCellMapDelete( 8980 psDB *dbh, ///< Database handle 8981 const psMetadata *where, ///< Row match criteria 8982 unsigned long long limit ///< Maximum number of elements to delete 8983 ); 8984 8985 /** Insert a single skyCellMapRow object into a table 8986 * 8987 * This function constructs and inserts a single row based on it's parameters. 8988 * 8989 * @return true on success 8990 */ 8991 8992 bool skyCellMapInsertObject( 8993 psDB *dbh, ///< Database handle 8994 skyCellMapRow *object ///< skyCellMapRow object 8995 ); 8996 8997 /** Insert an array of skyCellMapRow object into a table 8998 * 8999 * This function constructs and inserts multiple rows based on it's parameters. 9000 * 9001 * @return true on success 9002 */ 9003 9004 bool skyCellMapInsertObjects( 9005 psDB *dbh, ///< Database handle 9006 psArray *objects ///< array of skyCellMapRow objects 9007 ); 9008 9009 /** Insert data from a binary FITS table skyCellMapRow into the database 9010 * 9011 * This function expects a psFits object with a FITS table as the first 9012 * extension. The table must have at least one row of data in it, that is of 9013 * the appropriate format (number of columns and their type). All other 9014 * extensions are ignored. 9015 * 9016 * @return true on success 9017 */ 9018 9019 bool skyCellMapInsertFits( 9020 psDB *dbh, ///< Database handle 9021 const psFits *fits ///< psFits object 9022 ); 9023 9024 /** Selects up to limit from the database and returns them in a binary FITS table 9025 * 9026 * This function assumes an empty psFits object and will create a FITS table 9027 * as the first extension. 9028 * 9029 * See psDBSelectRows() for documentation on the format of where. 9030 * 9031 * @return true on success 9032 */ 9033 9034 bool skyCellMapSelectRowsFits( 9035 psDB *dbh, ///< Database handle 9036 psFits *fits, ///< psFits object 9037 const psMetadata *where, ///< Row match criteria 9038 unsigned long long limit ///< Maximum number of elements to return 9039 ); 9040 9041 /** Convert a skyCellMapRow into an equivalent psMetadata 9042 * 9043 * @return A psMetadata pointer or NULL on error 9044 */ 9045 9046 psMetadata *skyCellMapMetadataFromObject( 9047 const skyCellMapRow *object ///< fooRow to convert into a psMetadata 9048 ); 9049 9050 /** Convert a psMetadata into an equivalent fooRow 9051 * 9052 * @return A skyCellMapRow pointer or NULL on error 9053 */ 9054 9055 skyCellMapRow *skyCellMapObjectFromMetadata( 9056 psMetadata *md ///< psMetadata to convert into a fooRow 9057 ); 9058 /** Selects up to limit rows from the database and returns as skyCellMapRow objects in a psArray 9059 * 9060 * See psDBSelectRows() for documentation on the format of where. 9061 * 9062 * @return A psArray pointer or NULL on error 9063 */ 9064 9065 psArray *skyCellMapSelectRowObjects( 9066 psDB *dbh, ///< Database handle 9067 const psMetadata *where, ///< Row match criteria 9068 unsigned long long limit ///< Maximum number of elements to return 9069 ); 9070 /** Deletes a row from the database coresponding to an skyCellMap 9071 * 9072 * Note that a 'where' search psMetadata is constructed from each object and 9073 * used to find rows to delete. 9074 * 9075 * @return A The number of rows removed or a negative value on error 9076 */ 9077 9078 bool skyCellMapDeleteObject( 9079 psDB *dbh, ///< Database handle 9080 const skyCellMapRow *object ///< Object to delete 9081 ); 9082 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 9083 * 9084 * Note that a 'where' search psMetadata is constructed from each object and 9085 * used to find rows to delete. 9086 * 9087 * @return A The number of rows removed or a negative value on error 9088 */ 9089 9090 long long skyCellMapDeleteRowObjects( 9091 psDB *dbh, ///< Database handle 9092 const psArray *objects, ///< Array of objects to delete 9093 unsigned long long limit ///< Maximum number of elements to delete 9094 ); 9095 /** Formats and prints an array of skyCellMapRow objects 9096 * 9097 * When mdcf is set the formated output is in psMetadataConfig 9098 * format, otherwise it is in a simple tabular format. 9099 * 9100 * @return true on success 9101 */ 9102 9103 bool skyCellMapPrintObjects( 9104 FILE *stream, ///< a stream 9105 psArray *objects, ///< An array of skyCellMapRow objects 9106 bool mdcf ///< format as mdconfig or simple 9107 ); 9108 /** Formats and prints an skyCellMapRow object 9109 * 9110 * When mdcf is set the formated output is in psMetadataConfig 9111 * format, otherwise it is in a simple tabular format. 9112 * 9113 * @return true on success 9114 */ 9115 9116 bool skyCellMapPrintObject( 9117 FILE *stream, ///< a stream 9118 skyCellMapRow *object, ///< an skyCellMapRow object 9119 bool mdcf ///< format as mdconfig or simple 9120 ); 8101 9121 8102 9122 /// @} … … 8106 9126 #endif 8107 9127 8108 #endif // P4MAGICMASKIMFILE_DB_H9128 #endif // SKYCELLMAP_DB_H
Note:
See TracChangeset
for help on using the changeset viewer.
