Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan committed Jul 17, 2024
1 parent f0d38ad commit 22c5ef8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,15 @@ def query_requires_identity_insert?(sql)
id_column = identity_columns(raw_table_name).first

id_column && sql =~ /^\s*(INSERT|EXEC sp_executesql N'INSERT)[^(]+\([^)]*\b(#{id_column.name})\b,?[^)]*\)/i ? SQLServer::Utils.extract_identifiers(raw_table_name).quoted : false

rescue StandardError => e

puts "*" * 100
puts "sql: #{sql}"
puts "raw_table_name: #{raw_table_name}"
puts "*" * 100

raise e
end

def insert_sql?(sql)
Expand Down

0 comments on commit 22c5ef8

Please sign in to comment.