Class: ActiveRecord::ConnectionAdapters::CipherStashPG::OID::Vector
- Inherits:
-
Type::Value
- Object
- Type::Value
- ActiveRecord::ConnectionAdapters::CipherStashPG::OID::Vector
- Defined in:
- lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/vector.rb,
lib/active_record/connection_adapters/7.0/cipherstash_pg/oid/vector.rb,
lib/active_record/connection_adapters/7.1/cipherstash_pg/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.
Instance Method Summary collapse
-
#cast(value) ⇒ Object
FIXME: this should probably split on
delim
and usesubtype
to cast the values. -
#initialize(delim, subtype) ⇒ Vector
constructor
delim
corresponds to the ‘typdelim` column in the pg_types table.
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.
13 14 15 16 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/vector.rb', line 13 def initialize(delim, subtype) @delim = delim @subtype = subtype end |
Instance Attribute Details
#delim ⇒ Object (readonly)
Returns the value of attribute delim.
8 9 10 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/vector.rb', line 8 def delim @delim end |
#subtype ⇒ Object (readonly)
Returns the value of attribute subtype.
8 9 10 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/vector.rb', line 8 def subtype @subtype end |
Instance Method Details
#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.
21 22 23 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/vector.rb', line 21 def cast(value) value end |