From 59dc3a2be12b6d03ffe5d16e5011dbb834bb0c93 Mon Sep 17 00:00:00 2001
From: Fjodor <fjodor_rs@hotmail.com>
Date: Mon, 14 Jun 2021 13:02:58 +0200
Subject: [PATCH] spatie ipv newline

---
 cypher/convertQuery.go | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/cypher/convertQuery.go b/cypher/convertQuery.go
index d0db4fc..f20ebeb 100644
--- a/cypher/convertQuery.go
+++ b/cypher/convertQuery.go
@@ -157,7 +157,8 @@ func createQuery(JSONQuery *entity.IncomingQueryJSON) *string {
 		}
 
 		relationUnion = TrimSuffix(relationUnion, ",")
-		ret += nodeUnion + relationUnion + ";\n"
+		// hier zat een newline
+		ret += nodeUnion + relationUnion + "; "
 	}
 
 	nodeSet := make(map[int]bool)
@@ -188,7 +189,8 @@ name is the autogenerated name of the node consisting of "n" + the index of the
 Return: a string containing a single LET-statement in AQL
 */
 func createNodeMatch(node *entity.QueryEntityStruct, name *string) *string {
-	header := fmt.Sprintf("MATCH (%v:%v)\n", *name, node.Type)
+	// hier zat een newline
+	header := fmt.Sprintf("MATCH (%v:%v) ", *name, node.Type)
 	constraints := *createConstraintStatements(&node.Constraints, *name)
 	ret := header + constraints
 	return &ret
@@ -219,8 +221,8 @@ func createRelationMatch(relation *entity.QueryRelationStruct, relationName stri
 	relationReturn += ")"
 
 	constraintReturn := *createConstraintStatements(&relation.Constraints, relationName)
-
-	ret := relationReturn + "\n" + constraintReturn
+	// hier zat een newline
+	ret := relationReturn + " " + constraintReturn
 
 	return &ret
 }
-- 
GitLab