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

Commit d14c24b0 by Jan Aagaard Meier

Removed ununsed bulkDeleteQuery function from query generator

1 parent 4b79b2b6
...@@ -6,6 +6,7 @@ Notice: All 1.7.x changes are present in 2.0.x aswell ...@@ -6,6 +6,7 @@ Notice: All 1.7.x changes are present in 2.0.x aswell
- [FEATURE] It's now possible to add multiple relations to a hasMany association, modelInstance.addRelations([otherInstanceA, otherInstanceB]) - [FEATURE] It's now possible to add multiple relations to a hasMany association, modelInstance.addRelations([otherInstanceA, otherInstanceB])
- [FEATURE] `define()` stores models in `sequelize.models` Object e.g. `sequelize.models.MyModel` - [FEATURE] `define()` stores models in `sequelize.models` Object e.g. `sequelize.models.MyModel`
- [BUG] An error is now thrown if an association would create a naming conflict between the association and the foreign key when doing eager loading. Closes [#1272](https://github.com/sequelize/sequelize/issues/1272) - [BUG] An error is now thrown if an association would create a naming conflict between the association and the foreign key when doing eager loading. Closes [#1272](https://github.com/sequelize/sequelize/issues/1272)
- [INTERNALS] `bulkDeleteQuery` was removed from the MySQL / abstract query generator, since it was never used internally. Please use `deleteQuery` instead.
#### Breaking changes #### Breaking changes
- Sequelize now returns promises instead of its custom event emitter from most calls. This affects methods that return multiple values (like `findOrCreate` or `findOrInitialize`). If your current callbacks do not accept the 2nd success parameter you might be seeing an array as the first param. Either use `.spread()` for these methods or add another argument to your callback: `.success(instance)` -> `.success(instance, created)`. - Sequelize now returns promises instead of its custom event emitter from most calls. This affects methods that return multiple values (like `findOrCreate` or `findOrInitialize`). If your current callbacks do not accept the 2nd success parameter you might be seeing an array as the first param. Either use `.spread()` for these methods or add another argument to your callback: `.success(instance)` -> `.success(instance, created)`.
......
...@@ -262,19 +262,6 @@ module.exports = (function() { ...@@ -262,19 +262,6 @@ module.exports = (function() {
}, },
/* /*
Returns a bulk deletion query.
Parameters:
- tableName -> Name of the table
- where -> A hash with conditions (e.g. {name: 'foo'})
OR an ID as integer
OR a string with conditions (e.g. 'name="foo"').
If you use a string, you have to escape it on your own.
*/
bulkDeleteQuery: function(tableName, where, options) {
throwMethodUndefined('bulkDeleteQuery')
},
/*
Returns an update query. Returns an update query.
Parameters: Parameters:
- tableName -> Name of the table - tableName -> Name of the table
......
...@@ -210,17 +210,6 @@ module.exports = (function() { ...@@ -210,17 +210,6 @@ module.exports = (function() {
return "DELETE FROM " + table + " WHERE " + where + limit return "DELETE FROM " + table + " WHERE " + where + limit
}, },
bulkDeleteQuery: function(tableName, where, options) {
options = options || {}
var table = this.quoteTable(tableName)
where = this.getWhereConditions(where)
var query = "DELETE FROM " + table + " WHERE " + where
return query
},
addIndexQuery: function(tableName, attributes, options) { addIndexQuery: function(tableName, attributes, options) {
var transformedAttributes = attributes.map(function(attribute) { var transformedAttributes = attributes.map(function(attribute) {
if(typeof attribute === 'string') { if(typeof attribute === 'string') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!