Sha256: c9dd01edea4efe49afb34170072c8a3870579ccdcf1b164a81f5f340e46b0246

Contents?: true

Size: 551 Bytes

Versions: 187

Compression:

Stored size: 551 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module ConnectionAdapters
    module PostgreSQL
      module OID # :nodoc:
        class Xml < Type::String # :nodoc:
          def type
            :xml
          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
end

Version data entries

187 entries across 182 versions & 15 rubygems

Version Path
activerecord-6.0.5.1 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-5.2.8.1 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-5.2.8 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-6.0.5 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-6.1.6 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-7.0.3 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-7.0.2.4 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-6.1.5.1 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-6.0.4.8 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-5.2.7.1 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-5.2.7 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-6.1.5 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-7.0.2.3 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-6.1.4.7 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-6.0.4.7 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-5.2.6.3 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-7.0.2.2 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-6.1.4.6 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-6.0.4.6 lib/active_record/connection_adapters/postgresql/oid/xml.rb
activerecord-5.2.6.2 lib/active_record/connection_adapters/postgresql/oid/xml.rb