From 2d29efcc454620033315820f9865264c8b028a1b Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 14 Dec 2021 14:12:16 +0530 Subject: Use node ports to indicate foreign key relations precisely. * dump.scm (table-label): Set port attributes on tag. (tables->graphviz-edges): Specify ports on edges. --- dump.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'dump.scm') diff --git a/dump.scm b/dump.scm index 62d3a5d..20ec51c 100755 --- a/dump.scm +++ b/dump.scm @@ -631,7 +631,8 @@ metric." (table-name table) (human-units (table-size table))))) ,@(map (lambda (column) - `(tr (td (@ ,@(if (member (cons (string->symbol (table-name table)) + `(tr (td (@ (port ,(column-name column)) + ,@(if (member (cons (string->symbol (table-name table)) (string->symbol (column-name column))) %dumped) '((bgcolor "green")) @@ -678,7 +679,11 @@ relations in TABLES." (append-map (lambda (table) (filter-map (lambda (column) (and=> (column->foreign-table table column tables) - (cut cons (table-name table) <>))) + (cut cons + ((@@ (ccwl graphviz) graph-port) + (table-name table) + (column-name column)) + <>))) (table-columns table))) tables)) -- cgit v1.2.3