aboutsummaryrefslogtreecommitdiff
path: root/transform
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-10-17 14:05:59 +0300
committerMunyoki Kilyungi2024-10-17 14:05:59 +0300
commit1574ec727d3ae9ce51b984a5e5c73f2350a42c19 (patch)
tree9655e53776a38bc2dd8cbb0c440a9cdc6387016b /transform
parenta3e1dd74b44524083348bbf0ce77e2f1cba66523 (diff)
downloadgn-transform-databases-1574ec727d3ae9ce51b984a5e5c73f2350a42c19.tar.gz
Rename schema-dump.scm -> schema.scm.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'transform')
-rw-r--r--transform/schema.scm (renamed from transform/schema-dump.scm)12
1 files changed, 9 insertions, 3 deletions
diff --git a/transform/schema-dump.scm b/transform/schema.scm
index 18df5da..cdfc834 100644
--- a/transform/schema-dump.scm
+++ b/transform/schema.scm
@@ -4,7 +4,13 @@
#:use-module (transform sql)
#:use-module (transform triples)
#:use-module (transform strings)
- #:use-module (transform table))
+ #:use-module (transform table)
+ #:export (table-fields
+ get-tables-from-comments
+ schema-annotations
+ tables
+ schema
+ data-table))
(define (table-fields db table)
@@ -47,7 +53,7 @@
(for-each (cut table-fields db <>)
(get-tables-from-comments db)))))
-(define (tables db)
+(define (tables connection-settings db)
"Return list of all tables in DB. Each element of the returned list
is a <table> object."
(map (lambda (table)
@@ -68,7 +74,7 @@ is a <table> object."
(information_schema.tables data_length))
(information_schema.tables)
(format #f "WHERE table_schema = '~a'"
- (assq-ref %connection-settings 'sql-database))))))
+ (assq-ref connection-settings 'sql-database))))))
(define (schema db)
(let ((tables (tables db)))