<% if sql_query.data.count > 0 %>

Results

Total: <%= pluralize sql_query.data.count, 'record' %> Time: <%= sql_query.data.time %> seconds Explain <%= link_to raw("#{fa_icon('file-text-o')} Export to CSV"), sql_csv_path(sql: sql, format: 'csv'), method: :post %> <% if defined? Axlsx %> <%= link_to raw("#{fa_icon('file-excel-o')} Export to Excel"), sql_xls_path(sql: sql, format: 'xls'), method: :post %> <% end %>


<%= render 'explain', sql_query: sql_query, sql: sql %>
<% sql_query.data.columns.each do |column| %> <% end %> <% sql_query.data.rows.each do |row| %> <% row.each do |item| %> <% end %> <% end %> <% if sql_query.data.count > 10 %> <% sql_query.data.columns.each do |column| %> <% end %> <% end %>
<%= titleize_column(column) %>
<%= item %>
<%= titleize_column(column) %>
<% else %>

SQL command successfully executed Time: <%= sql_query.data.time %> seconds Explain

<%= render 'explain', sql_query: sql_query, sql: sql %> <% end %>