Changeset 8175 for trunk/ippTools/src/dettool.c
- Timestamp:
- Aug 4, 2006, 3:59:47 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r8120 r8175 9 9 #include "dettool.h" 10 10 11 static bool pendingMode(pxConfig *config); 11 12 static bool defineMode(pxConfig *config); 12 13 static bool runsMode(pxConfig *config); … … 52 53 53 54 switch (config->mode) { 55 MODECASE(DETTOOL_MODE_PENDING, pendingMode); 54 56 MODECASE(DETTOOL_MODE_DEFINE, defineMode); 55 57 MODECASE(DETTOOL_MODE_RUNS, runsMode); … … 90 92 91 93 exit(EXIT_FAILURE); 94 } 95 96 static bool pendingMode(pxConfig *config) 97 { 98 PS_ASSERT_PTR_NON_NULL(config, NULL); 99 100 char *query = "SELECT rawDetrendExp.* FROM rawDetrendExp LEFT JOIN detInputExp ON rawDetrendExp.exp_id = detInputExp.exp_id WHERE detInputExp.exp_id IS NULL"; 101 102 if (!p_psDBRunQuery(config->dbh, query)) { 103 psError(PS_ERR_UNKNOWN, false, "database error"); 104 return false; 105 } 106 107 psArray *result = p_psDBFetchResult(config->dbh); 108 if (!result) { 109 // XXX check psError here 110 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 111 return false; 112 } 113 114 if (!ippdbPrintMetadatas(stdout, result, "rawDetrendExp", true)) { 115 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 116 psFree(result); 117 return false; 118 } 119 120 psFree(result); 121 122 return true; 92 123 } 93 124 … … 1556 1587 return false; 1557 1588 } 1589 psString uri = psMetadataLookupStr(&status, config->args, "-uri"); 1590 if (!status) { 1591 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -uri"); 1592 return false; 1593 } 1594 if (!uri) { 1595 psError(PS_ERR_UNKNOWN, true, "-uri is required"); 1596 return false; 1597 } 1598 // optional 1599 psString b1_uri = psMetadataLookupStr(&status, config->args, "-b1_uri"); 1600 if (!status) { 1601 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -b1_uri"); 1602 return false; 1603 } 1604 psString b2_uri = psMetadataLookupStr(&status, config->args, "-b2_uri"); 1605 if (!status) { 1606 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -b2_uri"); 1607 return false; 1608 } 1558 1609 1559 1610 // iteration has a default value … … 1617 1668 exp_id, 1618 1669 class_id, 1619 recipe 1670 recipe, 1671 uri, 1672 b1_uri, 1673 b2_uri 1620 1674 ); 1621 1675
Note:
See TracChangeset
for help on using the changeset viewer.
