From 23963b66d278fcbb7c25bb5bb2e26791d0afa2d6 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 24 Dec 2021 15:05:49 +0530 Subject: Import functions from (ccwl graphviz). * visualize-schema.scm (graph->dot, graph, graph-node, graph-edge, graph-port, html-string): New functions. (sxml->graphviz-html): Use html-string. (foreign-key-graphviz-edges): Use graph-port. --- visualize-schema.scm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'visualize-schema.scm') diff --git a/visualize-schema.scm b/visualize-schema.scm index b6e4123..6fb7479 100644 --- a/visualize-schema.scm +++ b/visualize-schema.scm @@ -21,6 +21,13 @@ (define gn (prefix "http://genenetwork.org/")) +(define graph (@@ (ccwl graphviz) graph)) +(define graph-node (@@ (ccwl graphviz) graph-node)) +(define graph-edge (@@ (ccwl graphviz) graph-edge)) +(define graph-port (@@ (ccwl graphviz) graph-port)) +(define html-string (@@ (ccwl graphviz) html-string)) +(define graph->dot (@@ (ccwl graphviz) graph->dot)) + (define (sparql-query-records . args) ;; TODO: Use the JSON query results so that types can be converted ;; correctly. @@ -61,7 +68,7 @@ (define (sxml->graphviz-html tree) "Convert sxml TREE to a graphviz , and return it." - ((@@ (ccwl graphviz) html-string) (sxml->xml-string tree))) + (html-string (sxml->xml-string tree))) (define (table-label table) "Return HTML string label for TABLE." @@ -153,9 +160,8 @@ relations in TABLES." (filter-map (lambda (column) (and=> (column->foreign-table table column tables) (cut cons - ((@@ (ccwl graphviz) graph-port) - (table-name table) - (column-name column)) + (graph-port (table-name table) + (column-name column)) <>))) (table-columns table))) tables)) -- cgit v1.2.3