[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#43477] [PATCH 1/1] guix: graph: Add 'plain' backend.
From: |
zimoun |
Subject: |
[bug#43477] [PATCH 1/1] guix: graph: Add 'plain' backend. |
Date: |
Thu, 17 Sep 2020 21:40:32 +0200 |
* guix/graph.scm: (emit-plain-prologue, emit-plain-epilogue, emit-plain-node,
emit-plain-edge): New procedures.
(%plain-backend): New variable.
(%graph-backends): Update variable.
---
guix/graph.scm | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/guix/graph.scm b/guix/graph.scm
index b695ca4306..4be864b29a 100644
--- a/guix/graph.scm
+++ b/guix/graph.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -324,6 +325,28 @@ nodeArray.push(nodes[\"~a\"]);~%"
emit-cypher-prologue emit-cypher-epilogue
emit-cypher-node emit-cypher-edge))
+
+;;;
+;;; Plain export
+;;;
+
+(define (emit-plain-prologue name port)
+ (format port ""))
+
+(define (emit-plain-epilogue port)
+ (format port ""))
+
+(define (emit-plain-node id label port)
+ (format port "~a~%" label))
+
+(define (emit-plain-edge id1 id2 port)
+ (format port ""))
+
+(define %plain-backend
+ (graph-backend "plain"
+ "Generate Plain queries."
+ emit-plain-prologue emit-plain-epilogue
+ emit-plain-node emit-plain-edge))
;;;
@@ -333,7 +356,8 @@ nodeArray.push(nodes[\"~a\"]);~%"
(define %graph-backends
(list %graphviz-backend
%d3js-backend
- %cypher-backend))
+ %cypher-backend
+ %plain-backend))
(define* (export-graph sinks port
#:key
--
2.28.0
- [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend., zimoun, 2020/09/17
- [bug#43477] [PATCH 1/1] guix: graph: Add 'plain' backend.,
zimoun <=
- [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend., Mathieu Othacehe, 2020/09/18
- [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend., Ricardo Wurmus, 2020/09/18
- [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend., zimoun, 2020/09/18
- [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend., Ludovic Courtès, 2020/09/24
- [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend., zimoun, 2020/09/24
- [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend., Ludovic Courtès, 2020/09/25
- [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend., zimoun, 2020/09/25
- [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend., Ricardo Wurmus, 2020/09/25
- [bug#43477] Guix aliases? (was: [bug#43477] [PATCH 0/1] guix: graph: Add 'plain' backend.), zimoun, 2020/09/25