提交 5454cc40 编写于 作者: R Ryuta Kamizono

Avoid new string instance creation in `InsertAll#execute`

上级 70d64169
......@@ -21,9 +21,9 @@ def initialize(model, inserts, on_duplicate:, returning: nil, unique_by: nil)
end
def execute
message = "#{model} "
message += "Bulk " if inserts.many?
message += (on_duplicate == :update ? "Upsert" : "Insert")
message = +"#{model} "
message << "Bulk " if inserts.many?
message << (on_duplicate == :update ? "Upsert" : "Insert")
connection.exec_query to_sql, message
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册