@@ -155,7 +155,7 @@ def exec_query(sql, name = "SQL", binds = [], prepare: false)
155
155
# `nil` is the default value and maintains default behavior. If an array of column names is passed -
156
156
# the result will contain values of the specified columns from the inserted row.
157
157
def exec_insert ( sql , name = nil , binds = [ ] , pk = nil , sequence_name = nil , returning : nil )
158
- sql , binds = sql_for_insert ( sql , pk , binds , returning )
158
+ sql = sql_for_insert ( sql , pk , returning )
159
159
internal_exec_query ( sql , name , binds )
160
160
end
161
161
@@ -707,7 +707,7 @@ def select(sql, name = nil, binds = [], prepare: false, async: false, allow_retr
707
707
end
708
708
end
709
709
710
- def sql_for_insert ( sql , pk , binds , returning ) # :nodoc:
710
+ def sql_for_insert ( sql , pk , returning ) # :nodoc:
711
711
if supports_insert_returning?
712
712
if pk . nil?
713
713
# Extract the table from the insert sql. Yuck.
@@ -721,7 +721,7 @@ def sql_for_insert(sql, pk, binds, returning) # :nodoc:
721
721
sql = "#{ sql } RETURNING #{ returning_columns_statement } " if returning_columns . any?
722
722
end
723
723
724
- [ sql , binds ]
724
+ sql
725
725
end
726
726
727
727
def last_inserted_id ( result )
0 commit comments