Module: Listable::ConnectionAdapters::MySQLExtensions

Includes:
ConcatenationMethods::Function
Defined in:
lib/listable/connection_adapters.rb

Instance Method Summary collapse

Methods included from ConcatenationMethods::Function

#concat

Instance Method Details

#viewsObject



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/listable/connection_adapters.rb', line 65

def views()
  query = <<-SQL
    SHOW FULL TABLES 
    IN #{quote_table_name(current_database)} 
    WHERE TABLE_TYPE LIKE 'VIEW'
  SQL

  execute_and_free(query, 'SCHEMA') do |result|
    result.collect { |field| field.first }
  end
end