Module: Veritas::SQL::Generator::Identifier
Overview
Generates an SQL statement for an identifier
Constant Summary collapse
- QUOTE =
'"'.freeze
- ESCAPED_QUOTE =
'""'.freeze
Instance Method Summary collapse
-
#visit_identifier(identifier) ⇒ #to_s
private
Quote the identifier.
Instance Method Details
#visit_identifier(identifier) ⇒ #to_s
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Quote the identifier
20 21 22 23 |
# File 'lib/veritas/sql/generator/identifier.rb', line 20 def visit_identifier(identifier) escaped = identifier.to_s.gsub(QUOTE, ESCAPED_QUOTE) escaped.insert(0, QUOTE) << QUOTE end |