0
|
1 <tool id="sqlite" name="SQL" version="0.4">
|
|
2 <description>Runner (SQLite)</description>
|
|
3 <command interpreter="python">
|
|
4 sqlite.py $output_file $explain_plan $header "$sql"
|
|
5 #for $i in $files
|
|
6 ${i.file} ${i.header} '${i.index}'
|
|
7 #end for
|
|
8 </command>
|
|
9 <inputs>
|
|
10 <repeat name="files" title="Table">
|
|
11 <param name="file" type="data" format="tabular" label="File (tabular)"/>
|
8
|
12 <param name="header" type="boolean" truevalue="1" falsevalue="0" checked="False" label="Use the first row as column names (If unchecked, use c1 c2 c3 ...)" />
|
0
|
13 <param name="index" type="text" size='20' value="" label="Index" />
|
|
14 </repeat>
|
8
|
15 <param name="header" type="boolean" truevalue="1" falsevalue="0" checked="False" label="Print column names in the first row" />
|
0
|
16 <param name="sql" type="text" area="true" size="10x50" label="SQL">
|
|
17 <sanitizer sanitize="False"/>
|
|
18 </param>
|
|
19 <param name="explain_plan" type="boolean" truevalue="1" falsevalue="0" checked="False" label="Explain SQL execution plan. (Ignore if you are not a developer)" />
|
|
20 </inputs>
|
|
21 <outputs>
|
|
22 <data name="output_file" format="tabular" label="${tool.name} on ${on_string}"/>
|
|
23 </outputs>
|
|
24 <help>
|
8
|
25
|
|
26 **Tables**
|
|
27
|
|
28 Select all table to be joined.
|
|
29
|
|
30 ----
|
|
31
|
|
32 **Use the first line as column names**
|
|
33
|
|
34 When the input file has column header::
|
|
35
|
|
36 id name
|
|
37 101 John
|
|
38 102 Mary
|
|
39
|
|
40 Check this box and use column names ('id' and 'name') to write queries:
|
|
41
|
|
42 SELECT * FROM t1 WHERE c2 = 'John';
|
|
43
|
|
44 When the input file does not have column header::
|
|
45
|
|
46 101 John
|
|
47 102 Mary
|
|
48
|
|
49 Uncheck this box and use c1, c2, c3, ... to write queries:
|
|
50
|
|
51 SELECT * FROM t1 WHERE name = 'John';
|
|
52
|
|
53 ----
|
|
54
|
|
55 **Index**
|
|
56
|
|
57 Comma-delimited list of column numbers.
|
|
58
|
|
59 Example:
|
|
60
|
|
61 2,3
|
|
62
|
|
63 This creates NOT a composite index BUT two different indices on column 2 and on column 3.
|
|
64
|
|
65 ----
|
|
66
|
|
67 **Print column names in the first row**
|
|
68
|
|
69 Example::
|
|
70
|
|
71 col1 col2 col3
|
|
72 aaaa bbbb cccc
|
|
73 aaaa dddd eeee
|
|
74
|
|
75 ----
|
|
76
|
|
77 **SQL**
|
|
78
|
0
|
79 </help>
|
|
80 </tool>
|