blob: 4902a64330c3bf2b81ce90baeeef55356b250131 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
module ActiveRecord
module ConnectionAdapters
module PostgreSQL
module OID # :nodoc:
class Bytea < Type::Binary # :nodoc:
def deserialize(value)
return if value.nil?
return value.to_s if value.is_a?(Type::Binary::Data)
PG::Connection.unescape_bytea(super)
end
end
end
end
end
end
|