IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4427


Ignore:
Timestamp:
Jun 29, 2005, 9:39:56 AM (21 years ago)
Author:
evanalst
Message:

Update psDBDeleteRows to include limit of rows to delete.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataIO/tst_psDB.c

    r4394 r4427  
    99 *  @author Aaron Culliney, MHPCC
    1010 *
    11  *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-25 02:45:15 $
     11 *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-29 19:39:56 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    20432043
    20442044    // Delete row with valid arguments
    2045     chgRows = psDBDeleteRows(dbh,table,where);
     2045    chgRows = psDBDeleteRows(dbh,table,where,10);
    20462046    if(chgRows != 1) {
    20472047        psError(PS_ERR_UNKNOWN,true,"Deleted rows %ld not as expected %ld",
     
    20692069
    20702070    // Attempt to delete row just deleted again
    2071     chgRows = psDBDeleteRows(dbh,table,where);
     2071    chgRows = psDBDeleteRows(dbh,table,where,10);
    20722072    if(chgRows != 0) {
    20732073        psError(PS_ERR_UNKNOWN,true,"Deleted rows %ld not as expected %ld",
     
    20962096    // Attempt to delete row with NULL database
    20972097    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message for NULL database");
    2098     chgRows = psDBDeleteRows(NULL,table,where);
     2098    chgRows = psDBDeleteRows(NULL,table,where,10);
    20992099    if(chgRows > 0) {
    21002100        psError(PS_ERR_UNKNOWN,true,"Deleted rows %ld not as expected %ld",
     
    21072107    // Attempt to delete row with invalid table
    21082108    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message for invalid table");
    2109     chgRows = psDBDeleteRows(dbh,"table999",where);
     2109    chgRows = psDBDeleteRows(dbh,"table999",where,10);
    21102110    if(chgRows > 0) {
    21112111        psError(PS_ERR_UNKNOWN,true,"Deleted rows %ld not as expected %ld",
     
    21172117
    21182118    // Attempt to delete row with NULL where - deletes all rows
    2119     chgRows = psDBDeleteRows(dbh,table,NULL);
     2119    chgRows = psDBDeleteRows(dbh,table,NULL,10);
    21202120    if(chgRows != 2) {
    21212121        psError(PS_ERR_UNKNOWN,true,"Deleted rows %ld not as expected %ld",
     
    21432143
    21442144    // Attempt to delete row with NULL where - deletes all rows from an empty table
    2145     chgRows = psDBDeleteRows(dbh,table,NULL);
     2145    chgRows = psDBDeleteRows(dbh,table,NULL,10);
    21462146    if(chgRows != 0) {
    21472147        psError(PS_ERR_UNKNOWN,true,"Deleted rows %ld not as expected %ld",
Note: See TracChangeset for help on using the changeset viewer.