不要怂,就是干,撸起袖子干!

Commit 62e943ff by sdepold

first steps for getting sqlite run

1 parent e465b2cf
Showing with 31 additions and 2 deletions
var Utils = require("../../utils") var Utils = require("../../utils")
, sqlite3 = require('sqlite3').verbose()
module.exports = (function() {
var ConnectorManager = function(sequelize, config) {
this.sequelize = sequelize
}
Utils._.extend(ConnectorManager.prototype, require("../connector-manager").prototype)
ConnectorManager.prototype.query = function(sql, callee, options) {
return new Utils.CustomEventEmitter(function(emitter) {
var db = new sqlite3.Database(':memory:')
db.serialize(function() {
db.run(sql, function(err, foo) {
if(err)
emitter.emit('failure', err)
else
emitter.emit('success', foo)
})
})
db.close()
}).run()
}
return ConnectorManager
})()
var ConnectorManager = module.exports = function() {}
Utils._.extend(ConnectorManager.prototype, require("../connector-manager").prototype)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!