Changeset 11820 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Feb 14, 2007, 5:58:26 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r11809 r11820 2018 2018 psF64 posang; 2019 2019 char *object; 2020 psF32 solang; 2020 2021 psS16 fault; 2021 2022 } rawExpRow; … … 2048 2049 psF64 posang, 2049 2050 const char *object, 2051 psF32 solang, 2050 2052 psS16 fault 2051 2053 ); … … 2099 2101 psF64 posang, 2100 2102 const char *object, 2103 psF32 solang, 2101 2104 psS16 fault 2102 2105 ); … … 4417 4420 psTime* use_begin; 4418 4421 psTime* use_end; 4422 psF32 solang_min; 4423 psF32 solang_max; 4424 char *label; 4425 psS32 parent; 4419 4426 } detRunRow; 4420 4427 … … 4447 4454 psTime* time_end, 4448 4455 psTime* use_begin, 4449 psTime* use_end 4456 psTime* use_end, 4457 psF32 solang_min, 4458 psF32 solang_max, 4459 const char *label, 4460 psS32 parent 4450 4461 ); 4451 4462 … … 4499 4510 psTime* time_end, 4500 4511 psTime* use_begin, 4501 psTime* use_end 4512 psTime* use_end, 4513 psF32 solang_min, 4514 psF32 solang_max, 4515 const char *label, 4516 psS32 parent 4502 4517 ); 4503 4518 … … 7881 7896 char *skycell_id; 7882 7897 char *tess_id; 7883 char *exp_tag;7884 psS32 p3_version;7885 7898 char *kind; 7886 7899 bool template; … … 7897 7910 const char *skycell_id, 7898 7911 const char *tess_id, 7899 const char *exp_tag,7900 psS32 p3_version,7901 7912 const char *kind, 7902 7913 bool template … … 7934 7945 const char *skycell_id, 7935 7946 const char *tess_id, 7936 const char *exp_tag,7937 psS32 p3_version,7938 7947 const char *kind, 7939 7948 bool template … … 8297 8306 bool mdcf ///< format as mdconfig or simple 8298 8307 ); 8308 /** p6RunRow data structure 8309 * 8310 * Structure for representing a single row of p6Run table data. 8311 */ 8312 8313 typedef struct { 8314 psS32 p6_id; 8315 char *state; 8316 char *workdir; 8317 psTime* registered; 8318 } p6RunRow; 8319 8320 /** Creates a new p6RunRow object 8321 * 8322 * @return A new p6RunRow object or NULL on failure. 8323 */ 8324 8325 p6RunRow *p6RunRowAlloc( 8326 psS32 p6_id, 8327 const char *state, 8328 const char *workdir, 8329 psTime* registered 8330 ); 8331 8332 /** Creates a new p6Run table 8333 * 8334 * @return true on success 8335 */ 8336 8337 bool p6RunCreateTable( 8338 psDB *dbh ///< Database handle 8339 ); 8340 8341 /** Deletes a p6Run table 8342 * 8343 * @return true on success 8344 */ 8345 8346 bool p6RunDropTable( 8347 psDB *dbh ///< Database handle 8348 ); 8349 8350 /** Insert a single row into a table 8351 * 8352 * This function constructs and inserts a single row based on it's parameters. 8353 * 8354 * @return true on success 8355 */ 8356 8357 bool p6RunInsert( 8358 psDB *dbh, ///< Database handle 8359 psS32 p6_id, 8360 const char *state, 8361 const char *workdir, 8362 psTime* registered 8363 ); 8364 8365 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8366 * 8367 * @return A The number of rows removed or a negative value on error 8368 */ 8369 8370 long long p6RunDelete( 8371 psDB *dbh, ///< Database handle 8372 const psMetadata *where, ///< Row match criteria 8373 unsigned long long limit ///< Maximum number of elements to delete 8374 ); 8375 8376 /** Insert a single p6RunRow object into a table 8377 * 8378 * This function constructs and inserts a single row based on it's parameters. 8379 * 8380 * @return true on success 8381 */ 8382 8383 bool p6RunInsertObject( 8384 psDB *dbh, ///< Database handle 8385 p6RunRow *object ///< p6RunRow object 8386 ); 8387 8388 /** Insert an array of p6RunRow object into a table 8389 * 8390 * This function constructs and inserts multiple rows based on it's parameters. 8391 * 8392 * @return true on success 8393 */ 8394 8395 bool p6RunInsertObjects( 8396 psDB *dbh, ///< Database handle 8397 psArray *objects ///< array of p6RunRow objects 8398 ); 8399 8400 /** Insert data from a binary FITS table p6RunRow into the database 8401 * 8402 * This function expects a psFits object with a FITS table as the first 8403 * extension. The table must have at least one row of data in it, that is of 8404 * the appropriate format (number of columns and their type). All other 8405 * extensions are ignored. 8406 * 8407 * @return true on success 8408 */ 8409 8410 bool p6RunInsertFits( 8411 psDB *dbh, ///< Database handle 8412 const psFits *fits ///< psFits object 8413 ); 8414 8415 /** Selects up to limit from the database and returns them in a binary FITS table 8416 * 8417 * This function assumes an empty psFits object and will create a FITS table 8418 * as the first extension. 8419 * 8420 * See psDBSelectRows() for documentation on the format of where. 8421 * 8422 * @return true on success 8423 */ 8424 8425 bool p6RunSelectRowsFits( 8426 psDB *dbh, ///< Database handle 8427 psFits *fits, ///< psFits object 8428 const psMetadata *where, ///< Row match criteria 8429 unsigned long long limit ///< Maximum number of elements to return 8430 ); 8431 8432 /** Convert a p6RunRow into an equivalent psMetadata 8433 * 8434 * @return A psMetadata pointer or NULL on error 8435 */ 8436 8437 psMetadata *p6RunMetadataFromObject( 8438 const p6RunRow *object ///< fooRow to convert into a psMetadata 8439 ); 8440 8441 /** Convert a psMetadata into an equivalent fooRow 8442 * 8443 * @return A p6RunRow pointer or NULL on error 8444 */ 8445 8446 p6RunRow *p6RunObjectFromMetadata( 8447 psMetadata *md ///< psMetadata to convert into a fooRow 8448 ); 8449 /** Selects up to limit rows from the database and returns as p6RunRow objects in a psArray 8450 * 8451 * See psDBSelectRows() for documentation on the format of where. 8452 * 8453 * @return A psArray pointer or NULL on error 8454 */ 8455 8456 psArray *p6RunSelectRowObjects( 8457 psDB *dbh, ///< Database handle 8458 const psMetadata *where, ///< Row match criteria 8459 unsigned long long limit ///< Maximum number of elements to return 8460 ); 8461 /** Deletes a row from the database coresponding to an p6Run 8462 * 8463 * Note that a 'where' search psMetadata is constructed from each object and 8464 * used to find rows to delete. 8465 * 8466 * @return A The number of rows removed or a negative value on error 8467 */ 8468 8469 bool p6RunDeleteObject( 8470 psDB *dbh, ///< Database handle 8471 const p6RunRow *object ///< Object to delete 8472 ); 8473 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 8474 * 8475 * Note that a 'where' search psMetadata is constructed from each object and 8476 * used to find rows to delete. 8477 * 8478 * @return A The number of rows removed or a negative value on error 8479 */ 8480 8481 long long p6RunDeleteRowObjects( 8482 psDB *dbh, ///< Database handle 8483 const psArray *objects, ///< Array of objects to delete 8484 unsigned long long limit ///< Maximum number of elements to delete 8485 ); 8486 /** Formats and prints an array of p6RunRow objects 8487 * 8488 * When mdcf is set the formated output is in psMetadataConfig 8489 * format, otherwise it is in a simple tabular format. 8490 * 8491 * @return true on success 8492 */ 8493 8494 bool p6RunPrintObjects( 8495 FILE *stream, ///< a stream 8496 psArray *objects, ///< An array of p6RunRow objects 8497 bool mdcf ///< format as mdconfig or simple 8498 ); 8499 /** Formats and prints an p6RunRow object 8500 * 8501 * When mdcf is set the formated output is in psMetadataConfig 8502 * format, otherwise it is in a simple tabular format. 8503 * 8504 * @return true on success 8505 */ 8506 8507 bool p6RunPrintObject( 8508 FILE *stream, ///< a stream 8509 p6RunRow *object, ///< an p6RunRow object 8510 bool mdcf ///< format as mdconfig or simple 8511 ); 8299 8512 8300 8513 /// @} … … 8304 8517 #endif 8305 8518 8306 #endif // P 5DIFFSCFILE_DB_H8519 #endif // P6RUN_DB_H
Note:
See TracChangeset
for help on using the changeset viewer.
