Module: JDBC::Coercions

Defined in:
lib/jdbc/coercions.rb

Class Method Summary collapse

Class Method Details

.identityObject



3
4
5
# File 'lib/jdbc/coercions.rb', line 3

def identity
  @identity ||= ->(value) { value }
end

.to_sObject



8
9
10
# File 'lib/jdbc/coercions.rb', line 8

def to_s
  @to_s ||= ->(value) { value.to_s }
end

.to_timeObject



13
14
15
# File 'lib/jdbc/coercions.rb', line 13

def to_time
  @to_time ||= ->(value) { Time.parse(value.to_s) }
end