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

Commit 856be984 by Sascha Depold

dialectOptions

1 parent e2a2c654
...@@ -265,9 +265,9 @@ module.exports = (function() { ...@@ -265,9 +265,9 @@ module.exports = (function() {
timezone: 'Z' timezone: 'Z'
}; };
if (config.connectionOptions) { if (config.dialectOptions) {
Object.keys(config.connectionOptions).forEach(function (key) { Object.keys(config.dialectOptions).forEach(function (key) {
connectionConfig[key] = config.connectionOptions[key]; connectionConfig[key] = config.dialectOptions[key];
}); });
} }
......
...@@ -104,7 +104,7 @@ module.exports = (function() { ...@@ -104,7 +104,7 @@ module.exports = (function() {
replication: this.options.replication, replication: this.options.replication,
dialectModulePath: this.options.dialectModulePath, dialectModulePath: this.options.dialectModulePath,
maxConcurrentQueries: this.options.maxConcurrentQueries, maxConcurrentQueries: this.options.maxConcurrentQueries,
connectionOptions: this.options.connectionOptions, dialectOptions: this.options.dialectOptions,
} }
try { try {
......
...@@ -103,7 +103,7 @@ describe(Support.getTestDialectTeaser("Configuration"), function() { ...@@ -103,7 +103,7 @@ describe(Support.getTestDialectTeaser("Configuration"), function() {
it('should accept four parameters (database, username, password, options)', function(done) { it('should accept four parameters (database, username, password, options)', function(done) {
var sequelize = new Sequelize('dbname', 'root', 'pass', { var sequelize = new Sequelize('dbname', 'root', 'pass', {
port: 999, port: 999,
connectionOptions: { dialectOptions: {
supportBigNumbers: true, supportBigNumbers: true,
bigNumberStrings: true bigNumberStrings: true
} }
...@@ -114,8 +114,8 @@ describe(Support.getTestDialectTeaser("Configuration"), function() { ...@@ -114,8 +114,8 @@ describe(Support.getTestDialectTeaser("Configuration"), function() {
expect(config.username).to.equal('root') expect(config.username).to.equal('root')
expect(config.password).to.equal('pass') expect(config.password).to.equal('pass')
expect(config.port).to.equal(999) expect(config.port).to.equal(999)
expect(config.connectionOptions.supportBigNumbers).to.be.true expect(config.dialectOptions.supportBigNumbers).to.be.true
expect(config.connectionOptions.bigNumberStrings).to.be.true expect(config.dialectOptions.bigNumberStrings).to.be.true
done() done()
}) })
}) })
......
...@@ -36,7 +36,7 @@ var Support = { ...@@ -36,7 +36,7 @@ var Support = {
dialect: options.dialect, dialect: options.dialect,
port: options.port || process.env.SEQ_PORT || config[options.dialect].port, port: options.port || process.env.SEQ_PORT || config[options.dialect].port,
pool: options.pool, pool: options.pool,
connectionOptions: options.connectionOptions || {} dialectOptions: options.dialectOptions || {}
} }
if (!!options.host) { if (!!options.host) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!