Module: ActiveRecord::ConnectionAdapters::SQLServer::Utils
- Extended by:
- Utils
- Included in:
- Utils
- Defined in:
- lib/active_record/connection_adapters/sqlserver/utils.rb
Defined Under Namespace
Classes: Name
Instance Method Summary collapse
- #extract_identifiers(name) ⇒ Object
- #quote_string(s) ⇒ Object
- #quote_string_single(s) ⇒ Object
- #quote_string_single_national(s) ⇒ Object
- #quoted_raw(name) ⇒ Object
- #unquote_string(s) ⇒ Object
Instance Method Details
#extract_identifiers(name) ⇒ Object
150 151 152 |
# File 'lib/active_record/connection_adapters/sqlserver/utils.rb', line 150 def extract_identifiers(name) SQLServer::Utils::Name.new(name) end |
#quote_string(s) ⇒ Object
130 131 132 |
# File 'lib/active_record/connection_adapters/sqlserver/utils.rb', line 130 def quote_string(s) s.to_s.gsub(/\'/, "''") end |
#quote_string_single(s) ⇒ Object
134 135 136 |
# File 'lib/active_record/connection_adapters/sqlserver/utils.rb', line 134 def quote_string_single(s) "'#{quote_string(s)}'" end |
#quote_string_single_national(s) ⇒ Object
138 139 140 |
# File 'lib/active_record/connection_adapters/sqlserver/utils.rb', line 138 def quote_string_single_national(s) "N'#{quote_string(s)}'" end |
#quoted_raw(name) ⇒ Object
142 143 144 |
# File 'lib/active_record/connection_adapters/sqlserver/utils.rb', line 142 def quoted_raw(name) SQLServer::Utils::Name.new(name).quoted_raw end |
#unquote_string(s) ⇒ Object
146 147 148 |
# File 'lib/active_record/connection_adapters/sqlserver/utils.rb', line 146 def unquote_string(s) s.to_s.gsub(/\'\'/, "'") end |