Class: Tramp::Column

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, default, sql_type, null) ⇒ Column

Returns a new instance of Column.



28
29
30
31
# File 'lib/tramp/column.rb', line 28

def initialize(name, default, sql_type, null)
  super
  @type = simplified_type(sql_type)
end

Instance Attribute Details

#defaultObject

Returns the value of attribute default

Returns:

  • (Object)

    the current value of default



25
26
27
# File 'lib/tramp/column.rb', line 25

def default
  @default
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



25
26
27
# File 'lib/tramp/column.rb', line 25

def name
  @name
end

#nullObject

Returns the value of attribute null

Returns:

  • (Object)

    the current value of null



25
26
27
# File 'lib/tramp/column.rb', line 25

def null
  @null
end

#sql_typeObject

Returns the value of attribute sql_type

Returns:

  • (Object)

    the current value of sql_type



25
26
27
# File 'lib/tramp/column.rb', line 25

def sql_type
  @sql_type
end

#typeObject (readonly)

Returns the value of attribute type.



26
27
28
# File 'lib/tramp/column.rb', line 26

def type
  @type
end