Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Vector

Inherits:
Type
  • Object
show all
Defined in:
lib/arjdbc/postgresql/base/oid.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#infinity, #simplified_type, #type

Constructor Details

#initialize(delim, subtype) ⇒ Vector

+delim+ corresponds to the typdelim column in the pg_types table. +subtype+ is derived from the typelem column in the pg_types table.



111
112
113
114
# File 'lib/arjdbc/postgresql/base/oid.rb', line 111

def initialize(delim, subtype)
  @delim   = delim
  @subtype = subtype
end

Instance Attribute Details

#delimObject (readonly)

Returns the value of attribute delim.



106
107
108
# File 'lib/arjdbc/postgresql/base/oid.rb', line 106

def delim
  @delim
end

#subtypeObject (readonly)

Returns the value of attribute subtype.



106
107
108
# File 'lib/arjdbc/postgresql/base/oid.rb', line 106

def subtype
  @subtype
end

Instance Method Details

#type_cast(value) ⇒ Object

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.



119
120
121
# File 'lib/arjdbc/postgresql/base/oid.rb', line 119

def type_cast(value)
  value
end