Class: Db2Query::Type::Binary

Inherits:
Object
  • Object
show all
Defined in:
lib/db2_query/type/binary.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(value) ⇒ Object



14
15
16
# File 'lib/db2_query/type/binary.rb', line 14

def deserialize(value)
  [value].pack("H*")
end

#serialize(value) ⇒ Object



10
11
12
# File 'lib/db2_query/type/binary.rb', line 10

def serialize(value)
  value.unpack1("H*")
end

#typeObject



6
7
8
# File 'lib/db2_query/type/binary.rb', line 6

def type
  :binary
end