From 2625d55ec1c46e0bdde77e4f94729de055359ba1 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 11 Dec 2021 18:56:39 +0530 Subject: Highlight dumped tables and columns. * dump.scm (dump-schema): Highlight tables and columns. --- dump.scm | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'dump.scm') diff --git a/dump.scm b/dump.scm index 43f3ea6..3d86536 100755 --- a/dump.scm +++ b/dump.scm @@ -610,15 +610,29 @@ metric." ((@@ (ccwl graphviz) graph-node) (table-name table) `((shape . "record") - (label . ,(format #f "{~a (~a) | ~a}" + (style . "filled") + (fillcolor . ,(if (find (match-lambda + ((dumped-table . _) + (string=? (symbol->string dumped-table) + (table-name table)))) + %dumped) + "lightgrey" + "white")) + (label . ,(format #f "<~a
~a (~a)
>" (table-name table) (human-units (table-size table)) - (string-replace-substring - (string-replace-substring - (string-join (map column-name (table-columns table)) - "\\l" 'suffix) - "<" "\\<") - ">" "\\>")))))) + (string-join (map (lambda (column) + (format #f "~a" + (if (member (cons (string->symbol (table-name table)) + (string->symbol (column-name column))) + %dumped) + " bgcolor=\"green\"" + "") + (replace-substrings + (column-name column) + '(("<" . "<") + (">" . ">"))))) + (table-columns table)))))))) tables) #:edges (append-map (lambda (table) (filter-map (lambda (column) -- cgit v1.2.3