diff options
Diffstat (limited to 'transform')
| -rw-r--r-- | transform/schema.scm | 6 | ||||
| -rw-r--r-- | transform/strings.scm | 18 |
2 files changed, 15 insertions, 9 deletions
diff --git a/transform/schema.scm b/transform/schema.scm index d620882..f3896a7 100644 --- a/transform/schema.scm +++ b/transform/schema.scm @@ -93,10 +93,10 @@ is a <table> object." (for-each (lambda (column) (let ((column-id (column-id (table-name table) (column-name column)))) - (triple column-id 'rdf:type 'gn:sqlTableField) + (triple column-id 'rdf:type 'gn:sql_table_field) (triple column-id 'gn:name (column-name column)) - (triple column-id 'gn:sqlFieldType (column-type column)) - (triple table-id 'gn:hasField column-id))) + (triple column-id 'gn:sql_field_type (column-type column)) + (triple table-id 'gn:has_field column-id))) (table-columns table)))) tables))) diff --git a/transform/strings.scm b/transform/strings.scm index aba554a..7b62349 100644 --- a/transform/strings.scm +++ b/transform/strings.scm @@ -15,15 +15,21 @@ snake->lower-camel lower-case-and-replace-spaces string-capitalize-first - normalize-string-field)) + normalize-string-field + fix-email-id + blank-p + investigator-attributes->id)) + +(define (blank-p str) + (if (string-blank? str) #f str)) (define (lower-case-and-replace-spaces str) (string-map - (lambda (c) - (if (char=? c #\space) - #\- ; replace space with hyphen - c)) ; convert character to lower case - (string-downcase str))) + (lambda (c) + (if (char=? c #\space) + #\- ; replace space with hyphen + c)) ; convert character to lower case + (string-downcase str))) (define (time-unix->string seconds . maybe-format) "Given an integer saying the number of seconds since the Unix |
