From 7514bd355d109c8cab953d152e7f06a03687ed95 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 4 Oct 2022 20:48:36 +0200 Subject: move shared templating code to common.m4 --- common.m4 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 common.m4 (limited to 'common.m4') diff --git a/common.m4 b/common.m4 new file mode 100644 index 0000000..8d60f41 --- /dev/null +++ b/common.m4 @@ -0,0 +1,33 @@ +define({{include_sql}}, {{ +```sql +include({{$1.sql}}) +``` +}}) + +define({{q_norm}}, {{ +## Opdracht $1 + +Query: +include_sql({{q$1}}) +}}) + +define({{q_with_output}}, {{ +## Opdracht $1 + +Query: +include_sql({{t$1}}) + +Output: +include({{t$1.md}}) +}}) + +define({{q_with_test}}, {{ +q_norm($1) + +Test query: +include_sql({{t$1}}) + +Output: +include({{t$1.md}}) +}}) + -- cgit v1.2.3