diff options
author | Arun Isaac | 2021-12-24 15:05:49 +0530 |
---|---|---|
committer | Arun Isaac | 2021-12-24 15:07:13 +0530 |
commit | 23963b66d278fcbb7c25bb5bb2e26791d0afa2d6 (patch) | |
tree | 48be40d1af36a98e9327f48c9de7ca7c16c51c9b | |
parent | 336a392bd14cd72b16130a59a14fd04f90b78116 (diff) | |
download | gn-transform-databases-23963b66d278fcbb7c25bb5bb2e26791d0afa2d6.tar.gz |
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.
-rw-r--r-- | visualize-schema.scm | 14 |
1 files changed, 10 insertions, 4 deletions
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 <html-string>, 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)) |