Class: SQL::Postgresql::Column

Inherits:
Column
  • Object
show all
Defined in:
lib/sql/postgresql.rb

Instance Attribute Summary

Attributes inherited from Column

#default_value, #name, #not_null, #primary_key, #type, #unique

Instance Method Summary collapse

Constructor Details

#initialize(col_struct) ⇒ Column

Returns a new instance of Column.



69
70
71
72
73
# File 'lib/sql/postgresql.rb', line 69

def initialize(col_struct)
  @name, @type, @default_value = col_struct.column_name, col_struct.data_type, col_struct.column_default

  @not_null = col_struct.is_nullable != "YES"
end