Sha256: bf2e9b05f911c787ccb01c6434562f154ff8b353e7229d3a73ffa7c8f3a51cc0

Contents?: true

Size: 663 Bytes

Versions: 11

Compression:

Stored size: 663 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module ConnectionAdapters
    module SQLServer
      module Type
        class Data
          attr_reader :value, :type

          def initialize(value, type)
            @value, @type = value, type
          end

          def quoted
            type.quoted(@value)
          end

          def to_s
            @value
          end
          alias_method :to_str, :to_s

          def inspect
            @value.inspect
          end

          def eql?(other)
            self.class == other.class && self.value == other.value
          end
          alias :== :eql?
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
activerecord-sqlserver-adapter-6.0.3 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.1.3.0 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.1.2.1 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.1.2.0 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.1.1.0 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.1.0.0 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.1.0.0.rc1 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.0.2 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.0.1 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.0.0 lib/active_record/connection_adapters/sqlserver/type/data.rb
activerecord-sqlserver-adapter-6.0.0.rc2 lib/active_record/connection_adapters/sqlserver/type/data.rb