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-7.1.0 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-7.1.0.beta2 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-7.1.0.beta1 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-7.0.3 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-7.0.2 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.1.6 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-7.0.1 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-7.0.0 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-7.0.0.rc1 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.1.5 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.1.4 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.1.2 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.1.1 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.0.6 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.0.5 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.1.0 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.1.0.rc1 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.0.4 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-6.0.3 lib/active_record/type/oracle_enhanced/timestampltz.rb
activerecord-oracle_enhanced-adapter-5.2.8 lib/active_record/type/oracle_enhanced/timestampltz.rb