Skip to content

Instantly share code, notes, and snippets.

@neurotech
Created July 20, 2015 11:39
Show Gist options
  • Save neurotech/7d2095e99a8900198978 to your computer and use it in GitHub Desktop.
Save neurotech/7d2095e99a8900198978 to your computer and use it in GitHub Desktop.
Promise style
// One
edumate.query(config, sql, {clean: true}).then(function (results) {
console.log(results);
}, function (error) {
console.error(error);
});
// Two
edumate.query(config, sql, {clean: true})
.then(function (results) {
console.log(results);
}, function (error) {
console.error(error);
});
// Three
edumate.query(config, sql, {clean: true})
.then(function (results) {
console.log(results);
}, function (error) {
console.error(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment