From 909eb42f9cf08cc7c88bca2fc25f3281f9787190 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 3 Jul 2023 18:48:46 +0300 Subject: Make dumping optional, defaulting to #t There may be a case where one just wants to dump metadata about the s-exps only. --- dump/special-forms.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dump/special-forms.scm b/dump/special-forms.scm index ded0db5..2b6a0bb 100644 --- a/dump/special-forms.scm +++ b/dump/special-forms.scm @@ -462,4 +462,13 @@ must be remedied." ((field table column alias) alias)) x)))) #'(predicate-clauses ...))))) + (when (dump-configuration-table-dump? configuration) + (sql-for-each (lambda (row) + (scm->triples + (map-alist row #,@(field->key #'(predicate-clauses ...))) + #,(field->assoc-ref #'row #'subject))) + db + (select-query #,(collect-fields #'(subject predicate-clauses ...)) + (primary-table other-tables ...) + tables-raw ...)))))) (_ (error "Invalid define-dump syntax:" (syntax->datum x)))))) -- cgit v1.2.3