Method: Myq::Core#auto_create_table

Defined in:
lib/myq/core.rb

#auto_create_table(table, hash) ⇒ Object



82
83
84
85
86
87
88
# File 'lib/myq/core.rb', line 82

def auto_create_table(table, hash)
  res = table_info(table)
  if res.size == 0
    create_table_sql = %Q{CREATE TABLE #{table} (\n#{generate_create_table(hash)}\n)}
    query(create_table_sql)
  end
end