Changeset 10110 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Nov 20, 2006, 1:58:03 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r10060 r10110 125 125 ); 126 126 127 /** expTagCounterRow data structure 128 * 129 * Structure for representing a single row of expTagCounter table data. 130 */ 131 132 typedef struct { 133 psU64 counter; 134 } expTagCounterRow; 135 136 /** Creates a new expTagCounterRow object 137 * 138 * @return A new expTagCounterRow object or NULL on failure. 139 */ 140 141 expTagCounterRow *expTagCounterRowAlloc( 142 psU64 counter 143 ); 144 145 /** Creates a new expTagCounter table 146 * 147 * @return true on success 148 */ 149 150 bool expTagCounterCreateTable( 151 psDB *dbh ///< Database handle 152 ); 153 154 /** Deletes a expTagCounter table 155 * 156 * @return true on success 157 */ 158 159 bool expTagCounterDropTable( 160 psDB *dbh ///< Database handle 161 ); 162 163 /** Insert a single row into a table 164 * 165 * This function constructs and inserts a single row based on it's parameters. 166 * 167 * @return true on success 168 */ 169 170 bool expTagCounterInsert( 171 psDB *dbh, ///< Database handle 172 psU64 counter 173 ); 174 175 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 176 * 177 * @return A The number of rows removed or a negative value on error 178 */ 179 180 long long expTagCounterDelete( 181 psDB *dbh, ///< Database handle 182 const psMetadata *where, ///< Row match criteria 183 unsigned long long limit ///< Maximum number of elements to delete 184 ); 185 186 /** Insert a single expTagCounterRow object into a table 187 * 188 * This function constructs and inserts a single row based on it's parameters. 189 * 190 * @return true on success 191 */ 192 193 bool expTagCounterInsertObject( 194 psDB *dbh, ///< Database handle 195 expTagCounterRow *object ///< expTagCounterRow object 196 ); 197 198 /** Insert an array of expTagCounterRow object into a table 199 * 200 * This function constructs and inserts multiple rows based on it's parameters. 201 * 202 * @return true on success 203 */ 204 205 bool expTagCounterInsertObjects( 206 psDB *dbh, ///< Database handle 207 psArray *objects ///< array of expTagCounterRow objects 208 ); 209 210 /** Insert data from a binary FITS table expTagCounterRow into the database 211 * 212 * This function expects a psFits object with a FITS table as the first 213 * extension. The table must have at least one row of data in it, that is of 214 * the appropriate format (number of columns and their type). All other 215 * extensions are ignored. 216 * 217 * @return true on success 218 */ 219 220 bool expTagCounterInsertFits( 221 psDB *dbh, ///< Database handle 222 const psFits *fits ///< psFits object 223 ); 224 225 /** Selects up to limit from the database and returns them in a binary FITS table 226 * 227 * This function assumes an empty psFits object and will create a FITS table 228 * as the first extension. 229 * 230 * See psDBSelectRows() for documentation on the format of where. 231 * 232 * @return true on success 233 */ 234 235 bool expTagCounterSelectRowsFits( 236 psDB *dbh, ///< Database handle 237 psFits *fits, ///< psFits object 238 const psMetadata *where, ///< Row match criteria 239 unsigned long long limit ///< Maximum number of elements to return 240 ); 241 242 /** Convert a expTagCounterRow into an equivalent psMetadata 243 * 244 * @return A psMetadata pointer or NULL on error 245 */ 246 247 psMetadata *expTagCounterMetadataFromObject( 248 const expTagCounterRow *object ///< fooRow to convert into a psMetadata 249 ); 250 251 /** Convert a psMetadata into an equivalent fooRow 252 * 253 * @return A expTagCounterRow pointer or NULL on error 254 */ 255 256 expTagCounterRow *expTagCounterObjectFromMetadata( 257 psMetadata *md ///< psMetadata to convert into a fooRow 258 ); 259 /** Selects up to limit rows from the database and returns as expTagCounterRow objects in a psArray 260 * 261 * See psDBSelectRows() for documentation on the format of where. 262 * 263 * @return A psArray pointer or NULL on error 264 */ 265 266 psArray *expTagCounterSelectRowObjects( 267 psDB *dbh, ///< Database handle 268 const psMetadata *where, ///< Row match criteria 269 unsigned long long limit ///< Maximum number of elements to return 270 ); 271 /** Deletes a row from the database coresponding to an expTagCounter 272 * 273 * Note that a 'where' search psMetadata is constructed from each object and 274 * used to find rows to delete. 275 * 276 * @return A The number of rows removed or a negative value on error 277 */ 278 279 bool expTagCounterDeleteObject( 280 psDB *dbh, ///< Database handle 281 const expTagCounterRow *object ///< Object to delete 282 ); 283 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 284 * 285 * Note that a 'where' search psMetadata is constructed from each object and 286 * used to find rows to delete. 287 * 288 * @return A The number of rows removed or a negative value on error 289 */ 290 291 long long expTagCounterDeleteRowObjects( 292 psDB *dbh, ///< Database handle 293 const psArray *objects, ///< Array of objects to delete 294 unsigned long long limit ///< Maximum number of elements to delete 295 ); 296 /** Formats and prints an array of expTagCounterRow objects 297 * 298 * When mdcf is set the formated output is in psMetadataConfig 299 * format, otherwise it is in a simple tabular format. 300 * 301 * @return true on success 302 */ 303 304 bool expTagCounterPrintObjects( 305 FILE *stream, ///< a stream 306 psArray *objects, ///< An array of expTagCounterRow objects 307 bool mdcf ///< format as mdconfig or simple 308 ); 127 309 /** summitExpRow data structure 128 310 * … … 1307 1489 1308 1490 typedef struct { 1309 psU64exp_tag;1491 char *exp_tag; 1310 1492 char *exp_id; 1311 1493 char *camera; … … 1322 1504 1323 1505 newExpRow *newExpRowAlloc( 1324 psU64exp_tag,1506 const char *exp_tag, 1325 1507 const char *exp_id, 1326 1508 const char *camera, … … 1358 1540 bool newExpInsert( 1359 1541 psDB *dbh, ///< Database handle 1360 psU64exp_tag,1542 const char *exp_tag, 1361 1543 const char *exp_id, 1362 1544 const char *camera,
Note:
See TracChangeset
for help on using the changeset viewer.
