aboutsummaryrefslogtreecommitdiff
path: root/common.m4
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-04 20:48:36 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-04 20:48:36 +0200
commit7514bd355d109c8cab953d152e7f06a03687ed95 (patch)
tree57e3f45eee99ff24f7619f1dfdaaf65998a0be19 /common.m4
parent25de6db1afc10c984d02a97b1c1d916abfcd82bf (diff)
move shared templating code to common.m4
Diffstat (limited to 'common.m4')
-rw-r--r--common.m433
1 files changed, 33 insertions, 0 deletions
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}})
+}})
+