Sha256: 3a2ab09b516e34848ce141cc3d2bc89e72ecaf5d62551f7e2febc8af8ad39666

Contents?: true

Size: 462 Bytes

Versions: 35

Compression:

Stored size: 462 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module Type
    module OracleEnhanced
      class TimestampLtz < ActiveRecord::Type::DateTime
        def type
          :timestampltz
        end

        class Data < DelegateClass(::Time) # :nodoc:
        end

        def serialize(value)
          case value = super
          when ::Time
            Data.new(value)
          else
            value
          end
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
activerecord-oracle_enhanced-adapter-6.0.2 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.0.0 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.0.0.rc3 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.0.0.rc2 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.6 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.0.0.rc1 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.0.0.beta1 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.5 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.4 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.3 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.2 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.1 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.0 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.0.rc1 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.0.beta1 lib/active_record/type/oracle_enhanced/timestampltz.rb