Changeset 15343 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Oct 19, 2007, 3:59:06 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r15003 r15343 125 125 ); 126 126 127 /** pzDataStoreRow data structure 128 * 129 * Structure for representing a single row of pzDataStore table data. 130 */ 131 132 typedef struct { 133 char *camera; 134 char *telescope; 135 char *uri; 136 } pzDataStoreRow; 137 138 /** Creates a new pzDataStoreRow object 139 * 140 * @return A new pzDataStoreRow object or NULL on failure. 141 */ 142 143 pzDataStoreRow *pzDataStoreRowAlloc( 144 const char *camera, 145 const char *telescope, 146 const char *uri 147 ); 148 149 /** Creates a new pzDataStore table 150 * 151 * @return true on success 152 */ 153 154 bool pzDataStoreCreateTable( 155 psDB *dbh ///< Database handle 156 ); 157 158 /** Deletes a pzDataStore table 159 * 160 * @return true on success 161 */ 162 163 bool pzDataStoreDropTable( 164 psDB *dbh ///< Database handle 165 ); 166 167 /** Insert a single row into a table 168 * 169 * This function constructs and inserts a single row based on it's parameters. 170 * 171 * @return true on success 172 */ 173 174 bool pzDataStoreInsert( 175 psDB *dbh, ///< Database handle 176 const char *camera, 177 const char *telescope, 178 const char *uri 179 ); 180 181 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 182 * 183 * @return A The number of rows removed or a negative value on error 184 */ 185 186 long long pzDataStoreDelete( 187 psDB *dbh, ///< Database handle 188 const psMetadata *where, ///< Row match criteria 189 unsigned long long limit ///< Maximum number of elements to delete 190 ); 191 192 /** Insert a single pzDataStoreRow object into a table 193 * 194 * This function constructs and inserts a single row based on it's parameters. 195 * 196 * @return true on success 197 */ 198 199 bool pzDataStoreInsertObject( 200 psDB *dbh, ///< Database handle 201 pzDataStoreRow *object ///< pzDataStoreRow object 202 ); 203 204 /** Insert an array of pzDataStoreRow object into a table 205 * 206 * This function constructs and inserts multiple rows based on it's parameters. 207 * 208 * @return true on success 209 */ 210 211 bool pzDataStoreInsertObjects( 212 psDB *dbh, ///< Database handle 213 psArray *objects ///< array of pzDataStoreRow objects 214 ); 215 216 /** Insert data from a binary FITS table pzDataStoreRow into the database 217 * 218 * This function expects a psFits object with a FITS table as the first 219 * extension. The table must have at least one row of data in it, that is of 220 * the appropriate format (number of columns and their type). All other 221 * extensions are ignored. 222 * 223 * @return true on success 224 */ 225 226 bool pzDataStoreInsertFits( 227 psDB *dbh, ///< Database handle 228 const psFits *fits ///< psFits object 229 ); 230 231 /** Selects up to limit from the database and returns them in a binary FITS table 232 * 233 * This function assumes an empty psFits object and will create a FITS table 234 * as the first extension. 235 * 236 * See psDBSelectRows() for documentation on the format of where. 237 * 238 * @return true on success 239 */ 240 241 bool pzDataStoreSelectRowsFits( 242 psDB *dbh, ///< Database handle 243 psFits *fits, ///< psFits object 244 const psMetadata *where, ///< Row match criteria 245 unsigned long long limit ///< Maximum number of elements to return 246 ); 247 248 /** Convert a pzDataStoreRow into an equivalent psMetadata 249 * 250 * @return A psMetadata pointer or NULL on error 251 */ 252 253 psMetadata *pzDataStoreMetadataFromObject( 254 const pzDataStoreRow *object ///< fooRow to convert into a psMetadata 255 ); 256 257 /** Convert a psMetadata into an equivalent fooRow 258 * 259 * @return A pzDataStoreRow pointer or NULL on error 260 */ 261 262 pzDataStoreRow *pzDataStoreObjectFromMetadata( 263 psMetadata *md ///< psMetadata to convert into a fooRow 264 ); 265 /** Selects up to limit rows from the database and returns as pzDataStoreRow objects in a psArray 266 * 267 * See psDBSelectRows() for documentation on the format of where. 268 * 269 * @return A psArray pointer or NULL on error 270 */ 271 272 psArray *pzDataStoreSelectRowObjects( 273 psDB *dbh, ///< Database handle 274 const psMetadata *where, ///< Row match criteria 275 unsigned long long limit ///< Maximum number of elements to return 276 ); 277 /** Deletes a row from the database coresponding to an pzDataStore 278 * 279 * Note that a 'where' search psMetadata is constructed from each object and 280 * used to find rows to delete. 281 * 282 * @return A The number of rows removed or a negative value on error 283 */ 284 285 bool pzDataStoreDeleteObject( 286 psDB *dbh, ///< Database handle 287 const pzDataStoreRow *object ///< Object to delete 288 ); 289 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 290 * 291 * Note that a 'where' search psMetadata is constructed from each object and 292 * used to find rows to delete. 293 * 294 * @return A The number of rows removed or a negative value on error 295 */ 296 297 long long pzDataStoreDeleteRowObjects( 298 psDB *dbh, ///< Database handle 299 const psArray *objects, ///< Array of objects to delete 300 unsigned long long limit ///< Maximum number of elements to delete 301 ); 302 /** Formats and prints an array of pzDataStoreRow objects 303 * 304 * When mdcf is set the formated output is in psMetadataConfig 305 * format, otherwise it is in a simple tabular format. 306 * 307 * @return true on success 308 */ 309 310 bool pzDataStorePrintObjects( 311 FILE *stream, ///< a stream 312 psArray *objects, ///< An array of pzDataStoreRow objects 313 bool mdcf ///< format as mdconfig or simple 314 ); 315 /** Formats and prints an pzDataStoreRow object 316 * 317 * When mdcf is set the formated output is in psMetadataConfig 318 * format, otherwise it is in a simple tabular format. 319 * 320 * @return true on success 321 */ 322 323 bool pzDataStorePrintObject( 324 FILE *stream, ///< a stream 325 pzDataStoreRow *object, ///< an pzDataStoreRow object 326 bool mdcf ///< format as mdconfig or simple 327 ); 127 328 /** summitExpRow data structure 128 329 * … … 8849 9050 bool mdcf ///< format as mdconfig or simple 8850 9051 ); 9052 /** detCorrectedExpRow data structure 9053 * 9054 * Structure for representing a single row of detCorrectedExp table data. 9055 */ 9056 9057 typedef struct { 9058 psS64 det_id; 9059 psS64 exp_id; 9060 char *uri; 9061 psS64 corr_id; 9062 char *corr_type; 9063 char *recipe; 9064 char *path_base; 9065 psS16 fault; 9066 } detCorrectedExpRow; 9067 9068 /** Creates a new detCorrectedExpRow object 9069 * 9070 * @return A new detCorrectedExpRow object or NULL on failure. 9071 */ 9072 9073 detCorrectedExpRow *detCorrectedExpRowAlloc( 9074 psS64 det_id, 9075 psS64 exp_id, 9076 const char *uri, 9077 psS64 corr_id, 9078 const char *corr_type, 9079 const char *recipe, 9080 const char *path_base, 9081 psS16 fault 9082 ); 9083 9084 /** Creates a new detCorrectedExp table 9085 * 9086 * @return true on success 9087 */ 9088 9089 bool detCorrectedExpCreateTable( 9090 psDB *dbh ///< Database handle 9091 ); 9092 9093 /** Deletes a detCorrectedExp table 9094 * 9095 * @return true on success 9096 */ 9097 9098 bool detCorrectedExpDropTable( 9099 psDB *dbh ///< Database handle 9100 ); 9101 9102 /** Insert a single row into a table 9103 * 9104 * This function constructs and inserts a single row based on it's parameters. 9105 * 9106 * @return true on success 9107 */ 9108 9109 bool detCorrectedExpInsert( 9110 psDB *dbh, ///< Database handle 9111 psS64 det_id, 9112 psS64 exp_id, 9113 const char *uri, 9114 psS64 corr_id, 9115 const char *corr_type, 9116 const char *recipe, 9117 const char *path_base, 9118 psS16 fault 9119 ); 9120 9121 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 9122 * 9123 * @return A The number of rows removed or a negative value on error 9124 */ 9125 9126 long long detCorrectedExpDelete( 9127 psDB *dbh, ///< Database handle 9128 const psMetadata *where, ///< Row match criteria 9129 unsigned long long limit ///< Maximum number of elements to delete 9130 ); 9131 9132 /** Insert a single detCorrectedExpRow object into a table 9133 * 9134 * This function constructs and inserts a single row based on it's parameters. 9135 * 9136 * @return true on success 9137 */ 9138 9139 bool detCorrectedExpInsertObject( 9140 psDB *dbh, ///< Database handle 9141 detCorrectedExpRow *object ///< detCorrectedExpRow object 9142 ); 9143 9144 /** Insert an array of detCorrectedExpRow object into a table 9145 * 9146 * This function constructs and inserts multiple rows based on it's parameters. 9147 * 9148 * @return true on success 9149 */ 9150 9151 bool detCorrectedExpInsertObjects( 9152 psDB *dbh, ///< Database handle 9153 psArray *objects ///< array of detCorrectedExpRow objects 9154 ); 9155 9156 /** Insert data from a binary FITS table detCorrectedExpRow into the database 9157 * 9158 * This function expects a psFits object with a FITS table as the first 9159 * extension. The table must have at least one row of data in it, that is of 9160 * the appropriate format (number of columns and their type). All other 9161 * extensions are ignored. 9162 * 9163 * @return true on success 9164 */ 9165 9166 bool detCorrectedExpInsertFits( 9167 psDB *dbh, ///< Database handle 9168 const psFits *fits ///< psFits object 9169 ); 9170 9171 /** Selects up to limit from the database and returns them in a binary FITS table 9172 * 9173 * This function assumes an empty psFits object and will create a FITS table 9174 * as the first extension. 9175 * 9176 * See psDBSelectRows() for documentation on the format of where. 9177 * 9178 * @return true on success 9179 */ 9180 9181 bool detCorrectedExpSelectRowsFits( 9182 psDB *dbh, ///< Database handle 9183 psFits *fits, ///< psFits object 9184 const psMetadata *where, ///< Row match criteria 9185 unsigned long long limit ///< Maximum number of elements to return 9186 ); 9187 9188 /** Convert a detCorrectedExpRow into an equivalent psMetadata 9189 * 9190 * @return A psMetadata pointer or NULL on error 9191 */ 9192 9193 psMetadata *detCorrectedExpMetadataFromObject( 9194 const detCorrectedExpRow *object ///< fooRow to convert into a psMetadata 9195 ); 9196 9197 /** Convert a psMetadata into an equivalent fooRow 9198 * 9199 * @return A detCorrectedExpRow pointer or NULL on error 9200 */ 9201 9202 detCorrectedExpRow *detCorrectedExpObjectFromMetadata( 9203 psMetadata *md ///< psMetadata to convert into a fooRow 9204 ); 9205 /** Selects up to limit rows from the database and returns as detCorrectedExpRow objects in a psArray 9206 * 9207 * See psDBSelectRows() for documentation on the format of where. 9208 * 9209 * @return A psArray pointer or NULL on error 9210 */ 9211 9212 psArray *detCorrectedExpSelectRowObjects( 9213 psDB *dbh, ///< Database handle 9214 const psMetadata *where, ///< Row match criteria 9215 unsigned long long limit ///< Maximum number of elements to return 9216 ); 9217 /** Deletes a row from the database coresponding to an detCorrectedExp 9218 * 9219 * Note that a 'where' search psMetadata is constructed from each object and 9220 * used to find rows to delete. 9221 * 9222 * @return A The number of rows removed or a negative value on error 9223 */ 9224 9225 bool detCorrectedExpDeleteObject( 9226 psDB *dbh, ///< Database handle 9227 const detCorrectedExpRow *object ///< Object to delete 9228 ); 9229 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 9230 * 9231 * Note that a 'where' search psMetadata is constructed from each object and 9232 * used to find rows to delete. 9233 * 9234 * @return A The number of rows removed or a negative value on error 9235 */ 9236 9237 long long detCorrectedExpDeleteRowObjects( 9238 psDB *dbh, ///< Database handle 9239 const psArray *objects, ///< Array of objects to delete 9240 unsigned long long limit ///< Maximum number of elements to delete 9241 ); 9242 /** Formats and prints an array of detCorrectedExpRow objects 9243 * 9244 * When mdcf is set the formated output is in psMetadataConfig 9245 * format, otherwise it is in a simple tabular format. 9246 * 9247 * @return true on success 9248 */ 9249 9250 bool detCorrectedExpPrintObjects( 9251 FILE *stream, ///< a stream 9252 psArray *objects, ///< An array of detCorrectedExpRow objects 9253 bool mdcf ///< format as mdconfig or simple 9254 ); 9255 /** Formats and prints an detCorrectedExpRow object 9256 * 9257 * When mdcf is set the formated output is in psMetadataConfig 9258 * format, otherwise it is in a simple tabular format. 9259 * 9260 * @return true on success 9261 */ 9262 9263 bool detCorrectedExpPrintObject( 9264 FILE *stream, ///< a stream 9265 detCorrectedExpRow *object, ///< an detCorrectedExpRow object 9266 bool mdcf ///< format as mdconfig or simple 9267 ); 9268 /** detCorrectedImfileRow data structure 9269 * 9270 * Structure for representing a single row of detCorrectedImfile table data. 9271 */ 9272 9273 typedef struct { 9274 psS64 det_id; 9275 psS64 exp_id; 9276 char *class_id; 9277 char *uri; 9278 char *path_base; 9279 psS16 fault; 9280 } detCorrectedImfileRow; 9281 9282 /** Creates a new detCorrectedImfileRow object 9283 * 9284 * @return A new detCorrectedImfileRow object or NULL on failure. 9285 */ 9286 9287 detCorrectedImfileRow *detCorrectedImfileRowAlloc( 9288 psS64 det_id, 9289 psS64 exp_id, 9290 const char *class_id, 9291 const char *uri, 9292 const char *path_base, 9293 psS16 fault 9294 ); 9295 9296 /** Creates a new detCorrectedImfile table 9297 * 9298 * @return true on success 9299 */ 9300 9301 bool detCorrectedImfileCreateTable( 9302 psDB *dbh ///< Database handle 9303 ); 9304 9305 /** Deletes a detCorrectedImfile table 9306 * 9307 * @return true on success 9308 */ 9309 9310 bool detCorrectedImfileDropTable( 9311 psDB *dbh ///< Database handle 9312 ); 9313 9314 /** Insert a single row into a table 9315 * 9316 * This function constructs and inserts a single row based on it's parameters. 9317 * 9318 * @return true on success 9319 */ 9320 9321 bool detCorrectedImfileInsert( 9322 psDB *dbh, ///< Database handle 9323 psS64 det_id, 9324 psS64 exp_id, 9325 const char *class_id, 9326 const char *uri, 9327 const char *path_base, 9328 psS16 fault 9329 ); 9330 9331 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 9332 * 9333 * @return A The number of rows removed or a negative value on error 9334 */ 9335 9336 long long detCorrectedImfileDelete( 9337 psDB *dbh, ///< Database handle 9338 const psMetadata *where, ///< Row match criteria 9339 unsigned long long limit ///< Maximum number of elements to delete 9340 ); 9341 9342 /** Insert a single detCorrectedImfileRow object into a table 9343 * 9344 * This function constructs and inserts a single row based on it's parameters. 9345 * 9346 * @return true on success 9347 */ 9348 9349 bool detCorrectedImfileInsertObject( 9350 psDB *dbh, ///< Database handle 9351 detCorrectedImfileRow *object ///< detCorrectedImfileRow object 9352 ); 9353 9354 /** Insert an array of detCorrectedImfileRow object into a table 9355 * 9356 * This function constructs and inserts multiple rows based on it's parameters. 9357 * 9358 * @return true on success 9359 */ 9360 9361 bool detCorrectedImfileInsertObjects( 9362 psDB *dbh, ///< Database handle 9363 psArray *objects ///< array of detCorrectedImfileRow objects 9364 ); 9365 9366 /** Insert data from a binary FITS table detCorrectedImfileRow into the database 9367 * 9368 * This function expects a psFits object with a FITS table as the first 9369 * extension. The table must have at least one row of data in it, that is of 9370 * the appropriate format (number of columns and their type). All other 9371 * extensions are ignored. 9372 * 9373 * @return true on success 9374 */ 9375 9376 bool detCorrectedImfileInsertFits( 9377 psDB *dbh, ///< Database handle 9378 const psFits *fits ///< psFits object 9379 ); 9380 9381 /** Selects up to limit from the database and returns them in a binary FITS table 9382 * 9383 * This function assumes an empty psFits object and will create a FITS table 9384 * as the first extension. 9385 * 9386 * See psDBSelectRows() for documentation on the format of where. 9387 * 9388 * @return true on success 9389 */ 9390 9391 bool detCorrectedImfileSelectRowsFits( 9392 psDB *dbh, ///< Database handle 9393 psFits *fits, ///< psFits object 9394 const psMetadata *where, ///< Row match criteria 9395 unsigned long long limit ///< Maximum number of elements to return 9396 ); 9397 9398 /** Convert a detCorrectedImfileRow into an equivalent psMetadata 9399 * 9400 * @return A psMetadata pointer or NULL on error 9401 */ 9402 9403 psMetadata *detCorrectedImfileMetadataFromObject( 9404 const detCorrectedImfileRow *object ///< fooRow to convert into a psMetadata 9405 ); 9406 9407 /** Convert a psMetadata into an equivalent fooRow 9408 * 9409 * @return A detCorrectedImfileRow pointer or NULL on error 9410 */ 9411 9412 detCorrectedImfileRow *detCorrectedImfileObjectFromMetadata( 9413 psMetadata *md ///< psMetadata to convert into a fooRow 9414 ); 9415 /** Selects up to limit rows from the database and returns as detCorrectedImfileRow objects in a psArray 9416 * 9417 * See psDBSelectRows() for documentation on the format of where. 9418 * 9419 * @return A psArray pointer or NULL on error 9420 */ 9421 9422 psArray *detCorrectedImfileSelectRowObjects( 9423 psDB *dbh, ///< Database handle 9424 const psMetadata *where, ///< Row match criteria 9425 unsigned long long limit ///< Maximum number of elements to return 9426 ); 9427 /** Deletes a row from the database coresponding to an detCorrectedImfile 9428 * 9429 * Note that a 'where' search psMetadata is constructed from each object and 9430 * used to find rows to delete. 9431 * 9432 * @return A The number of rows removed or a negative value on error 9433 */ 9434 9435 bool detCorrectedImfileDeleteObject( 9436 psDB *dbh, ///< Database handle 9437 const detCorrectedImfileRow *object ///< Object to delete 9438 ); 9439 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 9440 * 9441 * Note that a 'where' search psMetadata is constructed from each object and 9442 * used to find rows to delete. 9443 * 9444 * @return A The number of rows removed or a negative value on error 9445 */ 9446 9447 long long detCorrectedImfileDeleteRowObjects( 9448 psDB *dbh, ///< Database handle 9449 const psArray *objects, ///< Array of objects to delete 9450 unsigned long long limit ///< Maximum number of elements to delete 9451 ); 9452 /** Formats and prints an array of detCorrectedImfileRow objects 9453 * 9454 * When mdcf is set the formated output is in psMetadataConfig 9455 * format, otherwise it is in a simple tabular format. 9456 * 9457 * @return true on success 9458 */ 9459 9460 bool detCorrectedImfilePrintObjects( 9461 FILE *stream, ///< a stream 9462 psArray *objects, ///< An array of detCorrectedImfileRow objects 9463 bool mdcf ///< format as mdconfig or simple 9464 ); 9465 /** Formats and prints an detCorrectedImfileRow object 9466 * 9467 * When mdcf is set the formated output is in psMetadataConfig 9468 * format, otherwise it is in a simple tabular format. 9469 * 9470 * @return true on success 9471 */ 9472 9473 bool detCorrectedImfilePrintObject( 9474 FILE *stream, ///< a stream 9475 detCorrectedImfileRow *object, ///< an detCorrectedImfileRow object 9476 bool mdcf ///< format as mdconfig or simple 9477 ); 8851 9478 /** magicRunRow data structure 8852 9479 * … … 9863 10490 bool mdcf ///< format as mdconfig or simple 9864 10491 ); 10492 /** magicSkyfileMaskRow data structure 10493 * 10494 * Structure for representing a single row of magicSkyfileMask table data. 10495 */ 10496 10497 typedef struct { 10498 psS64 magic_id; 10499 psS64 diff_id; 10500 char *uri; 10501 } magicSkyfileMaskRow; 10502 10503 /** Creates a new magicSkyfileMaskRow object 10504 * 10505 * @return A new magicSkyfileMaskRow object or NULL on failure. 10506 */ 10507 10508 magicSkyfileMaskRow *magicSkyfileMaskRowAlloc( 10509 psS64 magic_id, 10510 psS64 diff_id, 10511 const char *uri 10512 ); 10513 10514 /** Creates a new magicSkyfileMask table 10515 * 10516 * @return true on success 10517 */ 10518 10519 bool magicSkyfileMaskCreateTable( 10520 psDB *dbh ///< Database handle 10521 ); 10522 10523 /** Deletes a magicSkyfileMask table 10524 * 10525 * @return true on success 10526 */ 10527 10528 bool magicSkyfileMaskDropTable( 10529 psDB *dbh ///< Database handle 10530 ); 10531 10532 /** Insert a single row into a table 10533 * 10534 * This function constructs and inserts a single row based on it's parameters. 10535 * 10536 * @return true on success 10537 */ 10538 10539 bool magicSkyfileMaskInsert( 10540 psDB *dbh, ///< Database handle 10541 psS64 magic_id, 10542 psS64 diff_id, 10543 const char *uri 10544 ); 10545 10546 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 10547 * 10548 * @return A The number of rows removed or a negative value on error 10549 */ 10550 10551 long long magicSkyfileMaskDelete( 10552 psDB *dbh, ///< Database handle 10553 const psMetadata *where, ///< Row match criteria 10554 unsigned long long limit ///< Maximum number of elements to delete 10555 ); 10556 10557 /** Insert a single magicSkyfileMaskRow object into a table 10558 * 10559 * This function constructs and inserts a single row based on it's parameters. 10560 * 10561 * @return true on success 10562 */ 10563 10564 bool magicSkyfileMaskInsertObject( 10565 psDB *dbh, ///< Database handle 10566 magicSkyfileMaskRow *object ///< magicSkyfileMaskRow object 10567 ); 10568 10569 /** Insert an array of magicSkyfileMaskRow object into a table 10570 * 10571 * This function constructs and inserts multiple rows based on it's parameters. 10572 * 10573 * @return true on success 10574 */ 10575 10576 bool magicSkyfileMaskInsertObjects( 10577 psDB *dbh, ///< Database handle 10578 psArray *objects ///< array of magicSkyfileMaskRow objects 10579 ); 10580 10581 /** Insert data from a binary FITS table magicSkyfileMaskRow into the database 10582 * 10583 * This function expects a psFits object with a FITS table as the first 10584 * extension. The table must have at least one row of data in it, that is of 10585 * the appropriate format (number of columns and their type). All other 10586 * extensions are ignored. 10587 * 10588 * @return true on success 10589 */ 10590 10591 bool magicSkyfileMaskInsertFits( 10592 psDB *dbh, ///< Database handle 10593 const psFits *fits ///< psFits object 10594 ); 10595 10596 /** Selects up to limit from the database and returns them in a binary FITS table 10597 * 10598 * This function assumes an empty psFits object and will create a FITS table 10599 * as the first extension. 10600 * 10601 * See psDBSelectRows() for documentation on the format of where. 10602 * 10603 * @return true on success 10604 */ 10605 10606 bool magicSkyfileMaskSelectRowsFits( 10607 psDB *dbh, ///< Database handle 10608 psFits *fits, ///< psFits object 10609 const psMetadata *where, ///< Row match criteria 10610 unsigned long long limit ///< Maximum number of elements to return 10611 ); 10612 10613 /** Convert a magicSkyfileMaskRow into an equivalent psMetadata 10614 * 10615 * @return A psMetadata pointer or NULL on error 10616 */ 10617 10618 psMetadata *magicSkyfileMaskMetadataFromObject( 10619 const magicSkyfileMaskRow *object ///< fooRow to convert into a psMetadata 10620 ); 10621 10622 /** Convert a psMetadata into an equivalent fooRow 10623 * 10624 * @return A magicSkyfileMaskRow pointer or NULL on error 10625 */ 10626 10627 magicSkyfileMaskRow *magicSkyfileMaskObjectFromMetadata( 10628 psMetadata *md ///< psMetadata to convert into a fooRow 10629 ); 10630 /** Selects up to limit rows from the database and returns as magicSkyfileMaskRow objects in a psArray 10631 * 10632 * See psDBSelectRows() for documentation on the format of where. 10633 * 10634 * @return A psArray pointer or NULL on error 10635 */ 10636 10637 psArray *magicSkyfileMaskSelectRowObjects( 10638 psDB *dbh, ///< Database handle 10639 const psMetadata *where, ///< Row match criteria 10640 unsigned long long limit ///< Maximum number of elements to return 10641 ); 10642 /** Deletes a row from the database coresponding to an magicSkyfileMask 10643 * 10644 * Note that a 'where' search psMetadata is constructed from each object and 10645 * used to find rows to delete. 10646 * 10647 * @return A The number of rows removed or a negative value on error 10648 */ 10649 10650 bool magicSkyfileMaskDeleteObject( 10651 psDB *dbh, ///< Database handle 10652 const magicSkyfileMaskRow *object ///< Object to delete 10653 ); 10654 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 10655 * 10656 * Note that a 'where' search psMetadata is constructed from each object and 10657 * used to find rows to delete. 10658 * 10659 * @return A The number of rows removed or a negative value on error 10660 */ 10661 10662 long long magicSkyfileMaskDeleteRowObjects( 10663 psDB *dbh, ///< Database handle 10664 const psArray *objects, ///< Array of objects to delete 10665 unsigned long long limit ///< Maximum number of elements to delete 10666 ); 10667 /** Formats and prints an array of magicSkyfileMaskRow objects 10668 * 10669 * When mdcf is set the formated output is in psMetadataConfig 10670 * format, otherwise it is in a simple tabular format. 10671 * 10672 * @return true on success 10673 */ 10674 10675 bool magicSkyfileMaskPrintObjects( 10676 FILE *stream, ///< a stream 10677 psArray *objects, ///< An array of magicSkyfileMaskRow objects 10678 bool mdcf ///< format as mdconfig or simple 10679 ); 10680 /** Formats and prints an magicSkyfileMaskRow object 10681 * 10682 * When mdcf is set the formated output is in psMetadataConfig 10683 * format, otherwise it is in a simple tabular format. 10684 * 10685 * @return true on success 10686 */ 10687 10688 bool magicSkyfileMaskPrintObject( 10689 FILE *stream, ///< a stream 10690 magicSkyfileMaskRow *object, ///< an magicSkyfileMaskRow object 10691 bool mdcf ///< format as mdconfig or simple 10692 ); 9865 10693 9866 10694 /// @} … … 9870 10698 #endif 9871 10699 9872 #endif // MAGIC MASK_DB_H10700 #endif // MAGICSKYFILEMASK_DB_H
Note:
See TracChangeset
for help on using the changeset viewer.
