Sha256: 047d9d516dce149626f252374ba4d059fe06da6c7ff21d581084d5a61d46ad7d

Contents?: true

Size: 578 Bytes

Versions: 8

Compression:

Stored size: 578 Bytes

Contents

module ActiveRecord
  module ConnectionAdapters
    module SQLServer
      module Type
        class Quoter

          attr_reader :value, :type

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

          def to_s
            @value.to_s
          end
          alias_method :to_str, :to_s

          def ==(other)
            other == to_s || super
          end
          alias_method :eql?, :==

          def quote_ss_value
            type.quote_ss(value)
          end

        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
activerecord-sqlserver-adapter-4.2.6 lib/active_record/connection_adapters/sqlserver/type/quoter.rb
activerecord-sqlserver-adapter-4.2.5 lib/active_record/connection_adapters/sqlserver/type/quoter.rb
activerecord-sqlserver-adapter-4.2.4 lib/active_record/connection_adapters/sqlserver/type/quoter.rb
activerecord-sqlserver-adapter-4.2.3 lib/active_record/connection_adapters/sqlserver/type/quoter.rb
activerecord-sqlserver-adapter-4.2.2 lib/active_record/connection_adapters/sqlserver/type/quoter.rb
activerecord-sqlserver-adapter-4.2.1 lib/active_record/connection_adapters/sqlserver/type/quoter.rb
activerecord-sqlserver-adapter-4.2.0 lib/active_record/connection_adapters/sqlserver/type/quoter.rb
activerecord-sqlserver-adapter-4.2.0.pre lib/active_record/connection_adapters/sqlserver/type/quoter.rb