summaryrefslogtreecommitdiff
path: root/support/nlatexdb/examples/testfile.tex
blob: 372c80e4aa289a42743ec6a2fd875754ccd88140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
\texdbconnectionnet{Mono.Data.Sqlite}{URI=file:kleinertest.db3}
\texdbdef{??personqry}{select id, firstname, lastname, gender, gender from person where lastname LIKE ??1}{??id,??firstname,??lastname,??gender/m/male/f/female,??pronoun/m/He/f/She}
\texdbdef{??phoneqry}{select phonenumber, phonetype from telephone where fk_person = ??id}{??phonenumber,??phonetype}
\texdbforfile{??personqry}{testfileout??id.tex}{\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\begin{document}
There is a certain ??firstname ??lastname in the database. ??pronoun is ??gender.

\texdbif{??phoneqry}{
Phone numbers:

  \begin{tabular}{ll}
\texdbfor{??phoneqry}{??phonenumber & ??phonetype \\}
\end{tabular}
}
\end{document}
}