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

Commit ad0e3af6 by Michael Schonfeld

change param name to ignoreDuplicates

1 parent 4d17304a
...@@ -779,7 +779,7 @@ module.exports = (function() { ...@@ -779,7 +779,7 @@ module.exports = (function() {
options = Utils._.extend({ options = Utils._.extend({
validate: false, validate: false,
hooks: false, hooks: false,
ignore: false ignoreDuplicates: false
}, options || {}) }, options || {})
if (fieldsOrOptions instanceof Array) { if (fieldsOrOptions instanceof Array) {
......
...@@ -177,7 +177,7 @@ module.exports = (function() { ...@@ -177,7 +177,7 @@ module.exports = (function() {
}, },
bulkInsertQuery: function(tableName, attrValueHashes, options) { bulkInsertQuery: function(tableName, attrValueHashes, options) {
var query = "INSERT<%= ignore %> INTO <%= table %> (<%= attributes %>) VALUES <%= tuples %>;" var query = "INSERT<%= ignoreDuplicates %> INTO <%= table %> (<%= attributes %>) VALUES <%= tuples %>;"
, tuples = [] , tuples = []
, allAttributes = [] , allAttributes = []
...@@ -196,7 +196,7 @@ module.exports = (function() { ...@@ -196,7 +196,7 @@ module.exports = (function() {
}.bind(this)) }.bind(this))
var replacements = { var replacements = {
ignore: options && options.ignore ? ' IGNORE' : '', ignoreDuplicates: options && options.ignoreDuplicates ? ' IGNORE' : '',
table: this.quoteIdentifier(tableName), table: this.quoteIdentifier(tableName),
attributes: allAttributes.map(function(attr){ attributes: allAttributes.map(function(attr){
return this.quoteIdentifier(attr) return this.quoteIdentifier(attr)
......
...@@ -173,7 +173,7 @@ module.exports = (function() { ...@@ -173,7 +173,7 @@ module.exports = (function() {
}, },
bulkInsertQuery: function(tableName, attrValueHashes, options) { bulkInsertQuery: function(tableName, attrValueHashes, options) {
var query = "INSERT<%= ignore %> INTO <%= table %> (<%= attributes %>) VALUES <%= tuples %>;" var query = "INSERT<%= ignoreDuplicates %> INTO <%= table %> (<%= attributes %>) VALUES <%= tuples %>;"
, tuples = [] , tuples = []
, allAttributes = [] , allAttributes = []
...@@ -192,7 +192,7 @@ module.exports = (function() { ...@@ -192,7 +192,7 @@ module.exports = (function() {
}.bind(this)) }.bind(this))
var replacements = { var replacements = {
ignore: options && options.ignore ? ' OR IGNORE' : '', ignoreDuplicates: options && options.ignoreDuplicates ? ' OR IGNORE' : '',
table: this.quoteIdentifier(tableName), table: this.quoteIdentifier(tableName),
attributes: allAttributes.map(function(attr){ attributes: allAttributes.map(function(attr){
return this.quoteIdentifier(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!