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

Commit 86173e84 by Po-Ying Chen

Set a default options value for QueryInterface.prototype.bulkInsert

1 parent 6a13700e
Showing with 1 additions and 0 deletions
...@@ -571,6 +571,7 @@ QueryInterface.prototype.upsert = function(tableName, values, updateValues, mode ...@@ -571,6 +571,7 @@ QueryInterface.prototype.upsert = function(tableName, values, updateValues, mode
}; };
QueryInterface.prototype.bulkInsert = function(tableName, records, options, attributes) { QueryInterface.prototype.bulkInsert = function(tableName, records, options, attributes) {
options = options || {};
options.type = QueryTypes.INSERT; options.type = QueryTypes.INSERT;
var sql = this.QueryGenerator.bulkInsertQuery(tableName, records, options, attributes); var sql = this.QueryGenerator.bulkInsertQuery(tableName, records, options, attributes);
return this.sequelize.query(sql, options); return this.sequelize.query(sql, options);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!