blob: 2475c03d62fb5ecd43790758b2046538abc21508 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{{#each_with_index sets}}
<div class="set" id="set_{{index}}">
{{#if this.RESULTS.DATA.length}}
<table class="results table table-bordered table-striped">
<tr>
{{#each this.RESULTS.COLUMNS}}
<th>{{this}}</th>
{{/each}}
</tr>
{{#each this.RESULTS.DATA}}
<tr>
{{#each this}}
<td>{{result_display this this}}</td>
{{/each}}
</tr>
{{/each}}
</table>
{{/if}}
{{#if this.SUCCEEDED}}
<div id="messages_{{index}}" class="alert alert-success database-messages">
<i class="icon-ok"></i>
Record Count: {{this.RESULTS.DATA.length}}; Execution Time: {{this.EXECUTIONTIME}}ms
{{#if this.EXECUTIONPLAN.DATA.length}}
<a href="#executionPlan" class="executionPlanLink"><i class="icon-plus"></i>View Execution Plan</a>
{{/if}}
<a href="#!{{../../schemaDef/dbType/id}}/{{../../schemaDef/short_code}}/{{../../id}}/{{index}}" class="setLink"><i class="icon-share-alt"></i> link</a>
</div>
{{#if this.EXECUTIONPLAN.DATA.length}}
<table class="executionPlan table table-bordered">
<tr>
{{#each this.EXECUTIONPLAN.COLUMNS}}
<th>{{this}}</th>
{{/each}}
</tr>
{{#each this.EXECUTIONPLAN.DATA}}
<tr>
{{#each this}}
<td><div style="position:relative">{{{this}}}</div></td>
{{/each}}
</tr>
{{/each}}
{{#if ../../../schemaDef/dbType/isSQLServer}}
<tr>
<td><a href="index.cfm/Fiddles/getSQLPlan?db_type_id={{../../../../schemaDef/dbType/id}}&short_code={{../../../../schemaDef/short_code}}&query_id={{../../../../id}}&id={{index}}">Download .sqlplan</a> | <a href="https://www.sqlsentry.com/products/plan-explorer/sql-server-query-view?ad=201208-sqlfiddle-pe" target="_new">Download SQL Sentry Plan Explorer (free)</a></td>
</tr>
{{/if}}
{{#if ../../../schemaDef/dbType/isPostgreSQL}}
<tr>
<td><form action="http://explain.depesz.com/" target="_new"><input type="hidden" name="title" value="{{../../schemaDef/dbType/id}}/{{../../schemaDef/short_code}}/{{../../id}}/{{index}}"><input type="hidden" name="plan" value=""><input type="submit" class="btn btn-info depesz" value="View on Depesz"></form></td>
</tr>
{{/if}}
</table>
{{/if}}
{{else}}
<div id="messages_{{index}}" class="alert alert-error database-messages"><i class="icon-remove"></i>{{this.ERRORMESSAGE}}</div>
{{/if}}
</div>
{{/each_with_index}}
<span id="donationSuggestion">Did this query solve the problem? If so, consider donating $5 to help make sure SQL Fiddle will be here next time you need help with a database problem. Thanks!</span>
|