Module: ActiveRecord::ConnectionAdapters::SQLite3::Quoting
- Included in:
- ActiveRecord::ConnectionAdapters::SQLite3Adapter
- Defined in:
- lib/active_record/connection_adapters/sqlite3/quoting.rb
Overview
:nodoc:
Instance Method Summary collapse
- #quote_column_name(name) ⇒ Object
- #quote_string(s) ⇒ Object
- #quote_table_name_for_assignment(table, attr) ⇒ Object
- #quoted_binary(value) ⇒ Object
- #quoted_time(value) ⇒ Object
Instance Method Details
#quote_column_name(name) ⇒ Object
13 14 15 |
# File 'lib/active_record/connection_adapters/sqlite3/quoting.rb', line 13 def quote_column_name(name) @quoted_column_names[name] ||= %Q("#{super.gsub('"', '""')}").freeze end |
#quote_string(s) ⇒ Object
5 6 7 |
# File 'lib/active_record/connection_adapters/sqlite3/quoting.rb', line 5 def quote_string(s) @connection.class.quote(s) end |
#quote_table_name_for_assignment(table, attr) ⇒ Object
9 10 11 |
# File 'lib/active_record/connection_adapters/sqlite3/quoting.rb', line 9 def quote_table_name_for_assignment(table, attr) quote_column_name(attr) end |
#quoted_binary(value) ⇒ Object
21 22 23 |
# File 'lib/active_record/connection_adapters/sqlite3/quoting.rb', line 21 def quoted_binary(value) "x'#{value.hex}'" end |
#quoted_time(value) ⇒ Object
17 18 19 |
# File 'lib/active_record/connection_adapters/sqlite3/quoting.rb', line 17 def quoted_time(value) quoted_date(value) end |