Rename variable

This commit is contained in:
Javier Goizueta 2017-03-28 10:42:03 +02:00
parent 970d828768
commit 4b18e1f601

View File

@ -90,25 +90,25 @@ class SqlTemplateRenderer
def return_statement(&block)
if block
erbout = block.binding.eval('_erbout')
erb_out = block.binding.eval('_erbout')
if multi_row
erbout << 'RETURN QUERY SELECT * FROM '
erb_out << 'RETURN QUERY SELECT * FROM '
elsif multi_field
erbout << 'SELECT * FROM '
erb_out << 'SELECT * FROM '
elsif void_return_type?
erbout << 'PERFORM '
erb_out << 'PERFORM '
else
erbout << 'SELECT '
erb_out << 'SELECT '
end
yield
if multi_row || void_return_type?
erbout << ';'
erb_out << ';'
else
erbout << ' INTO ret;'
erb_out << ' INTO ret;'
end
if !multi_row && !void_return_type?
erbout << ' RETURN ret;'
erb_out << ' RETURN ret;'
end
else
if !multi_row && !void_return_type?