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
aa07c6d2
Commit
aa07c6d2
authored
3 years ago
by
Geurtjens,D. (Douwe Geurtjens)
Browse files
Options
Downloads
Patches
Plain Diff
Rename of function pdict to groupBy, filter dictionary fix.
parent
bee9d9aa
No related branches found
No related tags found
1 merge request
!1
Big merge
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aql/hierarchy.go
+8
-7
8 additions, 7 deletions
aql/hierarchy.go
with
8 additions
and
7 deletions
aql/hierarchy.go
+
8
−
7
View file @
aa07c6d2
...
...
@@ -37,6 +37,7 @@ var reldone map[int]bool
var
entdone
map
[
int
]
bool
var
funcdone
map
[
int
]
bool
var
relfuncdone
map
[
int
]
bool
var
filterDone
map
[
int
]
bool
func
search
(
JSONQuery
*
entity
.
IncomingQueryJSON
,
index
int
)
{
listoflists
=
[]
pdictList
{}
...
...
@@ -44,7 +45,7 @@ func search(JSONQuery *entity.IncomingQueryJSON, index int) {
entdone
=
make
(
map
[
int
]
bool
)
funcdone
=
make
(
map
[
int
]
bool
)
relfuncdone
=
make
(
map
[
int
]
bool
)
filterDone
=
make
(
map
[
int
]
bool
)
var
s
pdictList
//printSlice(s)
//layercounter = 0
...
...
@@ -215,7 +216,7 @@ func RelToAllFunc(JSONQuery *entity.IncomingQueryJSON, rel pdict) {
if
_
,
ok
:=
funcdone
[
i
];
!
ok
{
if
JSONQuery
.
GroupBys
[
i
]
.
RelationID
==
rel
.
pointer
{
relfunc
:=
pdict
{
typename
:
"
function
"
,
typename
:
"
groupBy
"
,
pointer
:
i
,
}
funcappliedtosubquery
=
append
(
funcappliedtosubquery
,
relfunc
)
...
...
@@ -224,7 +225,7 @@ func RelToAllFunc(JSONQuery *entity.IncomingQueryJSON, rel pdict) {
if
JSONQuery
.
Relations
[
rel
.
pointer
]
.
FromID
==
i
&&
JSONQuery
.
Relations
[
rel
.
pointer
]
.
FromType
==
"groupBy"
{
fromfunc
:=
pdict
{
typename
:
"
function
"
,
typename
:
"
groupBy
"
,
pointer
:
i
,
}
functowhichrelapplies
=
append
(
functowhichrelapplies
,
fromfunc
)
...
...
@@ -232,7 +233,7 @@ func RelToAllFunc(JSONQuery *entity.IncomingQueryJSON, rel pdict) {
}
else
if
JSONQuery
.
Relations
[
rel
.
pointer
]
.
ToID
==
i
&&
JSONQuery
.
Relations
[
rel
.
pointer
]
.
ToType
==
"groupBy"
{
tofunc
:=
pdict
{
typename
:
"
function
"
,
typename
:
"
groupBy
"
,
pointer
:
i
,
}
functowhichrelapplies
=
append
(
functowhichrelapplies
,
tofunc
)
...
...
@@ -393,9 +394,9 @@ func FuncToAllRel(JSONQuery *entity.IncomingQueryJSON, function pdict) {
}
func
AddFilters
(
JSONQuery
*
entity
.
IncomingQueryJSON
)
{
filterDone
:=
make
([]
bool
,
len
(
JSONQuery
.
Filters
))
for
i
,
filter
:=
range
JSONQuery
.
Filters
{
if
!
filterDone
[
i
]
{
if
_
,
ok
:=
filterDone
[
i
]
;
!
ok
{
p
:=
pdict
{
typename
:
filter
.
FromType
,
pointer
:
filter
.
FromID
,
...
...
@@ -409,7 +410,7 @@ func AddFilters(JSONQuery *entity.IncomingQueryJSON) {
}
}
func
addOneFilter
(
filterPDict
pdict
,
JSONQuery
*
entity
.
IncomingQueryJSON
,
p
pdict
,
filterDone
*
[
]
bool
)
{
func
addOneFilter
(
filterPDict
pdict
,
JSONQuery
*
entity
.
IncomingQueryJSON
,
p
pdict
,
filterDone
*
map
[
int
]
bool
)
{
if
p
.
typename
==
"filter"
&&
(
*
filterDone
)[
p
.
pointer
]
{
l
:=
FindCurrentLayer
(
listoflists
,
p
)
k
:=
pdictList
{}
...
...
This diff is collapsed.
Click to expand it.
Heijden,T.A.J. van der (Thijs)
@t.a.j.vanderheijden
mentioned in commit
82d6956b
·
3 years ago
mentioned in commit
82d6956b
mentioned in commit 82d6956b25f2a5a9942b9ef3014309c1aefed134
Toggle commit list
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