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

Commit 6e8793c2 by Mick Hansen

Merge pull request #1743 from overlookmotel/master

Removed tabs where should be spaces
2 parents c20fa816 e40e6474
var AbstractDialect = function() {
}
AbstractDialect.prototype.supports = {
'RETURNING': false,
'DEFAULT': true,
'DEFAULT VALUES': false,
'VALUES ()': false,
'LIMIT ON UPDATE':false,
schemas: false
'RETURNING': false,
'DEFAULT': true,
'DEFAULT VALUES': false,
'VALUES ()': false,
'LIMIT ON UPDATE':false,
schemas: false
}
module.exports = AbstractDialect
\ No newline at end of file
......@@ -6,8 +6,8 @@ var MysqlDialect = function(sequelize) {
}
MysqlDialect.prototype.supports = _.defaults({
'VALUES ()': true,
'LIMIT ON UPDATE':true
'VALUES ()': true,
'LIMIT ON UPDATE':true
}, Abstract.prototype.supports)
module.exports = MysqlDialect
......@@ -6,9 +6,9 @@ var PostgresDialect = function(sequelize) {
}
PostgresDialect.prototype.supports = _.defaults({
'RETURNING': true,
'DEFAULT VALUES': true,
schemas: true
'RETURNING': true,
'DEFAULT VALUES': true,
schemas: true
}, Abstract.prototype.supports)
module.exports = PostgresDialect
......@@ -6,8 +6,8 @@ var SqliteDialect = function(sequelize) {
}
SqliteDialect.prototype.supports = _.defaults({
'DEFAULT': false,
'DEFAULT VALUES': true
'DEFAULT': false,
'DEFAULT VALUES': true
}, Abstract.prototype.supports)
module.exports = SqliteDialect
......@@ -253,11 +253,10 @@ InstanceValidator.prototype._builtinAttrValidate = function(value, field) {
// Check for custom validator.
if (typeof test === 'function') {
return validators.push(self._invokeCustomValidator(test, validatorType,
true, value, field))
return validators.push(self._invokeCustomValidator(test, validatorType, true, value, field))
}
var validatorPromise = self._invokeBuiltinValidator(value, test, validatorType, field);
var validatorPromise = self._invokeBuiltinValidator(value, test, validatorType, field)
// errors are handled in settling, stub this
validatorPromise.catch(noop)
validators.push(validatorPromise)
......
......@@ -34,7 +34,7 @@ module.exports = (function() {
if (!this.QueryGenerator._dialect.supports.schemas) {
return this.sequelize.drop()
} else {
return this.showAllSchemas().map(function (schemaName, index, length) {
return this.showAllSchemas().map(function (schemaName, index, length) {
return self.dropSchema(schemaName)
})
}
......
module.exports = {
SELECT: 'SELECT',
BULKUPDATE: 'BULKUPDATE',
BULKDELETE: 'BULKDELETE'
SELECT: 'SELECT',
BULKUPDATE: 'BULKUPDATE',
BULKDELETE: 'BULKDELETE'
}
\ No newline at end of file
......@@ -58,7 +58,7 @@ describe(Support.getTestDialectTeaser("DAO"), function () {
done()
})
}).error(function(err) {
done(err);
done(err)
});
})
})
......@@ -943,7 +943,7 @@ describe(Support.getTestDialectTeaser("DAO"), function () {
expect(err).to.be.instanceof(Object)
expect(err.validateTest).to.be.instanceof(Array)
expect(err.validateTest[0]).to.exist
expect(err.validateTest[0].message).to.equal('Validation isInt failed')
expect(err.validateTest[0].message).to.equal('Validation isInt failed')
done()
})
})
......@@ -956,7 +956,7 @@ describe(Support.getTestDialectTeaser("DAO"), function () {
expect(err.validateCustom).to.exist
expect(err.validateCustom).to.be.instanceof(Array)
expect(err.validateCustom[0]).to.exist
expect(err.validateCustom[0].message).to.equal('Length failed.')
expect(err.validateCustom[0].message).to.equal('Length failed.')
done()
})
})
......@@ -969,7 +969,7 @@ describe(Support.getTestDialectTeaser("DAO"), function () {
expect(err.validateTest).to.exist
expect(err.validateTest).to.be.instanceof(Array)
expect(err.validateTest[0]).to.exist
expect(err.validateTest[0].message).to.equal('Validation isInt failed')
expect(err.validateTest[0].message).to.equal('Validation isInt failed')
done()
})
})
......
......@@ -98,10 +98,10 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
if (dialect === 'mariadb') {
expect(err.message).to.match(/Access denied for user/)
} else if (dialect === 'postgres') {
// When the test is run with only it produces:
// Error: Error: Failed to authenticate for PostgresSQL. Please double check your settings.
// When its run with all the other tests it produces:
// Error: invalid port number: "99999"
// When the test is run with only it produces:
// Error: Error: Failed to authenticate for PostgresSQL. Please double check your settings.
// When its run with all the other tests it produces:
// Error: invalid port number: "99999"
expect(err.message).to.match(/invalid port number/)
} else {
expect(err.message).to.match(/Failed to authenticate/)
......@@ -743,7 +743,7 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
it("doesn't save an instance if value is not in the range of enums", function(done) {
this.Review.create({status: 'fnord'}).error(function(err) {
expect(err).to.be.instanceOf(Error);
expect(err.status[0].message).to.equal('Value "fnord" for ENUM status is out of allowed scope. Allowed values: scheduled, active, finished')
expect(err.status[0].message).to.equal('Value "fnord" for ENUM status is out of allowed scope. Allowed values: scheduled, active, finished')
done()
})
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!