Mercurial > repos > jjohnson > sqlite_to_tabular
comparison sqlite_to_tabular.xml @ 0:30a37dd92ccd draft
Uploaded
author | jjohnson |
---|---|
date | Sat, 03 Oct 2015 09:13:55 -0400 |
parents | |
children | 1819a06a01eb |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:30a37dd92ccd |
---|---|
1 <?xml version="1.0"?> | |
2 <tool id="sqlite_to_tabular" name="SQLite to tabular" version="0.0.1"> | |
3 <description>for SQL query</description> | |
4 <stdio> | |
5 <exit_code range="1:" level="fatal" description="Error" /> | |
6 </stdio> | |
7 <command interpreter="python"> | |
8 sqlite_to_tabular.py | |
9 --sqlitedb="$sqlitedb" | |
10 --query='$sqlquery' | |
11 $no_header | |
12 --output="$query_results" | |
13 </command> | |
14 <inputs> | |
15 <param name="sqlitedb" type="data" format="sqlite" label="SQLite Database"/> | |
16 <param name="sqlquery" type="text" area="True" size="120x20" label="SQL query"> | |
17 <validator type="regex">^(?im)\s*SELECT\s.*\sFROM\s.*$</validator> | |
18 </param> | |
19 <param name="no_header" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Omit column headers"/> | |
20 </inputs> | |
21 <outputs> | |
22 <data name="query_results" format="tabular" /> | |
23 </outputs> | |
24 <tests> | |
25 <!-- | |
26 --> | |
27 <test> | |
28 <param name="sqlitedb" ftype="sqlite" value="testdb.sqlite" /> | |
29 <param name="sqlquery" value="SELECT first_name, last_name, age FROM contacts WHERE first_name = 'Sam'" /> | |
30 <output name="query_results"> | |
31 <assert_contents> | |
32 <has_text text="Smith" /> | |
33 <not_has_text text="Doe" /> | |
34 </assert_contents> | |
35 </output> | |
36 </test> | |
37 </tests> | |
38 <help> | |
39 Outputs the results of a query on a SQLite Database as a tabular file. | |
40 </help> | |
41 </tool> |