Class: SQL::Sqlite3::Table

Inherits:
Table show all
Defined in:
lib/gems/dm-migrations-0.9.9/lib/sql/sqlite3.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.



25
26
27
28
29
30
# File 'lib/gems/dm-migrations-0.9.9/lib/sql/sqlite3.rb', line 25

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