Class: DBI::Type::Varchar

Inherits:
Object
  • Object
show all
Defined in:
lib/dbi/types.rb

Overview

Represents a SQL char or varchar. General fallback class.

Direct Known Subclasses

Integer

Class Method Summary collapse

Class Method Details

.parse(obj) ⇒ Object



61
62
63
64
65
66
# File 'lib/dbi/types.rb', line 61

def self.parse(obj)
    return obj unless obj
    return obj.to_s if obj.respond_to? :to_s
    return obj.to_str if obj.respond_to? :to_str
    return obj
end