aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-05-09 13:07:27 +0300
committerBonfaceKilz2023-05-26 08:40:22 +0300
commit5f2592e10004cf4b943d10db6fe02790b8d411a1 (patch)
treed34ff09c5073a2381ba0bd223dd72d69f97c9edc
parent656006cb1ba1adc91a32a71303e7cc74259dc469 (diff)
downloadgn-transform-databases-5f2592e10004cf4b943d10db6fe02790b8d411a1.tar.gz
When a field is null during annotation, return an empty string
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-xdump.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/dump.scm b/dump.scm
index 835a199..2bd9cdf 100755
--- a/dump.scm
+++ b/dump.scm
@@ -94,9 +94,12 @@
(symbol->string schema))
((string? schema) schema)
(else
- (error "Use a string/symbol")))])
- (string->symbol
- (format #f "~s~a" field schema))))
+ (error "Use a string/symbol")))]
+ [string-field (if (number? field) (number->string field) field)])
+ (if (string-null? string-field)
+ ""
+ (string->symbol
+ (format #f "~s~a" string-field schema)))))
(define (string-split-substring str substr)
"Split the string @var{str} into a list of substrings delimited by the