entityv2

package
v0.0.0-...-bd8d8dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TwoEntitiesWithFilter = []byte(`{
	"queryname": 1,
	"db": 1,
	"query": [
	  {
		"node": {
		  "label": "person",
		  "id": "p1",
		  "filter": [{ "attribute": "name", "operation": "EQ", "value": "\"John\"" }],
		  "relationship": {
			"label": "friend",
			"direction": "TO",
			"filter": [{ "attribute": "since", "operation": "GT", "value": "\"2015-01-01\"" }],
			"node": {
			  "label": "person",
			  "filter": [{ "attribute": "name", "operation": "NEQ", "value": "\"John\"" }]
			}
		  }
		}
	  }
	]
  }
  `)

Functions

This section is empty.

Types

type ExportNodeStruct

type ExportNodeStruct struct {
	ID        string `json:"id"`
	Attribute string `json:"attribute"`
}

type FilterStruct

type FilterStruct struct {
	Attribute string `json:"attribute"`
	Operation string `json:"operation"`
	Value     string `json:"value"`
}

type IncomingQueryJSON

type IncomingQueryJSON struct {
	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"`
	// Modifiers []QueryModifierStruct
	// Prefix    string
	Cached bool `json:"cached"`
}

IncomingQueryJSON describes the query coming into the service in JSON format

type LogicStruct

type LogicStruct struct {
	Attribute string `json:"attribute"`
	Operation string `json:"operation"`
	ID        string `json:"id"`
}

type NodeStruct

type NodeStruct struct {
	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"`
}

type QueryMLStruct

type QueryMLStruct struct {
	Type       string
	Parameters []string
}

QueryMLStruct holds info for machinelearning

type QuerySearchDepthStruct

type QuerySearchDepthStruct struct {
	Min int `json:"min"`
	Max int `json:"max"`
}

QuerySearchDepthStruct holds the range of traversals for the relation

type QueryStruct

type QueryStruct struct {
	ID   string     `json:"id"`
	Node NodeStruct `json:"node"`
}

type RelationStruct

type RelationStruct struct {
	Label     string                 `json:"label"`
	ID        string                 `json:"id"`
	Depth     QuerySearchDepthStruct `json:"depth"`
	Direction string                 `json:"direction"`
	Node      *NodeStruct            `json:"node"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL