IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2009, 3:11:24 PM (17 years ago)
Author:
eugene
Message:

define formatted and unformatted versions of p_psDBRunQuery and p_psDBRunQueryPrepared

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/db/psDB.h

    r14761 r21401  
    2222 * perform basic database operations.
    2323 *
    24  * $Id: psDB.h,v 1.37 2007-09-05 23:20:04 jhoblitt Exp $
     24 * $Id: psDB.h,v 1.38 2009-02-07 01:11:24 eugene Exp $
    2525 */
    2626
     
    119119);
    120120
    121 /** Executes a SQL query
     121/** Formats and Executes a SQL query
    122122 *
    123123 * This function will execute a string as a raw SQL query.  No additional
     
    127127 * @return bool:    true on success
    128128 */
    129 bool p_psDBRunQuery(
     129bool p_psDBRunQueryF(
    130130    psDB *dbh,                         ///< Database handle
    131131    const char *format,                ///< SQL string to execute
     
    133133) PS_ATTR_FORMAT(printf, 2, 3);
    134134
    135 /** Executes a SQL query as a prepared statement
     135/** Executes a SQL query
    136136 *
    137137 * This function will execute a string as a raw SQL query.  No additional
     
    139139 * dialect is provided.  Caveat emptor.
    140140 *
     141 * @return bool:    true on success
     142 */
     143bool p_psDBRunQuery(
     144    psDB *dbh,                         ///< Database handle
     145    const char *query                ///< SQL string to execute
     146    );
     147
     148/** Formats and Executes a SQL query as a prepared statement
     149 *
     150 * This function will execute a string as a raw SQL query.  No additional
     151 * processing of the string or abstraction of the underlying database's SQL
     152 * dialect is provided.  Caveat emptor.
     153 *
    141154 * @return long:    the number of database rows affected
    142155 */
    143 long p_psDBRunQueryPrepared(
     156long p_psDBRunQueryPreparedF(
    144157    psDB *dbh,                          ///< Database handle
    145158    const psArray *rowSet,              ///< row data as psArray of psMetadata
     
    147160    ...
    148161) PS_ATTR_FORMAT(printf, 3, 4);
     162
     163/** Executes a SQL query as a prepared statement
     164 *
     165 * This function will execute a string as a raw SQL query.  No additional
     166 * processing of the string or abstraction of the underlying database's SQL
     167 * dialect is provided.  Caveat emptor.
     168 *
     169 * @return long:    the number of database rows affected
     170 */
     171long p_psDBRunQueryPrepared(
     172    psDB *dbh,                          ///< Database handle
     173    const psArray *rowSet,              ///< row data as psArray of psMetadata
     174    const char *query                   ///< SQL string to execute
     175);
    149176
    150177/** Fetches the result of a SQL query
Note: See TracChangeset for help on using the changeset viewer.