Module: ActiveRecord::ConnectionAdapters::ArFirebird::Quoting
- Included in:
- ActiveRecord::ConnectionAdapters::ArFirebirdAdapter
- Defined in:
- lib/active_record/connection_adapters/ar_firebird/quoting.rb
Instance Method Summary collapse
-
#lookup_cast_type_from_column(column) ⇒ Object
:nodoc:.
- #quote_column_name(column_name) ⇒ Object
- #quoted_date(value) ⇒ Object
-
#quoted_false ⇒ Object
:nodoc:.
-
#quoted_true ⇒ Object
:nodoc:.
- #unquoted_false ⇒ Object
- #unquoted_true ⇒ Object
Instance Method Details
#lookup_cast_type_from_column(column) ⇒ Object
:nodoc:
24 25 26 27 |
# File 'lib/active_record/connection_adapters/ar_firebird/quoting.rb', line 24 def lookup_cast_type_from_column(column) # :nodoc: sql_type = (column.domain == boolean_domain[:name]) ? 'BOOLEAN' : column.sql_type type_map.lookup(sql_type) end |
#quote_column_name(column_name) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/active_record/connection_adapters/ar_firebird/quoting.rb', line 33 def quote_column_name(column_name) if column_name.is_a?(String) || column_name.is_a?(Symbol) "\"#{column_name.upcase}\"" else column_name end end |
#quoted_date(value) ⇒ Object
29 30 31 |
# File 'lib/active_record/connection_adapters/ar_firebird/quoting.rb', line 29 def quoted_date(value) super.sub(/(\.\d{6})\z/, $1.to_s.first(5)) end |
#quoted_false ⇒ Object
:nodoc:
20 21 22 |
# File 'lib/active_record/connection_adapters/ar_firebird/quoting.rb', line 20 def quoted_false # :nodoc: quote unquoted_false end |
#quoted_true ⇒ Object
:nodoc:
12 13 14 |
# File 'lib/active_record/connection_adapters/ar_firebird/quoting.rb', line 12 def quoted_true # :nodoc: quote unquoted_true end |
#unquoted_false ⇒ Object
16 17 18 |
# File 'lib/active_record/connection_adapters/ar_firebird/quoting.rb', line 16 def unquoted_false boolean_domain[:false] end |
#unquoted_true ⇒ Object
8 9 10 |
# File 'lib/active_record/connection_adapters/ar_firebird/quoting.rb', line 8 def unquoted_true boolean_domain[:true] end |