IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8305


Ignore:
Timestamp:
Aug 11, 2006, 5:33:15 PM (20 years ago)
Author:
jhoblitt
Message:

add psDBGenerateWhereConditionSQL()

Location:
trunk/psLib/src/db
Files:
2 edited

Legend:

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

    r8270 r8305  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.80 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-08-10 21:36:54 $
     14 *  @version $Revision: 1.81 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-08-12 03:33:15 $
    1616 *
    1717 *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
     
    14921492    PS_ASSERT_PTR_NON_NULL(where, NULL);
    14931493
    1494     char *query = psStringCopy("WHERE ");
     1494    psString search = psDBGenerateWhereConditionSQL(where);
     1495    if (search) {
     1496        psStringPrepend(&search, "WHERE ");
     1497    }
     1498
     1499    return search;
     1500}
     1501
     1502char *psDBGenerateWhereConditionSQL(const psMetadata *where)
     1503{
     1504    PS_ASSERT_PTR_NON_NULL(where, NULL);
     1505
     1506    char *query = NULL;
    14951507
    14961508    // we need to know if an item is 'MULTI' so we have to march through the
  • trunk/psLib/src/db/psDB.h

    r8251 r8305  
    1010 *  @author Joshua Hoblitt
    1111 *
    12  *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-08-09 04:30:00 $
     12 *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-08-12 03:33:15 $
    1414 *
    1515 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    364364char    *psDBGenerateWhereSQL(const psMetadata *where);
    365365
     366/** Generates an SQL "where conditon" statement
     367 *
     368 * This function generates a "Where" fragment but omits the "Where" keyword.
     369 * This function generates an SQL fragment (not a whole usable query) based on
     370 * the standard "where" metadata format.
     371 *
     372 * @return psString:   A psString or NULL on failure
     373 */
     374char *psDBGenerateWhereConditionSQL(const psMetadata *where);
     375
     376
    366377/// @}
    367378
Note: See TracChangeset for help on using the changeset viewer.