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
b8fc67cc
Commit
b8fc67cc
authored
1 year ago
by
Leonardo Christino
Browse files
Options
Downloads
Patches
Plain Diff
fix(ws): better formatting
parent
9a17cad5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#129277
failed
1 year ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
entityv2/queryStruct.go
+29
-31
29 additions, 31 deletions
entityv2/queryStruct.go
with
29 additions
and
31 deletions
entityv2/queryStruct.go
+
29
−
31
View file @
b8fc67cc
...
@@ -9,17 +9,18 @@ package entityv2
...
@@ -9,17 +9,18 @@ package entityv2
IncomingQueryJSON describes the query coming into the service in JSON format
IncomingQueryJSON describes the query coming into the service in JSON format
*/
*/
type
IncomingQueryJSON
struct
{
type
IncomingQueryJSON
struct
{
DatabaseName
string
`json:"databaseName
"`
SaveStateID
string
`json:"saveStateId
"`
Limit
int
`json:"limit"`
Limit
int
`json:"limit"`
Return
[]
string
`json:"return"`
Return
[]
string
`json:"return"`
Query
[]
QueryStruct
`json:"query"`
Query
[]
QueryStruct
`json:"query"`
Logic
interface
{}
`json:"logic"`
Logic
interface
{}
`json:"logic"`
// Entities []QueryEntityStruct `json:"entities"`
// Entities []QueryEntityStruct `json:"entities"`
// Relations []QueryRelationStruct `json:"relations"`
// Relations []QueryRelationStruct `json:"relations"`
// GroupBys []QueryGroupByStruct `json:"groupBys"`
// GroupBys []QueryGroupByStruct `json:"groupBys"`
MachineLearning
[]
QueryMLStruct
`json:"machineLearning"`
MachineLearning
[]
QueryMLStruct
`json:"machineLearning"`
// Modifiers []QueryModifierStruct
// Modifiers []QueryModifierStruct
// Prefix string
// Prefix string
Cached
bool
`json:"cached"`
}
}
/*
/*
...
@@ -31,40 +32,37 @@ type QueryMLStruct struct {
...
@@ -31,40 +32,37 @@ type QueryMLStruct struct {
}
}
type
QueryStruct
struct
{
type
QueryStruct
struct
{
ID
string
`json:"id"`
ID
string
`json:"id"`
Node
NodeStruct
`json:"node"`
Node
NodeStruct
`json:"node"`
}
}
type
NodeStruct
struct
{
type
NodeStruct
struct
{
Label
string
`json:"label"`
Label
string
`json:"label"`
ID
string
`json:"id"`
ID
string
`json:"id"`
// Logic []LogicStruct `json:"logic"`
// Logic []LogicStruct `json:"logic"`
Filter
[]
FilterStruct
`json:"filter"`
Filter
[]
FilterStruct
`json:"filter"`
Relation
RelationStruct
`json:"relation"`
Relation
RelationStruct
`json:"relation"`
SubQuery
*
QueryStruct
`json:"subquery"`
SubQuery
*
QueryStruct
`json:"subquery"`
Export
[]
ExportNodeStruct
`json:"export"`
Export
[]
ExportNodeStruct
`json:"export"`
}
}
type
ExportNodeStruct
struct
{
type
ExportNodeStruct
struct
{
ID
string
`json:"id"`
ID
string
`json:"id"`
Attribute
string
`json:"attribute"`
Attribute
string
`json:"attribute"`
}
}
type
FilterStruct
struct
{
type
FilterStruct
struct
{
Attribute
string
`json:"attribute"`
Attribute
string
`json:"attribute"`
Operation
string
`json:"operation"`
Operation
string
`json:"operation"`
Value
string
`json:"value"`
Value
string
`json:"value"`
}
}
type
RelationStruct
struct
{
type
RelationStruct
struct
{
Label
string
`json:"label"`
Label
string
`json:"label"`
ID
string
`json:"id"`
ID
string
`json:"id"`
Depth
QuerySearchDepthStruct
`json:"depth"`
Depth
QuerySearchDepthStruct
`json:"depth"`
Direction
string
`json:"direction"`
Direction
string
`json:"direction"`
Node
*
NodeStruct
`json:"node"`
Node
*
NodeStruct
`json:"node"`
}
}
/*
/*
...
@@ -75,12 +73,12 @@ type QuerySearchDepthStruct struct {
...
@@ -75,12 +73,12 @@ type QuerySearchDepthStruct struct {
Max
int
`json:"max"`
Max
int
`json:"max"`
}
}
//
//
// Logic Structs!
// Logic Structs!
//
//
type
LogicStruct
struct
{
type
LogicStruct
struct
{
Attribute
string
`json:"attribute"`
Attribute
string
`json:"attribute"`
Operation
string
`json:"operation"`
Operation
string
`json:"operation"`
ID
string
`json:"id"`
ID
string
`json:"id"`
}
}
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