summaryrefslogtreecommitdiff
path: root/support/pdbf-toolkit/minimal.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/pdbf-toolkit/minimal.tex
Initial commit
Diffstat (limited to 'support/pdbf-toolkit/minimal.tex')
-rw-r--r--support/pdbf-toolkit/minimal.tex25
1 files changed, 25 insertions, 0 deletions
diff --git a/support/pdbf-toolkit/minimal.tex b/support/pdbf-toolkit/minimal.tex
new file mode 100644
index 0000000000..ef921eeb65
--- /dev/null
+++ b/support/pdbf-toolkit/minimal.tex
@@ -0,0 +1,25 @@
+\documentclass[10pt]{article}
+\usepackage{pdbf}
+\usepackage[a4paper]{geometry}
+
+\dbSQLText{CREATE TABLE test(a int, b int, [attribute with space] int); INSERT INTO test VALUES(1, 1, 1); INSERT INTO test VALUES(2, 2, 4); INSERT INTO test VALUES(3, 3, 8); INSERT INTO test VALUES(4, 4, 16);}
+%\dbSQLFile{somedb.sql}
+%\dbSQLJDBC{jdbc:postgresql://localhost:5432/postgres}{postgres}{test}{testtable}%
+%\dbCSVFile{result.csv}{test}
+
+\begin{document}
+\noindent
+\sql{SELECT * FROM test;}\\[3pt]
+The table ``test'' contains \dataText{SELECT COUNT(*) FROM test;} tuples.\\[3pt]
+The following points are linked to the chart on the left side below: \dataText[linkTo=testname, linkSelector=2, linkLabel=Value at 2]{SELECT * FROM test WHERE a=2;}, \dataText[linkTo=testname, linkSelector=3, linkLabel=Value at 3]{SELECT * FROM test WHERE a=3;}.\\[3pt]
+\chart[width=0.45\textwidth, height=0.3\textwidth, logscale=true, chartType=line, name=testname]{SELECT a, b, [attribute with space] FROM test;}
+\chart[width=0.45\textwidth, height=0.3\textwidth, chartType=bar]{SELECT a, b, [attribute with space] FROM test;}\\[3pt]
+{\fontfamily{phv} \tiny \selectfont
+\noindent
+Change the font before this line to Helvetica and fontsize to tiny.\\[3pt]
+\chart[width=0.6\textwidth, height=0.25\textwidth, chartType=compareToBest]{SELECT b FROM test;}\\[3pt]
+\multiplotChart[width=0.6\textwidth, height=0.5\textwidth, xCount=2, yCount=2, yValues={["b", "b*2"]}, xValues={["a <= 2", "a > 2"]}, topArr={["a smaller or equal 2", "a greater 2"]}, yFirst]{SELECT a,? FROM test WHERE ?;}\\[3pt]
+\pivotTable[width=0.10\textwidth, height=0.15\textwidth, rows={["a"]}, aggregationattribute=b]{SELECT * FROM test;}
+\dataTable[verticalLines=i, horizontalLinesHeader=b hh, horizontalLinesBody=i]{SELECT * FROM test;}\\[3pt]
+}
+\end{document} \ No newline at end of file