Class: SQL::Sqlite::Table

Inherits:
Table
  • Object
show all
Defined in:
lib/dm-migrations/sql/sqlite.rb

Instance Attribute Summary

Attributes inherited from Table

#columns, #name

Instance Method Summary collapse

Methods inherited from Table

#column, #to_s

Constructor Details

#initialize(adapter, table_name) ⇒ Table

Returns a new instance of Table.



35
36
37
38
39
40
# File 'lib/dm-migrations/sql/sqlite.rb', line 35

def initialize(adapter, table_name)
  @columns = []
  adapter.table_info(table_name).each do |col_struct|
    @columns << SQL::Sqlite::Column.new(col_struct)
  end
end