From 4149f907ead360d417236768c9c0fdb2692babeb Mon Sep 17 00:00:00 2001
From: Arun Isaac
Date: Mon, 20 Dec 2021 15:53:19 +0530
Subject: Move
and types to separate module.
* dump.scm (, ): Move to ...
* dump/table.scm: ... here.
---
dump.scm | 15 +--------------
dump/table.scm | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+), 14 deletions(-)
create mode 100644 dump/table.scm
diff --git a/dump.scm b/dump.scm
index fd0b8b5..ccf85ca 100755
--- a/dump.scm
+++ b/dump.scm
@@ -5,13 +5,13 @@
(use-modules (rnrs io ports)
(srfi srfi-1)
- (srfi srfi-9 gnu)
(srfi srfi-26)
(ice-9 match)
(ice-9 string-fun)
(sxml simple)
(dump sql)
(dump string-similarity)
+ (dump table)
(dump utils))
@@ -503,19 +503,6 @@ ALIST field-name) forms."
;;; Visualize schema
-(define-immutable-record-type
- (make-table name size columns)
- table?
- (name table-name)
- (size table-size)
- (columns table-columns set-table-columns))
-
-(define-immutable-record-type
- (make-column name int?)
- column?
- (name column-name)
- (int? column-int?))
-
(define (tables db)
"Return list of all tables in DB. Each element of the returned list
is a object."
diff --git a/dump/table.scm b/dump/table.scm
new file mode 100644
index 0000000..1a9abc6
--- /dev/null
+++ b/dump/table.scm
@@ -0,0 +1,23 @@
+(define-module (dump table)
+ #:use-module (srfi srfi-9 gnu)
+ #:export (make-table
+ table-name
+ table-size
+ table-columns
+ set-table-columns
+ make-column
+ column-name
+ column-int?))
+
+(define-immutable-record-type
+ (make-table name size columns)
+ table?
+ (name table-name)
+ (size table-size)
+ (columns table-columns set-table-columns))
+
+(define-immutable-record-type
+ (make-column name int?)
+ column?
+ (name column-name)
+ (int? column-int?))
--
cgit v1.2.3