Skip to content

Instantly share code, notes, and snippets.

@sdepold
Created October 4, 2012 17:38
Show Gist options
  • Save sdepold/3835184 to your computer and use it in GitHub Desktop.
Save sdepold/3835184 to your computer and use it in GitHub Desktop.
sequelize => customeventemitter <-> querychainer
var Sequelize = require('sequelize')
new Sequelize.Utils.CustomEventEmitter(function(e) {
e.emit('success', 'asd')
}).run().success(function(data) {
console.log(data)
})
var Sequelize = require('sequelize')
new Sequelize.Utils.QueryChainer([
new Sequelize.Utils.CustomEventEmitter(function(e) {
e.emit('success', 'asd')
}).run()
]).run().success(function(data) {
console.log(data)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment