diff options
Diffstat (limited to 'examples/schema.scm')
| -rwxr-xr-x | examples/schema.scm | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/examples/schema.scm b/examples/schema.scm index 4bde895..c4ff082 100755 --- a/examples/schema.scm +++ b/examples/schema.scm @@ -8,18 +8,7 @@ (transform sql) (transform table)) -(define (call-with-genenetwork-database connection-settings proc) - (call-with-database "mysql" (string-join - (list (assq-ref connection-settings 'sql-username) - (assq-ref connection-settings 'sql-password) - (assq-ref connection-settings 'sql-database) - "tcp" - (assq-ref connection-settings 'sql-host) - (number->string - (assq-ref connection-settings 'sql-port))) - ":") - proc)) - + (define (transform-table-schema connection-settings db) (let ((tables (tables connection-settings db))) (for-each (lambda (table) @@ -44,7 +33,7 @@ (table-columns table)))) tables))) - + (let* ((option-spec '((settings (single-char #\s) (value #t)) (output (single-char #\o) (value #t)) @@ -54,7 +43,7 @@ (output (option-ref options 'output #f)) (documentation (option-ref options 'documentation #f)) (%connection-settings (call-with-input-file settings read))) - (call-with-genenetwork-database + (call-with-target-database %connection-settings (lambda (db) (with-output-to-file output |
