lib/veritas/sql/generator/identifier.rb in veritas-sql-generator-0.0.3 vs lib/veritas/sql/generator/identifier.rb in veritas-sql-generator-0.0.4
- old
+ new
@@ -16,10 +16,11 @@
#
# @return [#to_s]
#
# @api private
def visit_identifier(identifier)
- "#{QUOTE}#{identifier.to_s.gsub(QUOTE, ESCAPED_QUOTE)}#{QUOTE}"
+ escaped = identifier.to_s.gsub(QUOTE, ESCAPED_QUOTE)
+ escaped.insert(0, QUOTE) << QUOTE
end
end # module Identifier
end # module Generator
end # module SQL