GNU bug report logs -
#43477
[PATCH 0/1] guix: graph: Add 'plain' backend.
Previous Next
Reported by: zimoun <zimon.toutoune <at> gmail.com>
Date: Thu, 17 Sep 2020 19:40:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* 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 <at> gnu.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> 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
This bug report was last modified 4 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.