Module: ActiveRecord::ConnectionAdapters::SQLite3::Quoting
    Do not use.  This module is for internal use only.
  
| Relationships & Source Files | |
| Namespace Children | |
| 
       Modules: 
      
     | |
| Extension / Inclusion / Inheritance Descendants | |
| 
       Included In: 
      
     | |
| Super Chains via Extension / Inclusion / Inheritance | |
| 
         Class Chain: 
        
          self,
           
      ::ActiveSupport::Concern
         | 
    |
| Defined in: | activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb | 
Constant Summary
- 
    QUOTED_COLUMN_NAMES =
    
# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 9Concurrent::Map.new
 - 
    QUOTED_TABLE_NAMES =
    
# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 10Concurrent::Map.new
 
Class Method Summary
::ActiveSupport::Concern - Extended
| class_methods | Define class methods from given block.  | 
    
| included | Evaluate given block in context of base class, so that you can write class macros here.  | 
    
| prepended | Evaluate given block in context of base class, so that you can write class macros here.  | 
    
| append_features, prepend_features | |
Instance Method Summary
Instance Method Details
#quote(value)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 53
def quote(value) # :nodoc: case value when Numeric if value.finite? super else "'#{value}'" end else super end end
#quote_default_expression(value, column)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 91
def quote_default_expression(value, column) # :nodoc: if value.is_a?(Proc) value = value.call if value.match?(/\A\w+\(.*\)\z/) "(#{value})" else value end else super end end
#quote_string(s)
[ GitHub ]#quote_table_name_for_assignment(table, attr)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 70
def quote_table_name_for_assignment(table, attr) quote_column_name(attr) end
#quoted_binary(value)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 79
def quoted_binary(value) "x'#{value.hex}'" end
#quoted_time(value)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 74
def quoted_time(value) value = value.change(year: 2000, month: 1, day: 1) quoted_date(value).sub(/\A\d\d\d\d-\d\d-\d\d /, "2000-01-01 ") end
#type_cast(value)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 104
def type_cast(value) # :nodoc: case value when BigDecimal, Rational value.to_f when String if value.encoding == Encoding::ASCII_8BIT super(value.encode(Encoding::UTF_8)) else super end else super end end
#unquoted_false
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 87
def unquoted_false 0 end
#unquoted_true
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb', line 83
def unquoted_true 1 end