Class: Insertica::ColumnType
- Inherits:
-
Object
- Object
- Insertica::ColumnType
- Defined in:
- lib/insertica/column_type.rb
Constant Summary collapse
- DATETIME_TYPE =
'TIMESTAMP'- TRUECLASS_TYPE =
'BOOLEAN'- INTEGER_TYPE =
'INTEGER'- FLOAT_TYPE =
'FLOAT'- STRING_TYPE =
'VARCHAR'
Instance Attribute Summary collapse
-
#vertica_type ⇒ Object
Returns the value of attribute vertica_type.
Instance Method Summary collapse
-
#initialize(values = []) ⇒ ColumnType
constructor
A new instance of ColumnType.
- #needs_escaping? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(values = []) ⇒ ColumnType
Returns a new instance of ColumnType.
13 14 15 |
# File 'lib/insertica/column_type.rb', line 13 def initialize(values = []) @vertica_type = guess_type(values) end |
Instance Attribute Details
#vertica_type ⇒ Object
Returns the value of attribute vertica_type.
5 6 7 |
# File 'lib/insertica/column_type.rb', line 5 def vertica_type @vertica_type end |
Instance Method Details
#needs_escaping? ⇒ Boolean
21 22 23 |
# File 'lib/insertica/column_type.rb', line 21 def needs_escaping? STRING_TYPE == @vertica_type end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/insertica/column_type.rb', line 17 def to_s @vertica_type end |