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

Commit ad0e3af6 by Michael Schonfeld

change param name to ignoreDuplicates

1 parent 4d17304a
......@@ -779,7 +779,7 @@ module.exports = (function() {
options = Utils._.extend({
validate: false,
hooks: false,
ignore: false
ignoreDuplicates: false
}, options || {})
if (fieldsOrOptions instanceof Array) {
......
......@@ -177,7 +177,7 @@ module.exports = (function() {
},
bulkInsertQuery: function(tableName, attrValueHashes, options) {
var query = "INSERT<%= ignore %> INTO <%= table %> (<%= attributes %>) VALUES <%= tuples %>;"
var query = "INSERT<%= ignoreDuplicates %> INTO <%= table %> (<%= attributes %>) VALUES <%= tuples %>;"
, tuples = []
, allAttributes = []
......@@ -196,7 +196,7 @@ module.exports = (function() {
}.bind(this))
var replacements = {
ignore: options && options.ignore ? ' IGNORE' : '',
ignoreDuplicates: options && options.ignoreDuplicates ? ' IGNORE' : '',
table: this.quoteIdentifier(tableName),
attributes: allAttributes.map(function(attr){
return this.quoteIdentifier(attr)
......
......@@ -173,7 +173,7 @@ module.exports = (function() {
},
bulkInsertQuery: function(tableName, attrValueHashes, options) {
var query = "INSERT<%= ignore %> INTO <%= table %> (<%= attributes %>) VALUES <%= tuples %>;"
var query = "INSERT<%= ignoreDuplicates %> INTO <%= table %> (<%= attributes %>) VALUES <%= tuples %>;"
, tuples = []
, allAttributes = []
......@@ -192,7 +192,7 @@ module.exports = (function() {
}.bind(this))
var replacements = {
ignore: options && options.ignore ? ' OR IGNORE' : '',
ignoreDuplicates: options && options.ignoreDuplicates ? ' OR IGNORE' : '',
table: this.quoteIdentifier(tableName),
attributes: allAttributes.map(function(attr){
return this.quoteIdentifier(attr)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!