diff options
-rw-r--r-- | common.m4 | 33 | ||||
-rw-r--r-- | opdracht-1/opdracht-1.m4 | 34 | ||||
-rw-r--r-- | opdracht-2/opdracht-2.m4 | 36 |
3 files changed, 36 insertions, 67 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}}) +}}) + diff --git a/opdracht-1/opdracht-1.m4 b/opdracht-1/opdracht-1.m4 index 59b85eb..fbb1a89 100644 --- a/opdracht-1/opdracht-1.m4 +++ b/opdracht-1/opdracht-1.m4 @@ -1,37 +1,5 @@ changequote(`{{', `}}') - -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}}) -}}) +include({{../common.m4}}) # Practicum 1 diff --git a/opdracht-2/opdracht-2.m4 b/opdracht-2/opdracht-2.m4 index 627cb36..e733be3 100644 --- a/opdracht-2/opdracht-2.m4 +++ b/opdracht-2/opdracht-2.m4 @@ -1,39 +1,7 @@ changequote(`{{', `}}') +include({{../common.m4}}) -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}}) -}}) - -# Practicum 1 +# Practicum 2 q_with_test(1) q_with_test(2) |