Class: ActiveRecord::ConnectionAdapters::IBM_DBColumn
- Defined in:
- lib/active_record/connection_adapters/ibm_db_adapter.rb
Direct Known Subclasses
Class Method Summary collapse
-
.binary_to_string(value) ⇒ Object
Used to convert from BLOBs to Strings.
Instance Method Summary collapse
-
#type_cast(value) ⇒ Object
Casts value (which is a String) to an appropriate instance.
Class Method Details
.binary_to_string(value) ⇒ Object
Used to convert from BLOBs to Strings
586 587 588 589 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 586 def self.binary_to_string(value) # Returns a string removing the eventual BLOB scalar function value.to_s.gsub(/"SYSIBM"."BLOB"\('(.*)'\)/i,'\1') end |
Instance Method Details
#type_cast(value) ⇒ Object
Casts value (which is a String) to an appropriate instance
578 579 580 581 582 583 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 578 def type_cast(value) # Casts the database NULL value to nil return nil if value == 'NULL' # Invokes parent's method for default casts super end |