From 1fcf31ec48d4c9f8c1ed45896cfb592ebae8f7fb Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 5 May 2022 15:07:05 +0530 Subject: Prefix SQL connection parameters with sql-. This differentiates it from virtuoso and SPARQL connection parameters. * dump.scm (call-with-genenetwork-database, dump-data-table): Prefix SQL connection parameters with sql-. * README.md (Using): Update documentation of SQL connection parameters. --- README.md | 10 +++++----- dump.scm | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index fdad92a..069fdb8 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,11 @@ shown below. Take care to replace the placeholders within angle brackets with the appropriate values. ``` scheme -((username . "") - (password . "") - (database . "") - (host . "") - (port . )) +((sql-username . "") + (sql-password . "") + (sql-database . "") + (sql-host . "") + (sql-port . )) ``` Then, to dump the database to \~/data/dump, run diff --git a/dump.scm b/dump.scm index b62640c..a3e89a3 100755 --- a/dump.scm +++ b/dump.scm @@ -20,13 +20,13 @@ (define (call-with-genenetwork-database proc) (call-with-database "mysql" (string-join - (list (assq-ref %connection-settings 'username) - (assq-ref %connection-settings 'password) - (assq-ref %connection-settings 'database) + (list (assq-ref %connection-settings 'sql-username) + (assq-ref %connection-settings 'sql-password) + (assq-ref %connection-settings 'sql-database) "tcp" - (assq-ref %connection-settings 'host) + (assq-ref %connection-settings 'sql-host) (number->string - (assq-ref %connection-settings 'port))) + (assq-ref %connection-settings 'sql-port))) ":") proc)) @@ -725,7 +725,7 @@ is a object." (information_schema.tables data_length)) (information_schema.tables) (format #f "WHERE table_schema = '~a'" - (assq-ref %connection-settings 'database)))))) + (assq-ref %connection-settings 'sql-database)))))) (define (dump-schema db) (let ((tables (tables db))) -- cgit v1.2.3