Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Q
query-conversion
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GraphPolaris
query-conversion
Commits
59dc3a2b
Commit
59dc3a2b
authored
3 years ago
by
Fjodor
Browse files
Options
Downloads
Patches
Plain Diff
spatie ipv newline
parent
35dbbd76
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cypher/convertQuery.go
+6
-4
6 additions, 4 deletions
cypher/convertQuery.go
with
6 additions
and
4 deletions
cypher/convertQuery.go
+
6
−
4
View file @
59dc3a2b
...
...
@@ -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
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment