From b8fc67cc2ab40d42888780d211498ec38a0341e6 Mon Sep 17 00:00:00 2001
From: Leonardo Christino <leomilho@gmail.com>
Date: Fri, 19 Jan 2024 18:24:09 +0100
Subject: [PATCH] fix(ws): better formatting

---
 entityv2/queryStruct.go | 60 ++++++++++++++++++++---------------------
 1 file changed, 29 insertions(+), 31 deletions(-)

diff --git a/entityv2/queryStruct.go b/entityv2/queryStruct.go
index a0a691a..61619e8 100755
--- a/entityv2/queryStruct.go
+++ b/entityv2/queryStruct.go
@@ -9,17 +9,18 @@ package entityv2
 IncomingQueryJSON describes the query coming into the service in JSON format
 */
 type IncomingQueryJSON struct {
-	DatabaseName    string                    `json:"databaseName"`
-	Limit           int                       `json:"limit"`
-	Return          []string                  `json:"return"`
-	Query           []QueryStruct             `json:"query"`
-	Logic           interface{}               `json:"logic"`
+	SaveStateID string        `json:"saveStateId"`
+	Limit       int           `json:"limit"`
+	Return      []string      `json:"return"`
+	Query       []QueryStruct `json:"query"`
+	Logic       interface{}   `json:"logic"`
 	// Entities        []QueryEntityStruct   `json:"entities"`
 	// Relations       []QueryRelationStruct `json:"relations"`
 	// GroupBys        []QueryGroupByStruct  `json:"groupBys"`
-	MachineLearning []QueryMLStruct       `json:"machineLearning"`
+	MachineLearning []QueryMLStruct `json:"machineLearning"`
 	// Modifiers []QueryModifierStruct
 	// Prefix    string
+	Cached bool `json:"cached"`
 }
 
 /*
@@ -31,40 +32,37 @@ type QueryMLStruct struct {
 }
 
 type QueryStruct struct {
-	ID        string     `json:"id"`
-	Node      NodeStruct `json:"node"`
+	ID   string     `json:"id"`
+	Node NodeStruct `json:"node"`
 }
 
 type NodeStruct struct {
-	Label      string             `json:"label"`
-	ID         string             `json:"id"`
+	Label string `json:"label"`
+	ID    string `json:"id"`
 	// Logic      []LogicStruct      `json:"logic"`
-	Filter     []FilterStruct     `json:"filter"`
-	Relation   RelationStruct     `json:"relation"`
-	SubQuery   *QueryStruct	      `json:"subquery"`
-	Export     []ExportNodeStruct `json:"export"`
-
+	Filter   []FilterStruct     `json:"filter"`
+	Relation RelationStruct     `json:"relation"`
+	SubQuery *QueryStruct       `json:"subquery"`
+	Export   []ExportNodeStruct `json:"export"`
 }
 
-
 type ExportNodeStruct struct {
-	ID           string  `json:"id"`
-	Attribute    string  `json:"attribute"`
+	ID        string `json:"id"`
+	Attribute string `json:"attribute"`
 }
 
-
 type FilterStruct struct {
-	Attribute    string  `json:"attribute"`
-	Operation    string  `json:"operation"`
-	Value        string  `json:"value"`
+	Attribute string `json:"attribute"`
+	Operation string `json:"operation"`
+	Value     string `json:"value"`
 }
 
 type RelationStruct struct {
-	Label      string                  `json:"label"`
-	ID         string                  `json:"id"`
-	Depth      QuerySearchDepthStruct  `json:"depth"`
-	Direction  string                  `json:"direction"`
-	Node       *NodeStruct             `json:"node"`
+	Label     string                 `json:"label"`
+	ID        string                 `json:"id"`
+	Depth     QuerySearchDepthStruct `json:"depth"`
+	Direction string                 `json:"direction"`
+	Node      *NodeStruct            `json:"node"`
 }
 
 /*
@@ -75,12 +73,12 @@ type QuerySearchDepthStruct struct {
 	Max int `json:"max"`
 }
 
-// 
+//
 // Logic Structs!
 //
 
 type LogicStruct struct {
-	Attribute    string  `json:"attribute"`
-	Operation    string  `json:"operation"`
-	ID           string  `json:"id"`
+	Attribute string `json:"attribute"`
+	Operation string `json:"operation"`
+	ID        string `json:"id"`
 }
-- 
GitLab