Created
January 19, 2015 18:58
-
-
Save mickhansen/e75bc0b885e746892974 to your computer and use it in GitHub Desktop.
This file contains 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
var Promise = require('bluebird'); | |
Promise.reduce(queries, function (results, query) { | |
return sequelize.query(query, null, {raw: true, plain: true}).then(function (result) { | |
return results.concat([result]); | |
}); | |
}, []).then(function (results) { | |
console.log("results"); | |
}).catch(function (err) { | |
console.error("Error": err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment