IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 5, 2007, 6:33:27 PM (19 years ago)
Author:
jhoblitt
Message:

move stacktool SQL into it's own files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/stacktool.c

    r12131 r12263  
    318318    }
    319319
    320     // find all rawImfiles matching the default query
    321     psString query = psStringCopy(
    322         "SELECT\n"
    323         "   warpSkyfile.*,\n"
    324         "   rawExp.camera\n"
    325         " FROM stackRun\n"
    326         " JOIN stackInputSkyfile\n"
    327         "   USING(stack_id)\n"
    328         " JOIN warpSkyfile\n"
    329         "   ON  stackInputSkyfile.warp_id = warpSkyfile.warp_id\n"
    330         "   AND stackRun.skycell_id       = warpSkyfile.skycell_id\n"
    331         "   AND stackRun.tess_id          = warpSkyfile.tess_id\n"
    332         " JOIN warpInputExp\n"
    333         "   ON stackInputSkyfile.warp_id  = warpInputExp.warp_id\n"
    334         " JOIN rawExp\n"
    335         "   ON warpInputExp.exp_tag       = rawExp.exp_tag\n"
    336         " WHERE\n"
    337         "   stackRun.state = 'run'\n"
    338     );
     320    psString query = pxDataGet("warptool_inputskyfile.sql");
     321    if (!query) {
     322        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
     323        return false;
     324    }
     325
    339326    if (config->where) {
    340327        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "stackInputSkyfile");
     
    419406    }
    420407
    421     // find all rawImfiles matching the default query
    422     psString query = psStringCopy(
    423         "SELECT\n"
    424         "   stackRun.stack_id,\n"
    425         "   stackRun.workdir\n"
    426         " FROM stackRun\n"
    427         " LEFT JOIN stackSumSkyfile\n"
    428         "   USING(stack_id)\n"
    429         " WHERE\n"
    430         "   stackRun.state = 'run'\n"
    431         "   AND stackSumSkyfile.stack_id IS NULL\n"
    432     );
     408    psString query = pxDataGet("warptool_tosum.sql");
     409    if (!query) {
     410        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
     411        return false;
     412    }
    433413
    434414    if (config->where) {
     
    592572    }
    593573
    594     // find all rawImfiles matching the default query
    595     psString query = psStringCopy(
    596         "SELECT\n"
    597         "   stackSumSkyfile.*\n"
    598         " FROM stackRun\n"
    599         " JOIN stackSumSkyfile\n"
    600         "   USING(stack_id)\n"
    601         " WHERE\n"
    602         "   stackRun.state = 'run'\n"
    603     );
     574    psString query = pxDataGet("warptool_sumskyfile.sql");
     575    if (!query) {
     576        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
     577        return false;
     578    }
    604579
    605580    if (config->where) {
Note: See TracChangeset for help on using the changeset viewer.