Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Vector
- Inherits:
-
Type
- Object
- Type
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Vector
- Defined in:
- lib/active_record/connection_adapters/postgresql/oid.rb
Instance Attribute Summary collapse
-
#delim ⇒ Object
readonly
Returns the value of attribute delim.
-
#subtype ⇒ Object
readonly
Returns the value of attribute subtype.
Instance Method Summary collapse
-
#initialize(delim, subtype) ⇒ Vector
constructor
delim
corresponds to the ‘typdelim` column in the pg_types table. -
#type_cast(value) ⇒ Object
FIXME: this should probably split on
delim
and usesubtype
to cast the values.
Methods inherited from 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.
69 70 71 72 |
# File 'lib/active_record/connection_adapters/postgresql/oid.rb', line 69 def initialize(delim, subtype) @delim = delim @subtype = subtype end |
Instance Attribute Details
#delim ⇒ Object (readonly)
Returns the value of attribute delim.
64 65 66 |
# File 'lib/active_record/connection_adapters/postgresql/oid.rb', line 64 def delim @delim end |
#subtype ⇒ Object (readonly)
Returns the value of attribute subtype.
64 65 66 |
# File 'lib/active_record/connection_adapters/postgresql/oid.rb', line 64 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.
77 78 79 |
# File 'lib/active_record/connection_adapters/postgresql/oid.rb', line 77 def type_cast(value) value end |