Method: Sequel::Amalgalite::SequelTypeMap#result_value_of

Defined in:
lib/sequel/adapters/amalgalite.rb

#result_value_of(declared_type, value) ⇒ Object

Don’t raise an error if the value is a string and the declared type doesn’t match a known type, just return the value.



47
48
49
50
51
52
53
54
55
# File 'lib/sequel/adapters/amalgalite.rb', line 47

def result_value_of(declared_type, value)
  if value.is_a?(::Amalgalite::Blob)
    SQL::Blob.new(value.to_s)
  elsif value.is_a?(String) && declared_type
    (meth = self.class.sql_to_method(declared_type.downcase)) ? public_send(meth, value) : value
  else
    super
  end
end