Changeset 14268 for trunk/ippTools/src/dettool.c
- Timestamp:
- Jul 17, 2007, 10:37:55 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r14266 r14268 51 51 static bool processedexpMode(pxConfig *config); 52 52 static bool revertprocessedexpMode(pxConfig *config); 53 // stacked [imfile]53 // stackedimfile 54 54 static bool tostackedMode(pxConfig *config); 55 55 static bool addstackedMode(pxConfig *config); … … 80 80 static bool addresidexpMode(pxConfig *config); 81 81 static bool residexpMode(pxConfig *config); 82 static bool revertresidexpMode(pxConfig *config); 83 static bool updateresidexpMode(pxConfig *config); 84 // detrunsummary 82 85 static bool todetrunsummaryMode(pxConfig *config); 83 static bool updateresidexpMode(pxConfig *config);84 86 static bool adddetrunsummaryMode(pxConfig *config); 85 87 static bool detrunsummaryMode(pxConfig *config); 86 88 static bool updatedetrunMode(pxConfig *config); 87 89 static bool rerunMode(pxConfig *config); 90 // register 88 91 static bool register_detrendMode(pxConfig *config); 89 92 static bool register_detrend_imfileMode(pxConfig *config); … … 168 171 MODECASE(DETTOOL_MODE_ADDRESIDEXP, addresidexpMode); 169 172 MODECASE(DETTOOL_MODE_RESIDEXP, residexpMode); 173 MODECASE(DETTOOL_MODE_REVERTRESIDEXP, revertresidexpMode); 170 174 MODECASE(DETTOOL_MODE_UPDATERESIDEXP, updateresidexpMode); 171 175 // detrunsummary … … 5610 5614 } 5611 5615 5616 5617 static bool revertresidexpMode(pxConfig *config) 5618 { 5619 PS_ASSERT_PTR_NON_NULL(config, false); 5620 5621 psString query = pxDataGet("dettool_revertresidexp.sql"); 5622 if (!query) { 5623 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 5624 return false; 5625 } 5626 5627 if (config->where) { 5628 psString whereClause = psDBGenerateWhereConditionSQL(config->where, "detResidExp"); 5629 psStringAppend(&query, " AND %s", whereClause); 5630 psFree(whereClause); 5631 } 5632 5633 if (!p_psDBRunQuery(config->dbh, query)) { 5634 psError(PS_ERR_UNKNOWN, false, "database error"); 5635 psFree(query); 5636 return false; 5637 } 5638 psFree(query); 5639 5640 if (psDBAffectedRows(config->dbh) < 1) { 5641 psError(PS_ERR_UNKNOWN, false, "should have affected atleast 1 row"); 5642 return false; 5643 } 5644 5645 return true; 5646 } 5647 5648 5612 5649 static bool todetrunsummaryMode(pxConfig *config) 5613 5650 {
Note:
See TracChangeset
for help on using the changeset viewer.
