Class: JDBC::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/jdbc/column.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index:, label:, jdbc_type:) ⇒ Column

Returns a new instance of Column.



5
6
7
8
9
# File 'lib/jdbc/column.rb', line 5

def initialize(index:, label:, jdbc_type:)
  @index = index
  @label = label
  @jdbc_type = jdbc_type
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



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

def index
  @index
end

#jdbc_typeObject (readonly)

Returns the value of attribute jdbc_type.



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

def jdbc_type
  @jdbc_type
end

#labelObject (readonly)

Returns the value of attribute label.



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

def label
  @label
end

Instance Method Details

#coerce_procObject



11
12
13
# File 'lib/jdbc/column.rb', line 11

def coerce_proc
  Coercions.public_send(COERCIONS_MAP.fetch(jdbc_type, :identity))
end