Class: Convergence::Column

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

Constant Summary collapse

COLUMN_TYPE =
%i(
  tinyint
  smallint
  mediumint
  int
  bigint
  float
  double
  decimal
  char
  varchar
  tinyblob
  blob
  mediumblob
  longblob
  tinytext
  text
  mediumtext
  longtext
  enum
  set
  date
  time
  datetime
  timestamp
  year
)
FLOATING_POINT_COLUMN_TYPE =
%i(
  float
  double
  decimal
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, column_name, options = {}) ⇒ Column

Returns a new instance of Column.



37
38
39
40
41
# File 'lib/convergence/column.rb', line 37

def initialize(type, column_name, options = {})
  @type = type
  @column_name = column_name
  @options = options
end

Instance Attribute Details

#column_nameObject

Returns the value of attribute column_name.



2
3
4
# File 'lib/convergence/column.rb', line 2

def column_name
  @column_name
end

#optionsObject

Returns the value of attribute options.



2
3
4
# File 'lib/convergence/column.rb', line 2

def options
  @options
end

#typeObject

Returns the value of attribute type.



2
3
4
# File 'lib/convergence/column.rb', line 2

def type
  @type
end