Skip to content
Merged
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
6 changes: 3 additions & 3 deletions lib/sequel/pgt_outbox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def depth_guard_clause(depth_limit = nil)
depth_limit = depth_limit.to_i
raise ArgumentError, ':trigger_depth_limit option must be at least 1' unless depth_limit >= 1

<<-SQL
IF pg_trigger_depth() > #{depth_limit} THEN
RETURN NEW;
<<~SQL
IF pg_trigger_depth() > #{depth_limit} THEN
RETURN NEW;
END IF;
SQL
end
Expand Down
4 changes: 2 additions & 2 deletions test/sequel/test_pgt_outbox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class Crass
def depth_sql(depth)
<<~SQL.strip
IF pg_trigger_depth() > #{depth} THEN
RETURN NEW;
END IF;
RETURN NEW;
END IF;
SQL
end

Expand Down
Loading