Sha256: 3f7de20a153c751cd5d21a7f77227f2430c51ea54e838c29009512edbee5a0b0

Contents?: true

Size: 725 Bytes

Versions: 34

Compression:

Stored size: 725 Bytes

Contents

# frozen_string_literal: true

require "active_model/type/string"

module ActiveRecord
  module Type
    module OracleEnhanced
      class NationalCharacterText < ActiveRecord::Type::Text # :nodoc:
        def type
          :ntext
        end

        def changed_in_place?(raw_old_value, new_value)
          # TODO: Needs to find a way not to cast here.
          raw_old_value = cast(raw_old_value)
          super
        end

        def serialize(value)
          return unless value
          Data.new(super)
        end

        class Data # :nodoc:
          def initialize(value)
            @value = value
          end

          def to_s
            @value
          end
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
activerecord-oracle_enhanced-adapter-7.1.0 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-7.1.0.beta2 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-7.1.0.beta1 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-7.0.3 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-7.0.2 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.1.6 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-7.0.1 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-7.0.0 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-7.0.0.rc1 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.1.5 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.1.4 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.1.2 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.1.1 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.0.6 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.0.5 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.1.0 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.1.0.rc1 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.0.4 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-6.0.3 lib/active_record/type/oracle_enhanced/national_character_text.rb
activerecord-oracle_enhanced-adapter-5.2.8 lib/active_record/type/oracle_enhanced/national_character_text.rb