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

Commit c7d8063d by sdepold

removed limit clause in delete query for sqlite

1 parent 118460f9
Showing with 13 additions and 0 deletions
...@@ -29,6 +29,19 @@ module.exports = (function() { ...@@ -29,6 +29,19 @@ module.exports = (function() {
return "SELECT name FROM sqlite_master WHERE type='table';" return "SELECT name FROM sqlite_master WHERE type='table';"
}, },
deleteQuery: function(tableName, where, options) {
options = options || {}
var query = "DELETE FROM <%= table %> WHERE <%= where %>"
var replacements = {
table: Utils.addTicks(tableName),
where: this.getWhereConditions(where),
limit: Utils.escape(options.limit)
}
return Utils._.template(query)(replacements)
},
attributesToSQL: function(attributes) { attributesToSQL: function(attributes) {
var result = {} var result = {}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!