Skip to content

Instantly share code, notes, and snippets.

@sdepold
Created October 4, 2012 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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