Skip to content
Snippets Groups Projects
Commit b2eb1dba authored by Joris's avatar Joris
Browse files

Removed some printstatements

parent 9f6b8e93
No related branches found
No related tags found
1 merge request!2Groupby overhaul
......@@ -34,7 +34,6 @@ func checkForQueryCluster(JSONQuery *entity.IncomingQueryJSON) (*entity.Incoming
gb := fmt.Sprintf("g%v", JSONQuery.GroupBys[0].ID)
cluster[gb] = true
// TODO: Does not check if the groupby is properly connected
group := fmt.Sprintf("%v%v", string(JSONQuery.GroupBys[0].GroupType[0]), JSONQuery.GroupBys[0].GroupID)
cluster[group] = true
......
......@@ -15,7 +15,8 @@ func (s *Service) ConvertQuery(totalJSONQuery *entity.IncomingQueryJSON) (*strin
queryJSON := totalJSONQuery
query, rest, isRest := checkForQueryCluster(queryJSON)
// If you want to query the other cluster as well, remove the underscores
query, _, _ := checkForQueryCluster(queryJSON)
if query == nil {
return nil, errors.New("Invalid query")
......@@ -26,13 +27,6 @@ func (s *Service) ConvertQuery(totalJSONQuery *entity.IncomingQueryJSON) (*strin
return nil, err
}
if isRest {
fmt.Println("Rest:")
fmt.Println(rest)
// If something needs to be done with other query cluster, then add code here
}
finalCypher, err = createCypher(query)
if err != nil {
return nil, err
......@@ -50,8 +44,6 @@ func createCypher(JSONQuery *entity.IncomingQueryJSON) (*string, error) {
return nil, err
}
fmt.Println(hierarchy)
// translate it to cypher in the right order, using the hierarchy
cypher, err := formQuery(JSONQuery, hierarchy)
if err != nil {
......@@ -216,7 +208,6 @@ func createQueryHierarchy(JSONQuery *entity.IncomingQueryJSON) (entity.Query, er
if rel.FromID == rela.ToID && rel.FromType == rela.ToType {
part := parts.Find(rel.ID, "relation")
part.Dependencies = append(part.Dependencies, parts.Find(rela.ID, "relation").PartID)
log.Println("yeet")
}
}
......
......@@ -2,7 +2,6 @@ package query
import (
"encoding/json"
"log"
"git.science.uu.nl/graphpolaris/query-conversion/entity"
)
......@@ -15,6 +14,5 @@ UnmarshalJSON takes an incoming message and unmarshals it
func UnmarshalJSON(msg *[]byte) (*entity.IncomingQueryJSON, error) {
var JSONQuery entity.IncomingQueryJSON
err := json.Unmarshal(*msg, &JSONQuery)
log.Println(JSONQuery)
return &JSONQuery, err
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment