Permalink
Browse files

Remove `id_value` argument which is no longer passed to `sql_for_insert`

Since #26002, `id_value` is no longer passed to `sql_for_insert`.
  • Loading branch information...
kamipo committed Jan 11, 2019
1 parent fa7c717 commit 5f9e0f848e83688a7f7b5c0b2285144563d84f36
@@ -123,7 +123,7 @@ def exec_query(sql, name = "SQL", binds = [], prepare: false)
# +binds+ as the bind substitutes. +name+ is logged along with
# the executed +sql+ statement.
def exec_insert(sql, name = nil, binds = [], pk = nil, sequence_name = nil)
sql, binds = sql_for_insert(sql, pk, nil, sequence_name, binds)
sql, binds = sql_for_insert(sql, pk, sequence_name, binds)
exec_query(sql, name, binds)
end

@@ -464,7 +464,7 @@ def select_prepared(sql, name = nil, binds = [])
exec_query(sql, name, binds, prepare: true)
end

def sql_for_insert(sql, pk, id_value, sequence_name, binds)
def sql_for_insert(sql, pk, sequence_name, binds)
[sql, binds]
end

@@ -110,7 +110,7 @@ def exec_delete(sql, name = nil, binds = [])
end
alias :exec_update :exec_delete

def sql_for_insert(sql, pk, id_value, sequence_name, binds) # :nodoc:
def sql_for_insert(sql, pk, sequence_name, binds) # :nodoc:
if pk.nil?
# Extract the table from the insert sql. Yuck.
table_ref = extract_table_ref_from_insert_sql(sql)

0 comments on commit 5f9e0f8

Please sign in to comment.