Sha256: 6998bcfe513062967fbaa4c571796f42d20b75115e7fc4f0ab123a04f08e0b53

Contents?: true

Size: 979 Bytes

Versions: 20

Compression:

Stored size: 979 Bytes

Contents

module ActiveRecord
  module ConnectionAdapters
    module OracleEnhanced
      module OCIQuoting
        def _type_cast(value)
          case value
          when ActiveModel::Type::Binary::Data
            lob_value = value == '' ? ' ' : value
            bind_type = OCI8::BLOB
            ora_value = bind_type.new(@connection.raw_oci_connection, lob_value)
            ora_value.size = 0 if value == ''
            ora_value
          when ActiveRecord::OracleEnhanced::Type::Text::Data
            lob_value = value.to_s == '' ? ' ' : value.to_s
            bind_type = OCI8::CLOB
            ora_value = bind_type.new(@connection.raw_oci_connection, lob_value)
            ora_value.size = 0 if value.to_s == ''
            ora_value
          else
            super
          end
        end
      end
    end
  end
end

module ActiveRecord
  module ConnectionAdapters
    module OracleEnhanced
      module Quoting
        prepend OCIQuoting
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
activerecord-oracle_enhanced-adapter-1.7.11 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.10 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.9 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.8 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.7 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.6 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.5 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.4 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.3 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.2 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.1 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.0 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.0.rc1 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.0.beta7 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.0.beta6 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.0.beta5 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.0.beta4 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.0.beta3 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.0.beta2 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb
activerecord-oracle_enhanced-adapter-1.7.0.beta1 lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb