Skip to content

Commit

Permalink
Support mysql2 in SQL queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
oggy committed May 1, 2011
1 parent 6dcd889 commit f74d056
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
10 changes: 8 additions & 2 deletions lib/rack/bug/views/panels/execute_sql.html.erb
Expand Up @@ -13,8 +13,14 @@
<table class="sortable">
<thead>
<tr>
<% result.fetch_fields.each do |field| %>
<th><%= field.name.upcase %></th>
<% if defined?(Mysql2) %>
<% result.fields.each do |field| %>
<th><%= field.upcase %></th>
<% end %>
<% else %>
<% result.fetch_fields.each do |field| %>
<th><%= field.name.upcase %></th>
<% end %>
<% end %>
</tr>
</thead>
Expand Down
12 changes: 9 additions & 3 deletions lib/rack/bug/views/panels/explain_sql.html.erb
Expand Up @@ -13,10 +13,16 @@
<table class="sortable">
<thead>
<tr>
<% result.fetch_fields.each do |field| %>
<th><%= field.name.upcase %></th>
<% if defined?(Mysql2) %>
<% result.fields.each do |field| %>
<th><%= field.upcase %></th>
<% end %>
<% else %>
<% result.fetch_fields.each do |field| %>
<th><%= field.name.upcase %></th>
<% end %>
<% end %>
</tr>
</tr>
</thead>
<tbody>
<% i = 1 %>
Expand Down
10 changes: 8 additions & 2 deletions lib/rack/bug/views/panels/profile_sql.html.erb
Expand Up @@ -13,8 +13,14 @@
<table class="sortable">
<thead>
<tr>
<% result.fetch_fields.each do |field| %>
<th><%= field.name.upcase %></th>
<% if defined?(Mysql2) %>
<% result.fields.each do |field| %>
<th><%= field.upcase %></th>
<% end %>
<% else %>
<% result.fetch_fields.each do |field| %>
<th><%= field.name.upcase %></th>
<% end %>
<% end %>
</tr>
</thead>
Expand Down

0 comments on commit f74d056

Please sign in to comment.