Sha256: d2440129dd888acb6496f99ebc157fb63b86e649f97b796fc1cddbfee1de7da4

Contents?: true

Size: 763 Bytes

Versions: 55

Compression:

Stored size: 763 Bytes

Contents

module ActiveRecord
  module ConnectionAdapters
    module PostgreSQL
      module OID # :nodoc:
        class Vector < Type::Value # :nodoc:
          attr_reader :delim, :subtype

          # +delim+ corresponds to the `typdelim` column in the pg_types
          # table.  +subtype+ is derived from the `typelem` column in the
          # pg_types table.
          def initialize(delim, subtype)
            @delim   = delim
            @subtype = subtype
          end

          # FIXME: this should probably split on +delim+ and use +subtype+
          # to cast the values.  Unfortunately, the current Rails behavior
          # is to just return the string.
          def cast(value)
            value
          end
        end
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 4 rubygems

Version Path
activerecord-5.1.7 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.7.rc1 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.6.2 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.0.7.2 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.6.1 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.0.7.1 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.6 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.0.7 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.5 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.5.rc1 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.4 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.0.6 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.4.rc1 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.0.6.rc1 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.3 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.3.rc3 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.0.5 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.0.5.rc2 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.1.3.rc2 lib/active_record/connection_adapters/postgresql/oid/vector.rb
activerecord-5.0.5.rc1 lib/active_record/connection_adapters/postgresql/oid/vector.rb