Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Vector
- Inherits:
-
Type::Value
- Object
- Type::Value
- ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Vector
- Defined in:
- lib/active_record/connection_adapters/postgresql/oid/vector.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#delim ⇒ Object
readonly
Returns the value of attribute delim.
-
#subtype ⇒ Object
readonly
Returns the value of attribute subtype.
Attributes inherited from Type::Value
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::Value
#==, #binary?, #changed?, #changed_in_place?, #klass, #number?, #text?, #type, #type_cast_for_database, #type_cast_for_schema, #type_cast_from_database, #type_cast_from_user
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.
11 12 13 14 |
# File 'lib/active_record/connection_adapters/postgresql/oid/vector.rb', line 11 def initialize(delim, subtype) @delim = delim @subtype = subtype end |
Instance Attribute Details
#delim ⇒ Object (readonly)
Returns the value of attribute delim.
6 7 8 |
# File 'lib/active_record/connection_adapters/postgresql/oid/vector.rb', line 6 def delim @delim end |
#subtype ⇒ Object (readonly)
Returns the value of attribute subtype.
6 7 8 |
# File 'lib/active_record/connection_adapters/postgresql/oid/vector.rb', line 6 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.
19 20 21 |
# File 'lib/active_record/connection_adapters/postgresql/oid/vector.rb', line 19 def type_cast(value) value end |