diff options
author | Arun Isaac | 2021-12-11 18:56:39 +0530 |
---|---|---|
committer | Arun Isaac | 2021-12-11 18:56:39 +0530 |
commit | 2625d55ec1c46e0bdde77e4f94729de055359ba1 (patch) | |
tree | 8aca67b4a0e4cb789d079866d3715eccfbab196a | |
parent | a8d8bda3ea03b2f4d1cc99c66e8d2defaffc2758 (diff) | |
download | gn-transform-databases-2625d55ec1c46e0bdde77e4f94729de055359ba1.tar.gz |
Highlight dumped tables and columns.
* dump.scm (dump-schema): Highlight tables and columns.
-rwxr-xr-x | dump.scm | 28 |
1 files changed, 21 insertions, 7 deletions
@@ -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 "<<table border=\"0\"><tr><td border=\"1\">~a (~a)</td></tr>~a</table>>" (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 "<tr><td~a>~a</td></tr>" + (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) |