IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 20, 2006, 1:58:03 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.57

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/src/ippdb.h

    r10060 r10110  
    125125);
    126126
     127/** expTagCounterRow data structure
     128 *
     129 * Structure for representing a single row of expTagCounter table data.
     130 */
     131
     132typedef 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
     141expTagCounterRow *expTagCounterRowAlloc(
     142    psU64           counter
     143);
     144
     145/** Creates a new expTagCounter table
     146 *
     147 * @return true on success
     148 */
     149
     150bool expTagCounterCreateTable(
     151    psDB            *dbh                ///< Database handle
     152);
     153
     154/** Deletes a expTagCounter table
     155 *
     156 * @return true on success
     157 */
     158
     159bool 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
     170bool 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
     180long 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
     193bool 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
     205bool 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
     220bool 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
     235bool 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
     247psMetadata *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
     256expTagCounterRow *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
     266psArray *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
     279bool 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
     291long 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
     304bool expTagCounterPrintObjects(
     305    FILE            *stream,            ///< a stream
     306    psArray         *objects,           ///< An array of expTagCounterRow objects
     307    bool            mdcf                ///< format as mdconfig or simple
     308);
    127309/** summitExpRow data structure
    128310 *
     
    13071489
    13081490typedef struct {
    1309     psU64           exp_tag;
     1491    char            *exp_tag;
    13101492    char            *exp_id;
    13111493    char            *camera;
     
    13221504
    13231505newExpRow *newExpRowAlloc(
    1324     psU64           exp_tag,
     1506    const char      *exp_tag,
    13251507    const char      *exp_id,
    13261508    const char      *camera,
     
    13581540bool newExpInsert(
    13591541    psDB            *dbh,               ///< Database handle
    1360     psU64           exp_tag,
     1542    const char      *exp_tag,
    13611543    const char      *exp_id,
    13621544    const char      *camera,
Note: See TracChangeset for help on using the changeset viewer.