Created
April 23, 2014 14:54
-
-
Save ebbersjathomes/11218528 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by jason on 4/22/14. | |
*/ | |
var async = require("async"); | |
module.exports = function(app){ | |
app.get('/test/oracle',function(req,res,next){ | |
app.logger.info("Start Test route"); | |
async.waterfall([ | |
function(callback){ | |
app.oracleFactory.acquire(callback); | |
}, | |
function(connection,callback){ | |
connection.execute("SELECT systimestamp FROM dual",[],function(err,result){ | |
callback(err,connection,result); | |
}); | |
} | |
], | |
function(err,connection, results){ | |
connection.release(); | |
if(err){ | |
next(err); | |
app.logger.info("End Test route error"); | |
} else { | |
res.json({"status" : true, "rs" : results}); | |
app.logger.info("End Test route success"); | |
} | |
}); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment