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

Commit 1c6841b7 by sdepold

moved query-generator into query-interface

1 parent 869b9d32
...@@ -3,11 +3,6 @@ module.exports = (function(){ ...@@ -3,11 +3,6 @@ module.exports = (function(){
throw new Error('Define the constructor!') throw new Error('Define the constructor!')
} }
ConnectorManager.prototype.getQueryGenerator = function() {
this.__QueryGenerator = this.__QueryGenerator || require(__dirname + '/' + this.sequelize.options.connector + '/query-generator')
return this.__QueryGenerator
}
ConnectorManager.prototype.query = function(sql, callee, options) { ConnectorManager.prototype.query = function(sql, callee, options) {
throw new Error('Define the query method!') throw new Error('Define the query method!')
} }
......
...@@ -3,7 +3,7 @@ var Utils = require('./utils') ...@@ -3,7 +3,7 @@ var Utils = require('./utils')
module.exports = (function() { module.exports = (function() {
var QueryInterface = function(sequelize) { var QueryInterface = function(sequelize) {
this.sequelize = sequelize this.sequelize = sequelize
this.QueryGenerator = this.sequelize.connectorManager.getQueryGenerator() this.QueryGenerator = require('./connectors/' + this.sequelize.options.connector + '/query-generator')
} }
QueryInterface.prototype.createTable = function(tableName, attributes, options) { QueryInterface.prototype.createTable = function(tableName, attributes, options) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!