Changeset 11720 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Feb 8, 2007, 3:18:04 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (74 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r11679 r11720 20 20 /* 21 21 * 22 * This file was generated by glueforge 0.3622 * This file was generated by glueforge 1.00 23 23 * 24 24 * Do NOT directly edit this file. … … 6830 6830 bool mdcf ///< format as mdconfig or simple 6831 6831 ); 6832 /** p4 aRunRow data structure6833 * 6834 * Structure for representing a single row of p4 aRun table data.6832 /** p4RunRow data structure 6833 * 6834 * Structure for representing a single row of p4Run table data. 6835 6835 */ 6836 6836 6837 6837 typedef struct { 6838 6838 psS32 p4a_id; 6839 char *mode; 6839 6840 char *state; 6840 6841 char *workdir; 6841 bool magic;6842 } p4 aRunRow;6843 6844 /** Creates a new p4 aRunRow object6845 * 6846 * @return A new p4 aRunRow object or NULL on failure.6847 */ 6848 6849 p4 aRunRow *p4aRunRowAlloc(6842 psTime* registered; 6843 } p4RunRow; 6844 6845 /** Creates a new p4RunRow object 6846 * 6847 * @return A new p4RunRow object or NULL on failure. 6848 */ 6849 6850 p4RunRow *p4RunRowAlloc( 6850 6851 psS32 p4a_id, 6852 const char *mode, 6851 6853 const char *state, 6852 6854 const char *workdir, 6853 bool magic6854 ); 6855 6856 /** Creates a new p4 aRun table6857 * 6858 * @return true on success 6859 */ 6860 6861 bool p4 aRunCreateTable(6855 psTime* registered 6856 ); 6857 6858 /** Creates a new p4Run table 6859 * 6860 * @return true on success 6861 */ 6862 6863 bool p4RunCreateTable( 6862 6864 psDB *dbh ///< Database handle 6863 6865 ); 6864 6866 6865 /** Deletes a p4 aRun table6866 * 6867 * @return true on success 6868 */ 6869 6870 bool p4 aRunDropTable(6867 /** Deletes a p4Run table 6868 * 6869 * @return true on success 6870 */ 6871 6872 bool p4RunDropTable( 6871 6873 psDB *dbh ///< Database handle 6872 6874 ); … … 6879 6881 */ 6880 6882 6881 bool p4 aRunInsert(6883 bool p4RunInsert( 6882 6884 psDB *dbh, ///< Database handle 6883 6885 psS32 p4a_id, 6886 const char *mode, 6884 6887 const char *state, 6885 6888 const char *workdir, 6886 bool magic6889 psTime* registered 6887 6890 ); 6888 6891 … … 6892 6895 */ 6893 6896 6894 long long p4 aRunDelete(6897 long long p4RunDelete( 6895 6898 psDB *dbh, ///< Database handle 6896 6899 const psMetadata *where, ///< Row match criteria … … 6898 6901 ); 6899 6902 6900 /** Insert a single p4 aRunRow object into a table6903 /** Insert a single p4RunRow object into a table 6901 6904 * 6902 6905 * This function constructs and inserts a single row based on it's parameters. … … 6905 6908 */ 6906 6909 6907 bool p4 aRunInsertObject(6908 psDB *dbh, ///< Database handle 6909 p4 aRunRow *object ///< p4aRunRow object6910 ); 6911 6912 /** Insert an array of p4 aRunRow object into a table6910 bool p4RunInsertObject( 6911 psDB *dbh, ///< Database handle 6912 p4RunRow *object ///< p4RunRow object 6913 ); 6914 6915 /** Insert an array of p4RunRow object into a table 6913 6916 * 6914 6917 * This function constructs and inserts multiple rows based on it's parameters. … … 6917 6920 */ 6918 6921 6919 bool p4 aRunInsertObjects(6920 psDB *dbh, ///< Database handle 6921 psArray *objects ///< array of p4 aRunRow objects6922 ); 6923 6924 /** Insert data from a binary FITS table p4 aRunRow into the database6922 bool p4RunInsertObjects( 6923 psDB *dbh, ///< Database handle 6924 psArray *objects ///< array of p4RunRow objects 6925 ); 6926 6927 /** Insert data from a binary FITS table p4RunRow into the database 6925 6928 * 6926 6929 * This function expects a psFits object with a FITS table as the first … … 6932 6935 */ 6933 6936 6934 bool p4 aRunInsertFits(6937 bool p4RunInsertFits( 6935 6938 psDB *dbh, ///< Database handle 6936 6939 const psFits *fits ///< psFits object … … 6947 6950 */ 6948 6951 6949 bool p4 aRunSelectRowsFits(6952 bool p4RunSelectRowsFits( 6950 6953 psDB *dbh, ///< Database handle 6951 6954 psFits *fits, ///< psFits object … … 6954 6957 ); 6955 6958 6956 /** Convert a p4 aRunRow into an equivalent psMetadata6959 /** Convert a p4RunRow into an equivalent psMetadata 6957 6960 * 6958 6961 * @return A psMetadata pointer or NULL on error 6959 6962 */ 6960 6963 6961 psMetadata *p4 aRunMetadataFromObject(6962 const p4 aRunRow*object ///< fooRow to convert into a psMetadata6964 psMetadata *p4RunMetadataFromObject( 6965 const p4RunRow *object ///< fooRow to convert into a psMetadata 6963 6966 ); 6964 6967 6965 6968 /** Convert a psMetadata into an equivalent fooRow 6966 6969 * 6967 * @return A p4 aRunRow pointer or NULL on error6968 */ 6969 6970 p4 aRunRow *p4aRunObjectFromMetadata(6970 * @return A p4RunRow pointer or NULL on error 6971 */ 6972 6973 p4RunRow *p4RunObjectFromMetadata( 6971 6974 psMetadata *md ///< psMetadata to convert into a fooRow 6972 6975 ); 6973 /** Selects up to limit rows from the database and returns as p4 aRunRow objects in a psArray6976 /** Selects up to limit rows from the database and returns as p4RunRow objects in a psArray 6974 6977 * 6975 6978 * See psDBSelectRows() for documentation on the format of where. … … 6978 6981 */ 6979 6982 6980 psArray *p4 aRunSelectRowObjects(6983 psArray *p4RunSelectRowObjects( 6981 6984 psDB *dbh, ///< Database handle 6982 6985 const psMetadata *where, ///< Row match criteria 6983 6986 unsigned long long limit ///< Maximum number of elements to return 6984 6987 ); 6985 /** Deletes a row from the database coresponding to an p4 aRun6988 /** Deletes a row from the database coresponding to an p4Run 6986 6989 * 6987 6990 * Note that a 'where' search psMetadata is constructed from each object and … … 6991 6994 */ 6992 6995 6993 bool p4 aRunDeleteObject(6994 psDB *dbh, ///< Database handle 6995 const p4 aRunRow *object ///< Object to delete6996 bool p4RunDeleteObject( 6997 psDB *dbh, ///< Database handle 6998 const p4RunRow *object ///< Object to delete 6996 6999 ); 6997 7000 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 7003 7006 */ 7004 7007 7005 long long p4 aRunDeleteRowObjects(7008 long long p4RunDeleteRowObjects( 7006 7009 psDB *dbh, ///< Database handle 7007 7010 const psArray *objects, ///< Array of objects to delete 7008 7011 unsigned long long limit ///< Maximum number of elements to delete 7009 7012 ); 7010 /** Formats and prints an array of p4 aRunRow objects7013 /** Formats and prints an array of p4RunRow objects 7011 7014 * 7012 7015 * When mdcf is set the formated output is in psMetadataConfig … … 7016 7019 */ 7017 7020 7018 bool p4 aRunPrintObjects(7021 bool p4RunPrintObjects( 7019 7022 FILE *stream, ///< a stream 7020 psArray *objects, ///< An array of p4 aRunRow objects7023 psArray *objects, ///< An array of p4RunRow objects 7021 7024 bool mdcf ///< format as mdconfig or simple 7022 7025 ); 7023 /** Formats and prints an p4 aRunRow object7026 /** Formats and prints an p4RunRow object 7024 7027 * 7025 7028 * When mdcf is set the formated output is in psMetadataConfig … … 7029 7032 */ 7030 7033 7031 bool p4 aRunPrintObject(7034 bool p4RunPrintObject( 7032 7035 FILE *stream, ///< a stream 7033 p4 aRunRow *object, ///< an p4aRunRow object7036 p4RunRow *object, ///< an p4RunRow object 7034 7037 bool mdcf ///< format as mdconfig or simple 7035 7038 ); 7036 /** p4 aInputExpRow data structure7037 * 7038 * Structure for representing a single row of p4 aInputExp table data.7039 /** p4InputExpRow data structure 7040 * 7041 * Structure for representing a single row of p4InputExp table data. 7039 7042 */ 7040 7043 … … 7043 7046 char *exp_tag; 7044 7047 psS32 p3_version; 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( 7048 bool magiced; 7049 } p4InputExpRow; 7050 7051 /** Creates a new p4InputExpRow object 7052 * 7053 * @return A new p4InputExpRow object or NULL on failure. 7054 */ 7055 7056 p4InputExpRow *p4InputExpRowAlloc( 7053 7057 psS32 p4a_id, 7054 7058 const char *exp_tag, 7055 psS32 p3_version 7056 ); 7057 7058 /** Creates a new p4aInputExp table 7059 * 7060 * @return true on success 7061 */ 7062 7063 bool p4aInputExpCreateTable( 7059 psS32 p3_version, 7060 bool magiced 7061 ); 7062 7063 /** Creates a new p4InputExp table 7064 * 7065 * @return true on success 7066 */ 7067 7068 bool p4InputExpCreateTable( 7064 7069 psDB *dbh ///< Database handle 7065 7070 ); 7066 7071 7067 /** Deletes a p4 aInputExp table7068 * 7069 * @return true on success 7070 */ 7071 7072 bool p4 aInputExpDropTable(7072 /** Deletes a p4InputExp table 7073 * 7074 * @return true on success 7075 */ 7076 7077 bool p4InputExpDropTable( 7073 7078 psDB *dbh ///< Database handle 7074 7079 ); … … 7081 7086 */ 7082 7087 7083 bool p4 aInputExpInsert(7088 bool p4InputExpInsert( 7084 7089 psDB *dbh, ///< Database handle 7085 7090 psS32 p4a_id, 7086 7091 const char *exp_tag, 7087 psS32 p3_version 7092 psS32 p3_version, 7093 bool magiced 7088 7094 ); 7089 7095 … … 7093 7099 */ 7094 7100 7095 long long p4 aInputExpDelete(7101 long long p4InputExpDelete( 7096 7102 psDB *dbh, ///< Database handle 7097 7103 const psMetadata *where, ///< Row match criteria … … 7099 7105 ); 7100 7106 7101 /** Insert a single p4 aInputExpRow object into a table7107 /** Insert a single p4InputExpRow object into a table 7102 7108 * 7103 7109 * This function constructs and inserts a single row based on it's parameters. … … 7106 7112 */ 7107 7113 7108 bool p4 aInputExpInsertObject(7109 psDB *dbh, ///< Database handle 7110 p4 aInputExpRow *object ///< p4aInputExpRow object7111 ); 7112 7113 /** Insert an array of p4 aInputExpRow object into a table7114 bool p4InputExpInsertObject( 7115 psDB *dbh, ///< Database handle 7116 p4InputExpRow *object ///< p4InputExpRow object 7117 ); 7118 7119 /** Insert an array of p4InputExpRow object into a table 7114 7120 * 7115 7121 * This function constructs and inserts multiple rows based on it's parameters. … … 7118 7124 */ 7119 7125 7120 bool p4 aInputExpInsertObjects(7121 psDB *dbh, ///< Database handle 7122 psArray *objects ///< array of p4 aInputExpRow objects7123 ); 7124 7125 /** Insert data from a binary FITS table p4 aInputExpRow into the database7126 bool p4InputExpInsertObjects( 7127 psDB *dbh, ///< Database handle 7128 psArray *objects ///< array of p4InputExpRow objects 7129 ); 7130 7131 /** Insert data from a binary FITS table p4InputExpRow into the database 7126 7132 * 7127 7133 * This function expects a psFits object with a FITS table as the first … … 7133 7139 */ 7134 7140 7135 bool p4 aInputExpInsertFits(7141 bool p4InputExpInsertFits( 7136 7142 psDB *dbh, ///< Database handle 7137 7143 const psFits *fits ///< psFits object … … 7148 7154 */ 7149 7155 7150 bool p4 aInputExpSelectRowsFits(7156 bool p4InputExpSelectRowsFits( 7151 7157 psDB *dbh, ///< Database handle 7152 7158 psFits *fits, ///< psFits object … … 7155 7161 ); 7156 7162 7157 /** Convert a p4 aInputExpRow into an equivalent psMetadata7163 /** Convert a p4InputExpRow into an equivalent psMetadata 7158 7164 * 7159 7165 * @return A psMetadata pointer or NULL on error 7160 7166 */ 7161 7167 7162 psMetadata *p4 aInputExpMetadataFromObject(7163 const p4 aInputExpRow *object ///< fooRow to convert into a psMetadata7168 psMetadata *p4InputExpMetadataFromObject( 7169 const p4InputExpRow *object ///< fooRow to convert into a psMetadata 7164 7170 ); 7165 7171 7166 7172 /** Convert a psMetadata into an equivalent fooRow 7167 7173 * 7168 * @return A p4 aInputExpRow pointer or NULL on error7169 */ 7170 7171 p4 aInputExpRow *p4aInputExpObjectFromMetadata(7174 * @return A p4InputExpRow pointer or NULL on error 7175 */ 7176 7177 p4InputExpRow *p4InputExpObjectFromMetadata( 7172 7178 psMetadata *md ///< psMetadata to convert into a fooRow 7173 7179 ); 7174 /** Selects up to limit rows from the database and returns as p4 aInputExpRow objects in a psArray7180 /** Selects up to limit rows from the database and returns as p4InputExpRow objects in a psArray 7175 7181 * 7176 7182 * See psDBSelectRows() for documentation on the format of where. … … 7179 7185 */ 7180 7186 7181 psArray *p4 aInputExpSelectRowObjects(7187 psArray *p4InputExpSelectRowObjects( 7182 7188 psDB *dbh, ///< Database handle 7183 7189 const psMetadata *where, ///< Row match criteria 7184 7190 unsigned long long limit ///< Maximum number of elements to return 7185 7191 ); 7186 /** Deletes a row from the database coresponding to an p4 aInputExp7192 /** Deletes a row from the database coresponding to an p4InputExp 7187 7193 * 7188 7194 * Note that a 'where' search psMetadata is constructed from each object and … … 7192 7198 */ 7193 7199 7194 bool p4 aInputExpDeleteObject(7195 psDB *dbh, ///< Database handle 7196 const p4 aInputExpRow *object ///< Object to delete7200 bool p4InputExpDeleteObject( 7201 psDB *dbh, ///< Database handle 7202 const p4InputExpRow *object ///< Object to delete 7197 7203 ); 7198 7204 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 7204 7210 */ 7205 7211 7206 long long p4 aInputExpDeleteRowObjects(7212 long long p4InputExpDeleteRowObjects( 7207 7213 psDB *dbh, ///< Database handle 7208 7214 const psArray *objects, ///< Array of objects to delete 7209 7215 unsigned long long limit ///< Maximum number of elements to delete 7210 7216 ); 7211 /** Formats and prints an array of p4 aInputExpRow objects7217 /** Formats and prints an array of p4InputExpRow objects 7212 7218 * 7213 7219 * When mdcf is set the formated output is in psMetadataConfig … … 7217 7223 */ 7218 7224 7219 bool p4 aInputExpPrintObjects(7225 bool p4InputExpPrintObjects( 7220 7226 FILE *stream, ///< a stream 7221 psArray *objects, ///< An array of p4 aInputExpRow objects7227 psArray *objects, ///< An array of p4InputExpRow objects 7222 7228 bool mdcf ///< format as mdconfig or simple 7223 7229 ); 7224 /** Formats and prints an p4 aInputExpRow object7230 /** Formats and prints an p4InputExpRow object 7225 7231 * 7226 7232 * When mdcf is set the formated output is in psMetadataConfig … … 7230 7236 */ 7231 7237 7232 bool p4 aInputExpPrintObject(7238 bool p4InputExpPrintObject( 7233 7239 FILE *stream, ///< a stream 7234 p4 aInputExpRow *object, ///< an p4aInputExpRow object7240 p4InputExpRow *object, ///< an p4InputExpRow object 7235 7241 bool mdcf ///< format as mdconfig or simple 7236 7242 ); 7237 /** p4 aScfileRow data structure7238 * 7239 * Structure for representing a single row of p4 aScfile table data.7243 /** p4ScfileRow data structure 7244 * 7245 * Structure for representing a single row of p4Scfile table data. 7240 7246 */ 7241 7247 … … 7249 7255 psF64 bg; 7250 7256 psF64 bg_mean_stdev; 7251 } p4 aScfileRow;7252 7253 /** Creates a new p4 aScfileRow object7254 * 7255 * @return A new p4 aScfileRow object or NULL on failure.7256 */ 7257 7258 p4 aScfileRow *p4aScfileRowAlloc(7257 } p4ScfileRow; 7258 7259 /** Creates a new p4ScfileRow object 7260 * 7261 * @return A new p4ScfileRow object or NULL on failure. 7262 */ 7263 7264 p4ScfileRow *p4ScfileRowAlloc( 7259 7265 psS32 p4a_id, 7260 7266 const char *skycell_id, … … 7267 7273 ); 7268 7274 7269 /** Creates a new p4 aScfile table7270 * 7271 * @return true on success 7272 */ 7273 7274 bool p4 aScfileCreateTable(7275 /** Creates a new p4Scfile table 7276 * 7277 * @return true on success 7278 */ 7279 7280 bool p4ScfileCreateTable( 7275 7281 psDB *dbh ///< Database handle 7276 7282 ); 7277 7283 7278 /** Deletes a p4 aScfile table7279 * 7280 * @return true on success 7281 */ 7282 7283 bool p4 aScfileDropTable(7284 /** Deletes a p4Scfile table 7285 * 7286 * @return true on success 7287 */ 7288 7289 bool p4ScfileDropTable( 7284 7290 psDB *dbh ///< Database handle 7285 7291 ); … … 7292 7298 */ 7293 7299 7294 bool p4 aScfileInsert(7300 bool p4ScfileInsert( 7295 7301 psDB *dbh, ///< Database handle 7296 7302 psS32 p4a_id, … … 7309 7315 */ 7310 7316 7311 long long p4 aScfileDelete(7317 long long p4ScfileDelete( 7312 7318 psDB *dbh, ///< Database handle 7313 7319 const psMetadata *where, ///< Row match criteria … … 7315 7321 ); 7316 7322 7317 /** Insert a single p4 aScfileRow object into a table7323 /** Insert a single p4ScfileRow object into a table 7318 7324 * 7319 7325 * This function constructs and inserts a single row based on it's parameters. … … 7322 7328 */ 7323 7329 7324 bool p4 aScfileInsertObject(7325 psDB *dbh, ///< Database handle 7326 p4 aScfileRow *object ///< p4aScfileRow object7327 ); 7328 7329 /** Insert an array of p4 aScfileRow object into a table7330 bool p4ScfileInsertObject( 7331 psDB *dbh, ///< Database handle 7332 p4ScfileRow *object ///< p4ScfileRow object 7333 ); 7334 7335 /** Insert an array of p4ScfileRow object into a table 7330 7336 * 7331 7337 * This function constructs and inserts multiple rows based on it's parameters. … … 7334 7340 */ 7335 7341 7336 bool p4 aScfileInsertObjects(7337 psDB *dbh, ///< Database handle 7338 psArray *objects ///< array of p4 aScfileRow objects7339 ); 7340 7341 /** Insert data from a binary FITS table p4 aScfileRow into the database7342 bool p4ScfileInsertObjects( 7343 psDB *dbh, ///< Database handle 7344 psArray *objects ///< array of p4ScfileRow objects 7345 ); 7346 7347 /** Insert data from a binary FITS table p4ScfileRow into the database 7342 7348 * 7343 7349 * This function expects a psFits object with a FITS table as the first … … 7349 7355 */ 7350 7356 7351 bool p4 aScfileInsertFits(7357 bool p4ScfileInsertFits( 7352 7358 psDB *dbh, ///< Database handle 7353 7359 const psFits *fits ///< psFits object … … 7364 7370 */ 7365 7371 7366 bool p4 aScfileSelectRowsFits(7372 bool p4ScfileSelectRowsFits( 7367 7373 psDB *dbh, ///< Database handle 7368 7374 psFits *fits, ///< psFits object … … 7371 7377 ); 7372 7378 7373 /** Convert a p4 aScfileRow into an equivalent psMetadata7379 /** Convert a p4ScfileRow into an equivalent psMetadata 7374 7380 * 7375 7381 * @return A psMetadata pointer or NULL on error 7376 7382 */ 7377 7383 7378 psMetadata *p4 aScfileMetadataFromObject(7379 const p4 aScfileRow *object ///< fooRow to convert into a psMetadata7384 psMetadata *p4ScfileMetadataFromObject( 7385 const p4ScfileRow *object ///< fooRow to convert into a psMetadata 7380 7386 ); 7381 7387 7382 7388 /** Convert a psMetadata into an equivalent fooRow 7383 7389 * 7384 * @return A p4 aScfileRow pointer or NULL on error7385 */ 7386 7387 p4 aScfileRow *p4aScfileObjectFromMetadata(7390 * @return A p4ScfileRow pointer or NULL on error 7391 */ 7392 7393 p4ScfileRow *p4ScfileObjectFromMetadata( 7388 7394 psMetadata *md ///< psMetadata to convert into a fooRow 7389 7395 ); 7390 /** Selects up to limit rows from the database and returns as p4 aScfileRow objects in a psArray7396 /** Selects up to limit rows from the database and returns as p4ScfileRow objects in a psArray 7391 7397 * 7392 7398 * See psDBSelectRows() for documentation on the format of where. … … 7395 7401 */ 7396 7402 7397 psArray *p4 aScfileSelectRowObjects(7403 psArray *p4ScfileSelectRowObjects( 7398 7404 psDB *dbh, ///< Database handle 7399 7405 const psMetadata *where, ///< Row match criteria 7400 7406 unsigned long long limit ///< Maximum number of elements to return 7401 7407 ); 7402 /** Deletes a row from the database coresponding to an p4 aScfile7408 /** Deletes a row from the database coresponding to an p4Scfile 7403 7409 * 7404 7410 * Note that a 'where' search psMetadata is constructed from each object and … … 7408 7414 */ 7409 7415 7410 bool p4 aScfileDeleteObject(7411 psDB *dbh, ///< Database handle 7412 const p4 aScfileRow *object ///< Object to delete7416 bool p4ScfileDeleteObject( 7417 psDB *dbh, ///< Database handle 7418 const p4ScfileRow *object ///< Object to delete 7413 7419 ); 7414 7420 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 7420 7426 */ 7421 7427 7422 long long p4 aScfileDeleteRowObjects(7428 long long p4ScfileDeleteRowObjects( 7423 7429 psDB *dbh, ///< Database handle 7424 7430 const psArray *objects, ///< Array of objects to delete 7425 7431 unsigned long long limit ///< Maximum number of elements to delete 7426 7432 ); 7427 /** Formats and prints an array of p4 aScfileRow objects7433 /** Formats and prints an array of p4ScfileRow objects 7428 7434 * 7429 7435 * When mdcf is set the formated output is in psMetadataConfig … … 7433 7439 */ 7434 7440 7435 bool p4 aScfilePrintObjects(7441 bool p4ScfilePrintObjects( 7436 7442 FILE *stream, ///< a stream 7437 psArray *objects, ///< An array of p4 aScfileRow objects7443 psArray *objects, ///< An array of p4ScfileRow objects 7438 7444 bool mdcf ///< format as mdconfig or simple 7439 7445 ); 7440 /** Formats and prints an p4 aScfileRow object7446 /** Formats and prints an p4ScfileRow object 7441 7447 * 7442 7448 * When mdcf is set the formated output is in psMetadataConfig … … 7446 7452 */ 7447 7453 7448 bool p4 aScfilePrintObject(7454 bool p4ScfilePrintObject( 7449 7455 FILE *stream, ///< a stream 7450 p4 aScfileRow *object, ///< an p4aScfileRow object7456 p4ScfileRow *object, ///< an p4ScfileRow object 7451 7457 bool mdcf ///< format as mdconfig or simple 7452 7458 ); 7453 /** p4bRunRow data structure 7454 * 7455 * Structure for representing a single row of p4bRun table data. 7456 */ 7457 7458 typedef struct { 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( 7483 psDB *dbh ///< Database handle 7484 ); 7485 7486 /** Deletes a p4bRun table 7487 * 7488 * @return true on success 7489 */ 7490 7491 bool p4bRunDropTable( 7492 psDB *dbh ///< Database handle 7493 ); 7494 7495 /** Insert a single row into a table 7496 * 7497 * This function constructs and inserts a single row based on it's parameters. 7498 * 7499 * @return true on success 7500 */ 7501 7502 bool p4bRunInsert( 7503 psDB *dbh, ///< Database handle 7504 psS32 p4b_id, 7505 const char *state, 7506 const char *workdir, 7507 bool magic 7508 ); 7509 7510 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 7511 * 7512 * @return A The number of rows removed or a negative value on error 7513 */ 7514 7515 long long p4bRunDelete( 7516 psDB *dbh, ///< Database handle 7517 const psMetadata *where, ///< Row match criteria 7518 unsigned long long limit ///< Maximum number of elements to delete 7519 ); 7520 7521 /** Insert a single p4bRunRow object into a table 7522 * 7523 * This function constructs and inserts a single row based on it's parameters. 7524 * 7525 * @return true on success 7526 */ 7527 7528 bool p4bRunInsertObject( 7529 psDB *dbh, ///< Database handle 7530 p4bRunRow *object ///< p4bRunRow object 7531 ); 7532 7533 /** Insert an array of p4bRunRow object into a table 7534 * 7535 * This function constructs and inserts multiple rows based on it's parameters. 7536 * 7537 * @return true on success 7538 */ 7539 7540 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 7546 * 7547 * This function expects a psFits object with a FITS table as the first 7548 * extension. The table must have at least one row of data in it, that is of 7549 * the appropriate format (number of columns and their type). All other 7550 * extensions are ignored. 7551 * 7552 * @return true on success 7553 */ 7554 7555 bool p4bRunInsertFits( 7556 psDB *dbh, ///< Database handle 7557 const psFits *fits ///< psFits object 7558 ); 7559 7560 /** Selects up to limit from the database and returns them in a binary FITS table 7561 * 7562 * This function assumes an empty psFits object and will create a FITS table 7563 * as the first extension. 7564 * 7565 * See psDBSelectRows() for documentation on the format of where. 7566 * 7567 * @return true on success 7568 */ 7569 7570 bool p4bRunSelectRowsFits( 7571 psDB *dbh, ///< Database handle 7572 psFits *fits, ///< psFits object 7573 const psMetadata *where, ///< Row match criteria 7574 unsigned long long limit ///< Maximum number of elements to return 7575 ); 7576 7577 /** Convert a p4bRunRow into an equivalent psMetadata 7578 * 7579 * @return A psMetadata pointer or NULL on error 7580 */ 7581 7582 psMetadata *p4bRunMetadataFromObject( 7583 const p4bRunRow *object ///< fooRow to convert into a psMetadata 7584 ); 7585 7586 /** Convert a psMetadata into an equivalent fooRow 7587 * 7588 * @return A p4bRunRow pointer or NULL on error 7589 */ 7590 7591 p4bRunRow *p4bRunObjectFromMetadata( 7592 psMetadata *md ///< psMetadata to convert into a fooRow 7593 ); 7594 /** Selects up to limit rows from the database and returns as p4bRunRow objects in a psArray 7595 * 7596 * See psDBSelectRows() for documentation on the format of where. 7597 * 7598 * @return A psArray pointer or NULL on error 7599 */ 7600 7601 psArray *p4bRunSelectRowObjects( 7602 psDB *dbh, ///< Database handle 7603 const psMetadata *where, ///< Row match criteria 7604 unsigned long long limit ///< Maximum number of elements to return 7605 ); 7606 /** Deletes a row from the database coresponding to an p4bRun 7607 * 7608 * Note that a 'where' search psMetadata is constructed from each object and 7609 * used to find rows to delete. 7610 * 7611 * @return A The number of rows removed or a negative value on error 7612 */ 7613 7614 bool p4bRunDeleteObject( 7615 psDB *dbh, ///< Database handle 7616 const p4bRunRow *object ///< Object to delete 7617 ); 7618 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 7619 * 7620 * Note that a 'where' search psMetadata is constructed from each object and 7621 * used to find rows to delete. 7622 * 7623 * @return A The number of rows removed or a negative value on error 7624 */ 7625 7626 long long p4bRunDeleteRowObjects( 7627 psDB *dbh, ///< Database handle 7628 const psArray *objects, ///< Array of objects to delete 7629 unsigned long long limit ///< Maximum number of elements to delete 7630 ); 7631 /** Formats and prints an array of p4bRunRow objects 7632 * 7633 * When mdcf is set the formated output is in psMetadataConfig 7634 * format, otherwise it is in a simple tabular format. 7635 * 7636 * @return true on success 7637 */ 7638 7639 bool p4bRunPrintObjects( 7640 FILE *stream, ///< a stream 7641 psArray *objects, ///< An array of p4bRunRow objects 7642 bool mdcf ///< format as mdconfig or simple 7643 ); 7644 /** Formats and prints an p4bRunRow object 7645 * 7646 * When mdcf is set the formated output is in psMetadataConfig 7647 * format, otherwise it is in a simple tabular format. 7648 * 7649 * @return true on success 7650 */ 7651 7652 bool p4bRunPrintObject( 7653 FILE *stream, ///< a stream 7654 p4bRunRow *object, ///< an p4bRunRow object 7655 bool mdcf ///< format as mdconfig or simple 7656 ); 7657 /** p4bInputScfileRow data structure 7658 * 7659 * Structure for representing a single row of p4bInputScfile table data. 7459 /** p4InputScfileRow data structure 7460 * 7461 * Structure for representing a single row of p4InputScfile table data. 7660 7462 */ 7661 7463 … … 7667 7469 psS32 p3_version; 7668 7470 char *kind; 7669 } p4 bInputScfileRow;7670 7671 /** Creates a new p4 bInputScfileRow object7672 * 7673 * @return A new p4 bInputScfileRow object or NULL on failure.7674 */ 7675 7676 p4 bInputScfileRow *p4bInputScfileRowAlloc(7471 } p4InputScfileRow; 7472 7473 /** Creates a new p4InputScfileRow object 7474 * 7475 * @return A new p4InputScfileRow object or NULL on failure. 7476 */ 7477 7478 p4InputScfileRow *p4InputScfileRowAlloc( 7677 7479 psS32 p4b_id, 7678 7480 const char *skycell_id, … … 7683 7485 ); 7684 7486 7685 /** Creates a new p4 bInputScfile table7686 * 7687 * @return true on success 7688 */ 7689 7690 bool p4 bInputScfileCreateTable(7487 /** Creates a new p4InputScfile table 7488 * 7489 * @return true on success 7490 */ 7491 7492 bool p4InputScfileCreateTable( 7691 7493 psDB *dbh ///< Database handle 7692 7494 ); 7693 7495 7694 /** Deletes a p4 bInputScfile table7695 * 7696 * @return true on success 7697 */ 7698 7699 bool p4 bInputScfileDropTable(7496 /** Deletes a p4InputScfile table 7497 * 7498 * @return true on success 7499 */ 7500 7501 bool p4InputScfileDropTable( 7700 7502 psDB *dbh ///< Database handle 7701 7503 ); … … 7708 7510 */ 7709 7511 7710 bool p4 bInputScfileInsert(7512 bool p4InputScfileInsert( 7711 7513 psDB *dbh, ///< Database handle 7712 7514 psS32 p4b_id, … … 7723 7525 */ 7724 7526 7725 long long p4 bInputScfileDelete(7527 long long p4InputScfileDelete( 7726 7528 psDB *dbh, ///< Database handle 7727 7529 const psMetadata *where, ///< Row match criteria … … 7729 7531 ); 7730 7532 7731 /** Insert a single p4 bInputScfileRow object into a table7533 /** Insert a single p4InputScfileRow object into a table 7732 7534 * 7733 7535 * This function constructs and inserts a single row based on it's parameters. … … 7736 7538 */ 7737 7539 7738 bool p4 bInputScfileInsertObject(7739 psDB *dbh, ///< Database handle 7740 p4 bInputScfileRow *object ///< p4bInputScfileRow object7741 ); 7742 7743 /** Insert an array of p4 bInputScfileRow object into a table7540 bool p4InputScfileInsertObject( 7541 psDB *dbh, ///< Database handle 7542 p4InputScfileRow *object ///< p4InputScfileRow object 7543 ); 7544 7545 /** Insert an array of p4InputScfileRow object into a table 7744 7546 * 7745 7547 * This function constructs and inserts multiple rows based on it's parameters. … … 7748 7550 */ 7749 7551 7750 bool p4 bInputScfileInsertObjects(7751 psDB *dbh, ///< Database handle 7752 psArray *objects ///< array of p4 bInputScfileRow objects7753 ); 7754 7755 /** Insert data from a binary FITS table p4 bInputScfileRow into the database7552 bool p4InputScfileInsertObjects( 7553 psDB *dbh, ///< Database handle 7554 psArray *objects ///< array of p4InputScfileRow objects 7555 ); 7556 7557 /** Insert data from a binary FITS table p4InputScfileRow into the database 7756 7558 * 7757 7559 * This function expects a psFits object with a FITS table as the first … … 7763 7565 */ 7764 7566 7765 bool p4 bInputScfileInsertFits(7567 bool p4InputScfileInsertFits( 7766 7568 psDB *dbh, ///< Database handle 7767 7569 const psFits *fits ///< psFits object … … 7778 7580 */ 7779 7581 7780 bool p4 bInputScfileSelectRowsFits(7582 bool p4InputScfileSelectRowsFits( 7781 7583 psDB *dbh, ///< Database handle 7782 7584 psFits *fits, ///< psFits object … … 7785 7587 ); 7786 7588 7787 /** Convert a p4 bInputScfileRow into an equivalent psMetadata7589 /** Convert a p4InputScfileRow into an equivalent psMetadata 7788 7590 * 7789 7591 * @return A psMetadata pointer or NULL on error 7790 7592 */ 7791 7593 7792 psMetadata *p4 bInputScfileMetadataFromObject(7793 const p4 bInputScfileRow *object ///< fooRow to convert into a psMetadata7594 psMetadata *p4InputScfileMetadataFromObject( 7595 const p4InputScfileRow *object ///< fooRow to convert into a psMetadata 7794 7596 ); 7795 7597 7796 7598 /** Convert a psMetadata into an equivalent fooRow 7797 7599 * 7798 * @return A p4 bInputScfileRow pointer or NULL on error7799 */ 7800 7801 p4 bInputScfileRow *p4bInputScfileObjectFromMetadata(7600 * @return A p4InputScfileRow pointer or NULL on error 7601 */ 7602 7603 p4InputScfileRow *p4InputScfileObjectFromMetadata( 7802 7604 psMetadata *md ///< psMetadata to convert into a fooRow 7803 7605 ); 7804 /** Selects up to limit rows from the database and returns as p4 bInputScfileRow objects in a psArray7606 /** Selects up to limit rows from the database and returns as p4InputScfileRow objects in a psArray 7805 7607 * 7806 7608 * See psDBSelectRows() for documentation on the format of where. … … 7809 7611 */ 7810 7612 7811 psArray *p4 bInputScfileSelectRowObjects(7613 psArray *p4InputScfileSelectRowObjects( 7812 7614 psDB *dbh, ///< Database handle 7813 7615 const psMetadata *where, ///< Row match criteria 7814 7616 unsigned long long limit ///< Maximum number of elements to return 7815 7617 ); 7816 /** Deletes a row from the database coresponding to an p4 bInputScfile7618 /** Deletes a row from the database coresponding to an p4InputScfile 7817 7619 * 7818 7620 * Note that a 'where' search psMetadata is constructed from each object and … … 7822 7624 */ 7823 7625 7824 bool p4 bInputScfileDeleteObject(7825 psDB *dbh, ///< Database handle 7826 const p4 bInputScfileRow *object ///< Object to delete7626 bool p4InputScfileDeleteObject( 7627 psDB *dbh, ///< Database handle 7628 const p4InputScfileRow *object ///< Object to delete 7827 7629 ); 7828 7630 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 7834 7636 */ 7835 7637 7836 long long p4 bInputScfileDeleteRowObjects(7638 long long p4InputScfileDeleteRowObjects( 7837 7639 psDB *dbh, ///< Database handle 7838 7640 const psArray *objects, ///< Array of objects to delete 7839 7641 unsigned long long limit ///< Maximum number of elements to delete 7840 7642 ); 7841 /** Formats and prints an array of p4 bInputScfileRow objects7643 /** Formats and prints an array of p4InputScfileRow objects 7842 7644 * 7843 7645 * When mdcf is set the formated output is in psMetadataConfig … … 7847 7649 */ 7848 7650 7849 bool p4 bInputScfilePrintObjects(7651 bool p4InputScfilePrintObjects( 7850 7652 FILE *stream, ///< a stream 7851 psArray *objects, ///< An array of p4 bInputScfileRow objects7653 psArray *objects, ///< An array of p4InputScfileRow objects 7852 7654 bool mdcf ///< format as mdconfig or simple 7853 7655 ); 7854 /** Formats and prints an p4 bInputScfileRow object7656 /** Formats and prints an p4InputScfileRow object 7855 7657 * 7856 7658 * When mdcf is set the formated output is in psMetadataConfig … … 7860 7662 */ 7861 7663 7862 bool p4 bInputScfilePrintObject(7664 bool p4InputScfilePrintObject( 7863 7665 FILE *stream, ///< a stream 7864 p4 bInputScfileRow *object, ///< an p4bInputScfileRow object7666 p4InputScfileRow *object, ///< an p4InputScfileRow object 7865 7667 bool mdcf ///< format as mdconfig or simple 7866 7668 ); 7867 /** p4 bDiffScfileRow data structure7868 * 7869 * Structure for representing a single row of p4 bDiffScfile table data.7669 /** p4DiffScfileRow data structure 7670 * 7671 * Structure for representing a single row of p4DiffScfile table data. 7870 7672 */ 7871 7673 … … 7879 7681 psF64 bg; 7880 7682 psF64 bg_mean_stdev; 7881 } p4 bDiffScfileRow;7882 7883 /** Creates a new p4 bDiffScfileRow object7884 * 7885 * @return A new p4 bDiffScfileRow object or NULL on failure.7886 */ 7887 7888 p4 bDiffScfileRow *p4bDiffScfileRowAlloc(7683 } p4DiffScfileRow; 7684 7685 /** Creates a new p4DiffScfileRow object 7686 * 7687 * @return A new p4DiffScfileRow object or NULL on failure. 7688 */ 7689 7690 p4DiffScfileRow *p4DiffScfileRowAlloc( 7889 7691 psS32 p4b_id, 7890 7692 const char *skycell_id, … … 7897 7699 ); 7898 7700 7899 /** Creates a new p4 bDiffScfile table7900 * 7901 * @return true on success 7902 */ 7903 7904 bool p4 bDiffScfileCreateTable(7701 /** Creates a new p4DiffScfile table 7702 * 7703 * @return true on success 7704 */ 7705 7706 bool p4DiffScfileCreateTable( 7905 7707 psDB *dbh ///< Database handle 7906 7708 ); 7907 7709 7908 /** Deletes a p4 bDiffScfile table7909 * 7910 * @return true on success 7911 */ 7912 7913 bool p4 bDiffScfileDropTable(7710 /** Deletes a p4DiffScfile table 7711 * 7712 * @return true on success 7713 */ 7714 7715 bool p4DiffScfileDropTable( 7914 7716 psDB *dbh ///< Database handle 7915 7717 ); … … 7922 7724 */ 7923 7725 7924 bool p4 bDiffScfileInsert(7726 bool p4DiffScfileInsert( 7925 7727 psDB *dbh, ///< Database handle 7926 7728 psS32 p4b_id, … … 7939 7741 */ 7940 7742 7941 long long p4 bDiffScfileDelete(7743 long long p4DiffScfileDelete( 7942 7744 psDB *dbh, ///< Database handle 7943 7745 const psMetadata *where, ///< Row match criteria … … 7945 7747 ); 7946 7748 7947 /** Insert a single p4 bDiffScfileRow object into a table7749 /** Insert a single p4DiffScfileRow object into a table 7948 7750 * 7949 7751 * This function constructs and inserts a single row based on it's parameters. … … 7952 7754 */ 7953 7755 7954 bool p4 bDiffScfileInsertObject(7955 psDB *dbh, ///< Database handle 7956 p4 bDiffScfileRow *object ///< p4bDiffScfileRow object7957 ); 7958 7959 /** Insert an array of p4 bDiffScfileRow object into a table7756 bool p4DiffScfileInsertObject( 7757 psDB *dbh, ///< Database handle 7758 p4DiffScfileRow *object ///< p4DiffScfileRow object 7759 ); 7760 7761 /** Insert an array of p4DiffScfileRow object into a table 7960 7762 * 7961 7763 * This function constructs and inserts multiple rows based on it's parameters. … … 7964 7766 */ 7965 7767 7966 bool p4 bDiffScfileInsertObjects(7967 psDB *dbh, ///< Database handle 7968 psArray *objects ///< array of p4 bDiffScfileRow objects7969 ); 7970 7971 /** Insert data from a binary FITS table p4 bDiffScfileRow into the database7768 bool p4DiffScfileInsertObjects( 7769 psDB *dbh, ///< Database handle 7770 psArray *objects ///< array of p4DiffScfileRow objects 7771 ); 7772 7773 /** Insert data from a binary FITS table p4DiffScfileRow into the database 7972 7774 * 7973 7775 * This function expects a psFits object with a FITS table as the first … … 7979 7781 */ 7980 7782 7981 bool p4 bDiffScfileInsertFits(7783 bool p4DiffScfileInsertFits( 7982 7784 psDB *dbh, ///< Database handle 7983 7785 const psFits *fits ///< psFits object … … 7994 7796 */ 7995 7797 7996 bool p4 bDiffScfileSelectRowsFits(7798 bool p4DiffScfileSelectRowsFits( 7997 7799 psDB *dbh, ///< Database handle 7998 7800 psFits *fits, ///< psFits object … … 8001 7803 ); 8002 7804 8003 /** Convert a p4 bDiffScfileRow into an equivalent psMetadata7805 /** Convert a p4DiffScfileRow into an equivalent psMetadata 8004 7806 * 8005 7807 * @return A psMetadata pointer or NULL on error 8006 7808 */ 8007 7809 8008 psMetadata *p4 bDiffScfileMetadataFromObject(8009 const p4 bDiffScfileRow *object ///< fooRow to convert into a psMetadata7810 psMetadata *p4DiffScfileMetadataFromObject( 7811 const p4DiffScfileRow *object ///< fooRow to convert into a psMetadata 8010 7812 ); 8011 7813 8012 7814 /** Convert a psMetadata into an equivalent fooRow 8013 7815 * 8014 * @return A p4 bDiffScfileRow pointer or NULL on error8015 */ 8016 8017 p4 bDiffScfileRow *p4bDiffScfileObjectFromMetadata(7816 * @return A p4DiffScfileRow pointer or NULL on error 7817 */ 7818 7819 p4DiffScfileRow *p4DiffScfileObjectFromMetadata( 8018 7820 psMetadata *md ///< psMetadata to convert into a fooRow 8019 7821 ); 8020 /** Selects up to limit rows from the database and returns as p4 bDiffScfileRow objects in a psArray7822 /** Selects up to limit rows from the database and returns as p4DiffScfileRow objects in a psArray 8021 7823 * 8022 7824 * See psDBSelectRows() for documentation on the format of where. … … 8025 7827 */ 8026 7828 8027 psArray *p4 bDiffScfileSelectRowObjects(7829 psArray *p4DiffScfileSelectRowObjects( 8028 7830 psDB *dbh, ///< Database handle 8029 7831 const psMetadata *where, ///< Row match criteria 8030 7832 unsigned long long limit ///< Maximum number of elements to return 8031 7833 ); 8032 /** Deletes a row from the database coresponding to an p4 bDiffScfile7834 /** Deletes a row from the database coresponding to an p4DiffScfile 8033 7835 * 8034 7836 * Note that a 'where' search psMetadata is constructed from each object and … … 8038 7840 */ 8039 7841 8040 bool p4 bDiffScfileDeleteObject(8041 psDB *dbh, ///< Database handle 8042 const p4 bDiffScfileRow *object ///< Object to delete7842 bool p4DiffScfileDeleteObject( 7843 psDB *dbh, ///< Database handle 7844 const p4DiffScfileRow *object ///< Object to delete 8043 7845 ); 8044 7846 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. … … 8050 7852 */ 8051 7853 8052 long long p4 bDiffScfileDeleteRowObjects(7854 long long p4DiffScfileDeleteRowObjects( 8053 7855 psDB *dbh, ///< Database handle 8054 7856 const psArray *objects, ///< Array of objects to delete 8055 7857 unsigned long long limit ///< Maximum number of elements to delete 8056 7858 ); 8057 /** Formats and prints an array of p4 bDiffScfileRow objects7859 /** Formats and prints an array of p4DiffScfileRow objects 8058 7860 * 8059 7861 * When mdcf is set the formated output is in psMetadataConfig … … 8063 7865 */ 8064 7866 8065 bool p4 bDiffScfilePrintObjects(7867 bool p4DiffScfilePrintObjects( 8066 7868 FILE *stream, ///< a stream 8067 psArray *objects, ///< An array of p4 bDiffScfileRow objects7869 psArray *objects, ///< An array of p4DiffScfileRow objects 8068 7870 bool mdcf ///< format as mdconfig or simple 8069 7871 ); 8070 /** Formats and prints an p4 bDiffScfileRow object7872 /** Formats and prints an p4DiffScfileRow object 8071 7873 * 8072 7874 * When mdcf is set the formated output is in psMetadataConfig … … 8076 7878 */ 8077 7879 8078 bool p4 bDiffScfilePrintObject(7880 bool p4DiffScfilePrintObject( 8079 7881 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 7882 p4DiffScfileRow *object, ///< an p4DiffScfileRow object 8486 7883 bool mdcf ///< format as mdconfig or simple 8487 7884 );
Note:
See TracChangeset
for help on using the changeset viewer.
