diff options
author | Munyoki Kilyungi | 2023-03-16 18:40:19 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-04-05 16:17:11 +0300 |
commit | 6aebd73eeeef944e555fec225c529c7674d7336d (patch) | |
tree | 372bf029dc2e44df7e87401397b1f76c37156283 /dump.scm | |
parent | be42b42be2a87a9872c153a9b6f3da7ed135efa1 (diff) | |
download | gn-transform-databases-6aebd73eeeef944e555fec225c529c7674d7336d.tar.gz |
Annotate fields with a custom scheme such as "^^xsd:datetime"
* dump.scm (annotate-field): New function.
* dump/triples.scm (triple): Print a string as they appear with
DISPLAY should they contain "\"" thus enabling a triple that looks
like:
gn:species_mus_musculus gn:name "Mouse"^^xsd:string
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'dump.scm')
-rwxr-xr-x | dump.scm | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -89,6 +89,15 @@ ;;; Dump tables +(define (annotate-field field schema) + (let ([schema (cond ((symbol? schema) + (symbol->string schema)) + ((string? schema) schema) + (else + (error "Use a string/symbol")))]) + (string->symbol + (format #f "~s~a" field schema)))) + (define (delete-substrings str . substrings) "Delete SUBSTRINGS, a list of strings, from STR." (fold (lambda (substring result) |