Class: Neighbor::Type::SqliteInt8Vector
- Inherits:
-
ActiveRecord::Type::Binary
- Object
- ActiveRecord::Type::Binary
- Neighbor::Type::SqliteInt8Vector
- Defined in:
- lib/neighbor/type/sqlite_int8_vector.rb
Instance Method Summary collapse
Instance Method Details
#deserialize(value) ⇒ Object
11 12 13 14 |
# File 'lib/neighbor/type/sqlite_int8_vector.rb', line 11 def deserialize(value) value = super cast_value(value) unless value.nil? end |
#serialize(value) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/neighbor/type/sqlite_int8_vector.rb', line 4 def serialize(value) if Utils.array?(value) value = value.to_a.pack("c*") end super(value) end |