Rename variable
This commit is contained in:
@@ -90,25 +90,25 @@ class SqlTemplateRenderer
|
|||||||
|
|
||||||
def return_statement(&block)
|
def return_statement(&block)
|
||||||
if block
|
if block
|
||||||
erbout = block.binding.eval('_erbout')
|
erb_out = block.binding.eval('_erbout')
|
||||||
|
|
||||||
if multi_row
|
if multi_row
|
||||||
erbout << 'RETURN QUERY SELECT * FROM '
|
erb_out << 'RETURN QUERY SELECT * FROM '
|
||||||
elsif multi_field
|
elsif multi_field
|
||||||
erbout << 'SELECT * FROM '
|
erb_out << 'SELECT * FROM '
|
||||||
elsif void_return_type?
|
elsif void_return_type?
|
||||||
erbout << 'PERFORM '
|
erb_out << 'PERFORM '
|
||||||
else
|
else
|
||||||
erbout << 'SELECT '
|
erb_out << 'SELECT '
|
||||||
end
|
end
|
||||||
yield
|
yield
|
||||||
if multi_row || void_return_type?
|
if multi_row || void_return_type?
|
||||||
erbout << ';'
|
erb_out << ';'
|
||||||
else
|
else
|
||||||
erbout << ' INTO ret;'
|
erb_out << ' INTO ret;'
|
||||||
end
|
end
|
||||||
if !multi_row && !void_return_type?
|
if !multi_row && !void_return_type?
|
||||||
erbout << ' RETURN ret;'
|
erb_out << ' RETURN ret;'
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if !multi_row && !void_return_type?
|
if !multi_row && !void_return_type?
|
||||||
|
|||||||
Reference in New Issue
Block a user