Skip to content

Commit

Permalink
Update schema_statements.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan committed Jul 17, 2024
1 parent 0a76dd3 commit edcf5e5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,8 @@ def get_raw_table_name(sql)
s = s.split(/INSERT INTO/i)[1].split(/OUTPUT INSERTED/i)[0].split(/(DEFAULT)?\s+VALUES/i)[0]

s.match(/\s*([^(]*)/i)[0]
elsif s.match?(/^\s*UPDATE\s+.*/i)
s.match(/UPDATE\s+([^\(\s]+)\s*/i)[1]
else
s.match(/FROM\s+((\[[^\(\]]+\])|[^\(\s]+)\s*/i)[1]
end.strip
Expand Down

0 comments on commit edcf5e5

Please sign in to comment.