Sha256: 0f20d53efdd7820c633573d177d22da7f0e8b584c3472cac66159e8c83ad9833
Contents?: true
Size: 424 Bytes
Versions: 2
Compression:
Stored size: 424 Bytes
Contents
module JDBC class Column attr_reader :index, :label, :jdbc_type def initialize(index:, label:, jdbc_type:) @index = index @label = label @jdbc_type = jdbc_type end def coerce_proc Coercions.public_send(COERCIONS_MAP.fetch(jdbc_type, :identity)) end COERCIONS_MAP = { uuid: :to_s, timestamp: :to_time }.freeze private_constant :COERCIONS_MAP end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jdbc-0.1.1-java | lib/jdbc/column.rb |
jdbc-0.1.0-jruby | lib/jdbc/column.rb |