Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ def write_query?(sql) # :nodoc:
end

def perform_query(raw_connection, sql, binds, type_casted_binds, prepare:, notification_payload:, batch:)
unless binds.nil? || binds.empty?
types, params = sp_executesql_types_and_parameters(binds)
sql = sp_executesql_sql(sql, types, params, notification_payload[:name])
end

id_insert_table_name = query_requires_identity_insert?(sql)

result, affected_rows = if id_insert_table_name
Expand Down Expand Up @@ -48,15 +53,6 @@ def affected_rows_from_results_or_handle(raw_result, handle)
affected_rows(raw_result) || handle.affected_rows
end

def raw_execute(sql, name = nil, binds = [], prepare: false, async: false, allow_retry: false, materialize_transactions: true, batch: false)
unless binds.nil? || binds.empty?
types, params = sp_executesql_types_and_parameters(binds)
sql = sp_executesql_sql(sql, types, params, name)
end

super
end

def internal_exec_sql_query(sql, conn)
handle = internal_raw_execute(sql, conn)
results = handle_to_names_and_values(handle, ar_result: true)
Expand Down
Loading