Documentation ¶
Index ¶
- Variables
- func KeyValueToFilter(k string, v interface{}) (*filters.Filter, error)
- func ParamsToElementMatcher(filterOp filters.BoolFilterOp, s ...interface{}) (graph.ElementMatcher, error)
- func ParamsToFilter(filterOp filters.BoolFilterOp, s ...interface{}) (*filters.Filter, error)
- func ParseSortParameter(keys ...interface{}) (filters.SortOrder, string, error)
- type BetweenElementMatcher
- type ForeverPredicate
- type GTEElementMatcher
- type GTElementMatcher
- type GraphTraversal
- func (t *GraphTraversal) Context(s ...interface{}) *GraphTraversal
- func (t *GraphTraversal) E(ctx StepContext, s ...interface{}) *GraphTraversalE
- func (t *GraphTraversal) Error() error
- func (t *GraphTraversal) MarshalJSON() ([]byte, error)
- func (t *GraphTraversal) RLock()
- func (t *GraphTraversal) RUnlock()
- func (t *GraphTraversal) V(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (t *GraphTraversal) Values() []interface{}
- type GraphTraversalAs
- type GraphTraversalE
- func (te *GraphTraversalE) BothV(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (te *GraphTraversalE) Count(ctx StepContext, s ...interface{}) *GraphTraversalValue
- func (te *GraphTraversalE) Dedup(ctx StepContext, s ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) Error() error
- func (te *GraphTraversalE) G() *GraphTraversal
- func (te *GraphTraversalE) Has(ctx StepContext, s ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) HasEither(ctx StepContext, s ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) HasKey(ctx StepContext, s string) *GraphTraversalE
- func (te *GraphTraversalE) HasNot(ctx StepContext, s string) *GraphTraversalE
- func (te *GraphTraversalE) InV(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (te *GraphTraversalE) Limit(ctx StepContext, s ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) MarshalJSON() ([]byte, error)
- func (te *GraphTraversalE) OutV(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (te *GraphTraversalE) Range(ctx StepContext, s ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) SubGraph(ctx StepContext, s ...interface{}) *GraphTraversal
- func (te *GraphTraversalE) Values() []interface{}
- type GraphTraversalRange
- type GraphTraversalShortestPath
- func (sp *GraphTraversalShortestPath) Dedup(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (sp *GraphTraversalShortestPath) Error() error
- func (sp *GraphTraversalShortestPath) GetNodes() []*graph.Node
- func (sp *GraphTraversalShortestPath) MarshalJSON() ([]byte, error)
- func (sp *GraphTraversalShortestPath) SubGraph(ctx StepContext, s ...interface{}) *GraphTraversal
- func (sp *GraphTraversalShortestPath) Values() []interface{}
- type GraphTraversalStep
- type GraphTraversalV
- func (tv *GraphTraversalV) As(ctx StepContext, keys ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) Both(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) BothE(ctx StepContext, s ...interface{}) *GraphTraversalE
- func (tv *GraphTraversalV) Count(ctx StepContext, s ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) Dedup(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) Error() error
- func (tv *GraphTraversalV) G() *GraphTraversal
- func (tv *GraphTraversalV) GetNodes() (nodes []*graph.Node)
- func (tv *GraphTraversalV) Has(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) HasEither(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) HasKey(ctx StepContext, s string) *GraphTraversalV
- func (tv *GraphTraversalV) HasNot(ctx StepContext, s string) *GraphTraversalV
- func (tv *GraphTraversalV) In(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) InE(ctx StepContext, s ...interface{}) *GraphTraversalE
- func (tv *GraphTraversalV) Limit(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) MarshalJSON() ([]byte, error)
- func (tv *GraphTraversalV) Out(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) OutE(ctx StepContext, s ...interface{}) *GraphTraversalE
- func (tv *GraphTraversalV) PropertyKeys(ctx StepContext, keys ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) PropertyValueMap(ctx StepContext, k ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) PropertyValues(ctx StepContext, k ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) Range(ctx StepContext, s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) Select(ctx StepContext, keys ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) ShortestPathTo(ctx StepContext, m graph.Metadata, e graph.Metadata) *GraphTraversalShortestPath
- func (tv *GraphTraversalV) Sort(ctx StepContext, keys ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) SubGraph(ctx StepContext, s ...interface{}) *GraphTraversal
- func (tv *GraphTraversalV) Sum(ctx StepContext, keys ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) Values() []interface{}
- type GraphTraversalValue
- func (t *GraphTraversalValue) Dedup(ctx StepContext, keys ...interface{}) *GraphTraversalValue
- func (t *GraphTraversalValue) Error() error
- func (t *GraphTraversalValue) Has(ctx StepContext, s ...interface{}) *GraphTraversalValue
- func (t *GraphTraversalValue) MarshalJSON() ([]byte, error)
- func (t *GraphTraversalValue) Values() []interface{}
- type GremlinTraversalContext
- type GremlinTraversalExtension
- type GremlinTraversalParser
- type GremlinTraversalScanner
- type GremlinTraversalSequence
- type GremlinTraversalStep
- type GremlinTraversalStepAs
- type GremlinTraversalStepBoth
- type GremlinTraversalStepBothE
- type GremlinTraversalStepBothV
- type GremlinTraversalStepContext
- type GremlinTraversalStepCount
- type GremlinTraversalStepDedup
- type GremlinTraversalStepE
- type GremlinTraversalStepG
- type GremlinTraversalStepHas
- type GremlinTraversalStepHasEither
- type GremlinTraversalStepHasKey
- type GremlinTraversalStepHasNot
- type GremlinTraversalStepIn
- type GremlinTraversalStepInE
- type GremlinTraversalStepInV
- type GremlinTraversalStepKeys
- type GremlinTraversalStepLimit
- type GremlinTraversalStepOut
- type GremlinTraversalStepOutE
- type GremlinTraversalStepOutV
- type GremlinTraversalStepRange
- type GremlinTraversalStepSelect
- type GremlinTraversalStepShortestPathTo
- type GremlinTraversalStepSort
- type GremlinTraversalStepSubGraph
- type GremlinTraversalStepSum
- type GremlinTraversalStepV
- type GremlinTraversalStepValueMap
- type GremlinTraversalStepValues
- type IPV4RangeElementMatcher
- type InsideElementMatcher
- type Iterator
- type LTEElementMatcher
- type LTElementMatcher
- type NEEElementMatcher
- type NEElementMatcher
- type NowPredicate
- type OutsideElementMatcher
- type RegexElementMatcher
- type Since
- type StepContext
- type Token
- type WithinElementMatcher
- type WithoutElementMatcher
Constants ¶
This section is empty.
Variables ¶
var ( // ErrExecutionError execution error ErrExecutionError = errors.New("Error while executing the query") )
Functions ¶
func KeyValueToFilter ¶
KeyValueToFilter creates a filter for a key with a fixed value or a predicate
func ParamsToElementMatcher ¶
func ParamsToElementMatcher(filterOp filters.BoolFilterOp, s ...interface{}) (graph.ElementMatcher, error)
ParamsToElementMatcher converts a slice to a ElementMatcher
func ParamsToFilter ¶
func ParamsToFilter(filterOp filters.BoolFilterOp, s ...interface{}) (*filters.Filter, error)
ParamsToFilter converts a slice to a filter
Types ¶
type BetweenElementMatcher ¶
type BetweenElementMatcher struct {
// contains filtered or unexported fields
}
BetweenElementMatcher describes a list of metadata that match between the range from, to
func Between ¶
func Between(from interface{}, to interface{}) *BetweenElementMatcher
Between predicate
type ForeverPredicate ¶
type ForeverPredicate struct{}
ForeverPredicate describes a entire time limit in the history
type GTEElementMatcher ¶
type GTEElementMatcher struct {
// contains filtered or unexported fields
}
GTEElementMatcher describes a list of metadata that match Greater Than Equal
type GTElementMatcher ¶
type GTElementMatcher struct {
// contains filtered or unexported fields
}
GTElementMatcher describes a list of metadata that match GreaterThan
type GraphTraversal ¶
GraphTraversal describes multiple step within a graph
func NewGraphTraversal ¶
func NewGraphTraversal(g *graph.Graph, lockGraph bool) *GraphTraversal
NewGraphTraversal creates a new graph traversal
func (*GraphTraversal) Context ¶
func (t *GraphTraversal) Context(s ...interface{}) *GraphTraversal
Context step : at, [duration]
func (*GraphTraversal) E ¶
func (t *GraphTraversal) E(ctx StepContext, s ...interface{}) *GraphTraversalE
E step : [edge ID]
func (*GraphTraversal) Error ¶
func (t *GraphTraversal) Error() error
func (*GraphTraversal) MarshalJSON ¶
func (t *GraphTraversal) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversal) V ¶
func (t *GraphTraversal) V(ctx StepContext, s ...interface{}) *GraphTraversalV
V step : [node ID]
func (*GraphTraversal) Values ¶
func (t *GraphTraversal) Values() []interface{}
Values returns the graph values
type GraphTraversalAs ¶
type GraphTraversalAs struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GraphTraversalAs store a state of the nodes selected
type GraphTraversalE ¶
type GraphTraversalE struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GraphTraversalE traversal steps on Edges
func NewGraphTraversalE ¶
func NewGraphTraversalE(gt *GraphTraversal, edges []*graph.Edge, err ...error) *GraphTraversalE
NewGraphTraversalE creates a new graph traversal Edges
func (*GraphTraversalE) BothV ¶
func (te *GraphTraversalE) BothV(ctx StepContext, s ...interface{}) *GraphTraversalV
BothV step, nodes in/out
func (*GraphTraversalE) Count ¶
func (te *GraphTraversalE) Count(ctx StepContext, s ...interface{}) *GraphTraversalValue
Count step
func (*GraphTraversalE) Dedup ¶
func (te *GraphTraversalE) Dedup(ctx StepContext, s ...interface{}) *GraphTraversalE
Dedup step : deduplicate
func (*GraphTraversalE) Error ¶
func (te *GraphTraversalE) Error() error
func (*GraphTraversalE) G ¶
func (te *GraphTraversalE) G() *GraphTraversal
G returns the GraphTraversal
func (*GraphTraversalE) Has ¶
func (te *GraphTraversalE) Has(ctx StepContext, s ...interface{}) *GraphTraversalE
Has step
func (*GraphTraversalE) HasEither ¶
func (te *GraphTraversalE) HasEither(ctx StepContext, s ...interface{}) *GraphTraversalE
HasEither step
func (*GraphTraversalE) HasKey ¶
func (te *GraphTraversalE) HasKey(ctx StepContext, s string) *GraphTraversalE
HasKey step
func (*GraphTraversalE) HasNot ¶
func (te *GraphTraversalE) HasNot(ctx StepContext, s string) *GraphTraversalE
HasNot step
func (*GraphTraversalE) InV ¶
func (te *GraphTraversalE) InV(ctx StepContext, s ...interface{}) *GraphTraversalV
InV step, node in
func (*GraphTraversalE) Limit ¶
func (te *GraphTraversalE) Limit(ctx StepContext, s ...interface{}) *GraphTraversalE
Limit step
func (*GraphTraversalE) MarshalJSON ¶
func (te *GraphTraversalE) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversalE) OutV ¶
func (te *GraphTraversalE) OutV(ctx StepContext, s ...interface{}) *GraphTraversalV
OutV step, node out
func (*GraphTraversalE) Range ¶
func (te *GraphTraversalE) Range(ctx StepContext, s ...interface{}) *GraphTraversalE
Range step
func (*GraphTraversalE) SubGraph ¶
func (te *GraphTraversalE) SubGraph(ctx StepContext, s ...interface{}) *GraphTraversal
SubGraph step, node/edge out
func (*GraphTraversalE) Values ¶
func (te *GraphTraversalE) Values() []interface{}
Values returns the graph values
type GraphTraversalRange ¶
type GraphTraversalRange [2]int64
GraphTraversalRange is within a min and a max
func (*GraphTraversalRange) Iterator ¶
func (r *GraphTraversalRange) Iterator() *Iterator
Iterator on the range
type GraphTraversalShortestPath ¶
type GraphTraversalShortestPath struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GraphTraversalShortestPath traversal step shortest path
func (*GraphTraversalShortestPath) Dedup ¶
func (sp *GraphTraversalShortestPath) Dedup(ctx StepContext, s ...interface{}) *GraphTraversalV
Dedup removes duplicated nodes from all the paths
func (*GraphTraversalShortestPath) Error ¶
func (sp *GraphTraversalShortestPath) Error() error
func (*GraphTraversalShortestPath) GetNodes ¶
func (sp *GraphTraversalShortestPath) GetNodes() []*graph.Node
GetNodes : returns all the nodes in single array, so it will used to find flows.
func (*GraphTraversalShortestPath) MarshalJSON ¶
func (sp *GraphTraversalShortestPath) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversalShortestPath) SubGraph ¶
func (sp *GraphTraversalShortestPath) SubGraph(ctx StepContext, s ...interface{}) *GraphTraversal
SubGraph step, node/edge out
func (*GraphTraversalShortestPath) Values ¶
func (sp *GraphTraversalShortestPath) Values() []interface{}
Values returns the graph values
type GraphTraversalStep ¶
type GraphTraversalStep interface { Values() []interface{} MarshalJSON() ([]byte, error) Error() error }
GraphTraversalStep describes a step in the graph containing Values
type GraphTraversalV ¶
type GraphTraversalV struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GraphTraversalV traversal steps on nodes
func NewGraphTraversalV ¶
func NewGraphTraversalV(gt *GraphTraversal, nodes []*graph.Node, err ...error) *GraphTraversalV
NewGraphTraversalV returns a new traversal step
func (*GraphTraversalV) As ¶
func (tv *GraphTraversalV) As(ctx StepContext, keys ...interface{}) *GraphTraversalV
As stores the result of the previous step using the given key
func (*GraphTraversalV) Both ¶
func (tv *GraphTraversalV) Both(ctx StepContext, s ...interface{}) *GraphTraversalV
Both step
func (*GraphTraversalV) BothE ¶
func (tv *GraphTraversalV) BothE(ctx StepContext, s ...interface{}) *GraphTraversalE
BothE : both are edges
func (*GraphTraversalV) Count ¶
func (tv *GraphTraversalV) Count(ctx StepContext, s ...interface{}) *GraphTraversalValue
Count step
func (*GraphTraversalV) Dedup ¶
func (tv *GraphTraversalV) Dedup(ctx StepContext, s ...interface{}) *GraphTraversalV
Dedup step : deduplicate output
func (*GraphTraversalV) Error ¶
func (tv *GraphTraversalV) Error() error
func (*GraphTraversalV) G ¶
func (tv *GraphTraversalV) G() *GraphTraversal
G returns the GraphTraversal
func (*GraphTraversalV) GetNodes ¶
func (tv *GraphTraversalV) GetNodes() (nodes []*graph.Node)
GetNodes returns the step nodes
func (*GraphTraversalV) Has ¶
func (tv *GraphTraversalV) Has(ctx StepContext, s ...interface{}) *GraphTraversalV
Has step produces a AND filter
func (*GraphTraversalV) HasEither ¶
func (tv *GraphTraversalV) HasEither(ctx StepContext, s ...interface{}) *GraphTraversalV
HasEither step produces a OR filter
func (*GraphTraversalV) HasKey ¶
func (tv *GraphTraversalV) HasKey(ctx StepContext, s string) *GraphTraversalV
HasKey step
func (*GraphTraversalV) HasNot ¶
func (tv *GraphTraversalV) HasNot(ctx StepContext, s string) *GraphTraversalV
HasNot step
func (*GraphTraversalV) In ¶
func (tv *GraphTraversalV) In(ctx StepContext, s ...interface{}) *GraphTraversalV
In node step
func (*GraphTraversalV) InE ¶
func (tv *GraphTraversalV) InE(ctx StepContext, s ...interface{}) *GraphTraversalE
InE step of an node
func (*GraphTraversalV) Limit ¶
func (tv *GraphTraversalV) Limit(ctx StepContext, s ...interface{}) *GraphTraversalV
Limit step
func (*GraphTraversalV) MarshalJSON ¶
func (tv *GraphTraversalV) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversalV) Out ¶
func (tv *GraphTraversalV) Out(ctx StepContext, s ...interface{}) *GraphTraversalV
Out step : out of a node step
func (*GraphTraversalV) OutE ¶
func (tv *GraphTraversalV) OutE(ctx StepContext, s ...interface{}) *GraphTraversalE
OutE step : out of an edge
func (*GraphTraversalV) PropertyKeys ¶
func (tv *GraphTraversalV) PropertyKeys(ctx StepContext, keys ...interface{}) *GraphTraversalValue
PropertyKeys returns at this step, all the metadata keys of each metadata
func (*GraphTraversalV) PropertyValueMap ¶
func (tv *GraphTraversalV) PropertyValueMap(ctx StepContext, k ...interface{}) *GraphTraversalValue
PropertyValueMap returns at this step, the values of each metadata selected by the first key
func (*GraphTraversalV) PropertyValues ¶
func (tv *GraphTraversalV) PropertyValues(ctx StepContext, k ...interface{}) *GraphTraversalValue
PropertyValues returns at this step, the values of each metadata selected by the first key
func (*GraphTraversalV) Range ¶
func (tv *GraphTraversalV) Range(ctx StepContext, s ...interface{}) *GraphTraversalV
Range step
func (*GraphTraversalV) Select ¶
func (tv *GraphTraversalV) Select(ctx StepContext, keys ...interface{}) *GraphTraversalV
Select implements the SELECT gremlin step
func (*GraphTraversalV) ShortestPathTo ¶
func (tv *GraphTraversalV) ShortestPathTo(ctx StepContext, m graph.Metadata, e graph.Metadata) *GraphTraversalShortestPath
ShortestPathTo step
func (*GraphTraversalV) Sort ¶
func (tv *GraphTraversalV) Sort(ctx StepContext, keys ...interface{}) *GraphTraversalV
Sort step
func (*GraphTraversalV) SubGraph ¶
func (tv *GraphTraversalV) SubGraph(ctx StepContext, s ...interface{}) *GraphTraversal
SubGraph step, node/edge out
func (*GraphTraversalV) Sum ¶
func (tv *GraphTraversalV) Sum(ctx StepContext, keys ...interface{}) *GraphTraversalValue
Sum step : key returns the sum of the metadata values of the first argument key
func (*GraphTraversalV) Values ¶
func (tv *GraphTraversalV) Values() []interface{}
Values returns the graph values
type GraphTraversalValue ¶
type GraphTraversalValue struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GraphTraversalValue traversal step value
func NewGraphTraversalValue ¶
func NewGraphTraversalValue(gt *GraphTraversal, value interface{}) *GraphTraversalValue
NewGraphTraversalValue creates a new traversal value step
func NewGraphTraversalValueFromError ¶
func NewGraphTraversalValueFromError(err ...error) *GraphTraversalValue
NewGraphTraversalValueFromError creates a new traversal value step
func (*GraphTraversalValue) Dedup ¶
func (t *GraphTraversalValue) Dedup(ctx StepContext, keys ...interface{}) *GraphTraversalValue
Dedup step : deduplicate
func (*GraphTraversalValue) Error ¶
func (t *GraphTraversalValue) Error() error
func (*GraphTraversalValue) Has ¶
func (t *GraphTraversalValue) Has(ctx StepContext, s ...interface{}) *GraphTraversalValue
Has step
func (*GraphTraversalValue) MarshalJSON ¶
func (t *GraphTraversalValue) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversalValue) Values ¶
func (t *GraphTraversalValue) Values() []interface{}
Values return the graph values
type GremlinTraversalContext ¶
type GremlinTraversalContext struct { StepContext StepContext Params []interface{} }
GremlinTraversalContext describes the context of a step
func (*GremlinTraversalContext) Context ¶
func (p *GremlinTraversalContext) Context() *GremlinTraversalContext
Context step
func (*GremlinTraversalContext) ReduceRange ¶
func (p *GremlinTraversalContext) ReduceRange(next GremlinTraversalStep) bool
ReduceRange Context step
type GremlinTraversalExtension ¶
type GremlinTraversalExtension interface { ScanIdent(s string) (Token, bool) ParseStep(t Token, p GremlinTraversalContext) (GremlinTraversalStep, error) }
GremlinTraversalExtension interface for Gremlin language extension
type GremlinTraversalParser ¶
type GremlinTraversalParser struct { insanelock.RWMutex // contains filtered or unexported fields }
GremlinTraversalParser describes a parser of gremlin graph expression The mechanism is based on Reduce and Exec steps
func NewGremlinTraversalParser ¶
func NewGremlinTraversalParser() *GremlinTraversalParser
NewGremlinTraversalParser creates a new gremlin language parser on the graph
func (*GremlinTraversalParser) AddTraversalExtension ¶
func (p *GremlinTraversalParser) AddTraversalExtension(e GremlinTraversalExtension)
AddTraversalExtension registers a new gremlin traversal extension
func (*GremlinTraversalParser) Parse ¶
func (p *GremlinTraversalParser) Parse(r io.Reader) (*GremlinTraversalSequence, error)
Parse the Gremlin language and returns a traversal sequence
type GremlinTraversalScanner ¶
type GremlinTraversalScanner struct {
// contains filtered or unexported fields
}
GremlinTraversalScanner describes a buffer scanner for Gremlin expression extension
func NewGremlinTraversalScanner ¶
func NewGremlinTraversalScanner(r io.Reader, e []GremlinTraversalExtension) *GremlinTraversalScanner
NewGremlinTraversalScanner creates a new Gremlin expression scanner
func (*GremlinTraversalScanner) Scan ¶
func (s *GremlinTraversalScanner) Scan() (tok Token, lit string)
Scan and returns tokens
type GremlinTraversalSequence ¶
type GremlinTraversalSequence struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GremlinTraversalSequence describes a sequence of steps
func (*GremlinTraversalSequence) Exec ¶
func (s *GremlinTraversalSequence) Exec(g *graph.Graph, lockGraph bool) (GraphTraversalStep, error)
Exec sequence step
type GremlinTraversalStep ¶
type GremlinTraversalStep interface { Exec(last GraphTraversalStep) (GraphTraversalStep, error) Reduce(previous GremlinTraversalStep) (GremlinTraversalStep, error) Context() *GremlinTraversalContext }
GremlinTraversalStep describes a step
type GremlinTraversalStepAs ¶
type GremlinTraversalStepAs struct {
GremlinTraversalContext
}
GremlinTraversalStepAs step
func (*GremlinTraversalStepAs) Exec ¶
func (s *GremlinTraversalStepAs) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec As step
func (*GremlinTraversalStepAs) Reduce ¶
func (s *GremlinTraversalStepAs) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce As step
type GremlinTraversalStepBoth ¶
type GremlinTraversalStepBoth struct {
GremlinTraversalContext
}
GremlinTraversalStepBoth step
func (*GremlinTraversalStepBoth) Exec ¶
func (s *GremlinTraversalStepBoth) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Both step
func (*GremlinTraversalStepBoth) Reduce ¶
func (s *GremlinTraversalStepBoth) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Both step
type GremlinTraversalStepBothE ¶
type GremlinTraversalStepBothE struct {
GremlinTraversalContext
}
GremlinTraversalStepBothE step
func (*GremlinTraversalStepBothE) Exec ¶
func (s *GremlinTraversalStepBothE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec BothE step
func (*GremlinTraversalStepBothE) Reduce ¶
func (s *GremlinTraversalStepBothE) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce BothE step
type GremlinTraversalStepBothV ¶
type GremlinTraversalStepBothV struct {
GremlinTraversalContext
}
GremlinTraversalStepBothV step
func (*GremlinTraversalStepBothV) Exec ¶
func (s *GremlinTraversalStepBothV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec BothV step
func (*GremlinTraversalStepBothV) Reduce ¶
func (s *GremlinTraversalStepBothV) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce BothV step
type GremlinTraversalStepContext ¶
type GremlinTraversalStepContext struct {
GremlinTraversalContext
}
GremlinTraversalStepContext step
func (*GremlinTraversalStepContext) Exec ¶
func (s *GremlinTraversalStepContext) Exec(last GraphTraversalStep) (_ GraphTraversalStep, err error)
Exec Context step
func (*GremlinTraversalStepContext) Reduce ¶
func (s *GremlinTraversalStepContext) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Context step
type GremlinTraversalStepCount ¶
type GremlinTraversalStepCount struct {
GremlinTraversalContext
}
GremlinTraversalStepCount step
func (*GremlinTraversalStepCount) Exec ¶
func (s *GremlinTraversalStepCount) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Count step
func (*GremlinTraversalStepCount) Reduce ¶
func (s *GremlinTraversalStepCount) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Count step
type GremlinTraversalStepDedup ¶
type GremlinTraversalStepDedup struct {
GremlinTraversalContext
}
GremlinTraversalStepDedup step
func (*GremlinTraversalStepDedup) Exec ¶
func (s *GremlinTraversalStepDedup) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Dedup step
func (*GremlinTraversalStepDedup) Reduce ¶
func (s *GremlinTraversalStepDedup) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Dedup step
type GremlinTraversalStepE ¶
type GremlinTraversalStepE struct {
GremlinTraversalContext
}
GremlinTraversalStepE step
func (*GremlinTraversalStepE) Exec ¶
func (s *GremlinTraversalStepE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec E step
func (*GremlinTraversalStepE) Reduce ¶
func (s *GremlinTraversalStepE) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce E step
type GremlinTraversalStepG ¶
type GremlinTraversalStepG struct {
GremlinTraversalContext
}
GremlinTraversalStepG step
func (*GremlinTraversalStepG) Exec ¶
func (s *GremlinTraversalStepG) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec G step
func (*GremlinTraversalStepG) Reduce ¶
func (s *GremlinTraversalStepG) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce G step
type GremlinTraversalStepHas ¶
type GremlinTraversalStepHas struct {
GremlinTraversalContext
}
GremlinTraversalStepHas step
func (*GremlinTraversalStepHas) Exec ¶
func (s *GremlinTraversalStepHas) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Has step
func (*GremlinTraversalStepHas) Reduce ¶
func (s *GremlinTraversalStepHas) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Has step
type GremlinTraversalStepHasEither ¶
type GremlinTraversalStepHasEither struct {
GremlinTraversalContext
}
GremlinTraversalStepHasEither step
func (*GremlinTraversalStepHasEither) Exec ¶
func (s *GremlinTraversalStepHasEither) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec HasEither
func (*GremlinTraversalStepHasEither) Reduce ¶
func (s *GremlinTraversalStepHasEither) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce HasEither step
type GremlinTraversalStepHasKey ¶
type GremlinTraversalStepHasKey struct {
GremlinTraversalContext
}
GremlinTraversalStepHasKey step
func (*GremlinTraversalStepHasKey) Exec ¶
func (s *GremlinTraversalStepHasKey) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec HasKey step
func (*GremlinTraversalStepHasKey) Reduce ¶
func (s *GremlinTraversalStepHasKey) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce HasKey step
type GremlinTraversalStepHasNot ¶
type GremlinTraversalStepHasNot struct {
GremlinTraversalContext
}
GremlinTraversalStepHasNot step
func (*GremlinTraversalStepHasNot) Exec ¶
func (s *GremlinTraversalStepHasNot) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec HasNot
func (*GremlinTraversalStepHasNot) Reduce ¶
func (s *GremlinTraversalStepHasNot) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce HasNot step
type GremlinTraversalStepIn ¶
type GremlinTraversalStepIn struct {
GremlinTraversalContext
}
GremlinTraversalStepIn step
func (*GremlinTraversalStepIn) Exec ¶
func (s *GremlinTraversalStepIn) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec In step
func (*GremlinTraversalStepIn) Reduce ¶
func (s *GremlinTraversalStepIn) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce In step
type GremlinTraversalStepInE ¶
type GremlinTraversalStepInE struct {
GremlinTraversalContext
}
GremlinTraversalStepInE step
func (*GremlinTraversalStepInE) Exec ¶
func (s *GremlinTraversalStepInE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec InE step
func (*GremlinTraversalStepInE) Reduce ¶
func (s *GremlinTraversalStepInE) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce InE step
type GremlinTraversalStepInV ¶
type GremlinTraversalStepInV struct {
GremlinTraversalContext
}
GremlinTraversalStepInV step
func (*GremlinTraversalStepInV) Exec ¶
func (s *GremlinTraversalStepInV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec InV step
func (*GremlinTraversalStepInV) Reduce ¶
func (s *GremlinTraversalStepInV) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce InV step
type GremlinTraversalStepKeys ¶
type GremlinTraversalStepKeys struct {
GremlinTraversalContext
}
GremlinTraversalStepKeys step
func (*GremlinTraversalStepKeys) Exec ¶
func (s *GremlinTraversalStepKeys) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Keys step
func (*GremlinTraversalStepKeys) Reduce ¶
func (s *GremlinTraversalStepKeys) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Keys step
type GremlinTraversalStepLimit ¶
type GremlinTraversalStepLimit struct {
GremlinTraversalContext
}
GremlinTraversalStepLimit step
func (*GremlinTraversalStepLimit) Exec ¶
func (s *GremlinTraversalStepLimit) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Limit step
func (*GremlinTraversalStepLimit) Reduce ¶
func (s *GremlinTraversalStepLimit) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Limit step
type GremlinTraversalStepOut ¶
type GremlinTraversalStepOut struct {
GremlinTraversalContext
}
GremlinTraversalStepOut step
func (*GremlinTraversalStepOut) Exec ¶
func (s *GremlinTraversalStepOut) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Out step
func (*GremlinTraversalStepOut) Reduce ¶
func (s *GremlinTraversalStepOut) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Out step
type GremlinTraversalStepOutE ¶
type GremlinTraversalStepOutE struct {
GremlinTraversalContext
}
GremlinTraversalStepOutE step
func (*GremlinTraversalStepOutE) Exec ¶
func (s *GremlinTraversalStepOutE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec OutE step
func (*GremlinTraversalStepOutE) Reduce ¶
func (s *GremlinTraversalStepOutE) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce OutE step
type GremlinTraversalStepOutV ¶
type GremlinTraversalStepOutV struct {
GremlinTraversalContext
}
GremlinTraversalStepOutV step
func (*GremlinTraversalStepOutV) Exec ¶
func (s *GremlinTraversalStepOutV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec OutV step
func (*GremlinTraversalStepOutV) Reduce ¶
func (s *GremlinTraversalStepOutV) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce OutV step
type GremlinTraversalStepRange ¶
type GremlinTraversalStepRange struct {
GremlinTraversalContext
}
GremlinTraversalStepRange step
func (*GremlinTraversalStepRange) Exec ¶
func (s *GremlinTraversalStepRange) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Range step
func (*GremlinTraversalStepRange) Reduce ¶
func (s *GremlinTraversalStepRange) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Range step
type GremlinTraversalStepSelect ¶
type GremlinTraversalStepSelect struct {
GremlinTraversalContext
}
GremlinTraversalStepSelect step
func (*GremlinTraversalStepSelect) Exec ¶
func (s *GremlinTraversalStepSelect) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Select step
func (*GremlinTraversalStepSelect) Reduce ¶
func (s *GremlinTraversalStepSelect) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce As step
type GremlinTraversalStepShortestPathTo ¶
type GremlinTraversalStepShortestPathTo struct {
GremlinTraversalContext
}
GremlinTraversalStepShortestPathTo step
func (*GremlinTraversalStepShortestPathTo) Exec ¶
func (s *GremlinTraversalStepShortestPathTo) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec ShortestPathTo step
func (*GremlinTraversalStepShortestPathTo) Reduce ¶
func (s *GremlinTraversalStepShortestPathTo) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce ShortestPathTo step
type GremlinTraversalStepSort ¶
type GremlinTraversalStepSort struct {
GremlinTraversalContext
}
GremlinTraversalStepSort step
func (*GremlinTraversalStepSort) Exec ¶
func (s *GremlinTraversalStepSort) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Sort step
func (*GremlinTraversalStepSort) Reduce ¶
func (s *GremlinTraversalStepSort) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Sort step
type GremlinTraversalStepSubGraph ¶
type GremlinTraversalStepSubGraph struct {
GremlinTraversalContext
}
GremlinTraversalStepSubGraph step
func (*GremlinTraversalStepSubGraph) Exec ¶
func (s *GremlinTraversalStepSubGraph) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec SubGraph step
func (*GremlinTraversalStepSubGraph) Reduce ¶
func (s *GremlinTraversalStepSubGraph) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce SubGraph step
type GremlinTraversalStepSum ¶
type GremlinTraversalStepSum struct {
GremlinTraversalContext
}
GremlinTraversalStepSum step
func (*GremlinTraversalStepSum) Exec ¶
func (s *GremlinTraversalStepSum) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Sum step
func (*GremlinTraversalStepSum) Reduce ¶
func (s *GremlinTraversalStepSum) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Sum step
type GremlinTraversalStepV ¶
type GremlinTraversalStepV struct {
GremlinTraversalContext
}
GremlinTraversalStepV step
func (*GremlinTraversalStepV) Exec ¶
func (s *GremlinTraversalStepV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec V step
func (*GremlinTraversalStepV) Reduce ¶
func (s *GremlinTraversalStepV) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce V step
type GremlinTraversalStepValueMap ¶
type GremlinTraversalStepValueMap struct {
GremlinTraversalContext
}
GremlinTraversalStepValueMap step
func (*GremlinTraversalStepValueMap) Exec ¶
func (s *GremlinTraversalStepValueMap) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec ValueMap step
func (*GremlinTraversalStepValueMap) Reduce ¶
func (s *GremlinTraversalStepValueMap) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce ValueMap step
type GremlinTraversalStepValues ¶
type GremlinTraversalStepValues struct {
GremlinTraversalContext
}
GremlinTraversalStepValues step
func (*GremlinTraversalStepValues) Exec ¶
func (s *GremlinTraversalStepValues) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Values step
func (*GremlinTraversalStepValues) Reduce ¶
func (s *GremlinTraversalStepValues) Reduce(next GremlinTraversalStep) (GremlinTraversalStep, error)
Reduce Values step
type IPV4RangeElementMatcher ¶
type IPV4RangeElementMatcher struct {
// contains filtered or unexported fields
}
IPV4RangeElementMatcher matches ipv4 contained in an ipv4 range
type InsideElementMatcher ¶
type InsideElementMatcher struct {
// contains filtered or unexported fields
}
InsideElementMatcher describes a list of metadata that match inside the range from, to
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator describes a int64 iterator
func NewIterator ¶
NewIterator creates a new iterator based on (at, from, to) parameters
type LTEElementMatcher ¶
type LTEElementMatcher struct {
// contains filtered or unexported fields
}
LTEElementMatcher describes a list of metadata that match Less Than Equal
type LTElementMatcher ¶
type LTElementMatcher struct {
// contains filtered or unexported fields
}
LTElementMatcher describes a list of metadata that match LessThan
type NEEElementMatcher ¶
type NEEElementMatcher struct {
// contains filtered or unexported fields
}
NEEElementMatcher describes a list of metadata that match NotEqual
type NEElementMatcher ¶
type NEElementMatcher struct {
// contains filtered or unexported fields
}
NEElementMatcher describes a list of metadata that match NotEqual and NotNull
type OutsideElementMatcher ¶
type OutsideElementMatcher struct {
// contains filtered or unexported fields
}
OutsideElementMatcher describes a list of metadata that match outside the range from, to
type RegexElementMatcher ¶
type RegexElementMatcher struct {
// contains filtered or unexported fields
}
RegexElementMatcher describes a list of metadata that match a regex
type Since ¶
type Since struct {
Seconds int64
}
Since describes a list of metadata that match since seconds
type StepContext ¶
type StepContext struct {
PaginationRange *GraphTraversalRange
}
StepContext a step within a context
type Token ¶
type Token int
Token represents a lexical token.
const ( // Special tokens ILLEGAL Token = iota EOF WS // Literals IDENT // Misc characters COMMA DOT LEFTPARENTHESIS RIGHTPARENTHESIS STRING NUMBER // Keywords G V E HAS HASKEY HASNOT HASEITHER OUT IN OUTV INV BOTHV OUTE INE BOTHE DEDUP WITHIN WITHOUT METADATA SHORTESTPATHTO NE NEE BOTH CONTEXT REGEX LT GT LTE GTE INSIDE OUTSIDE BETWEEN COUNT RANGE LIMIT SORT VALUES VALUEMAP KEYS SUM ASC DESC IPV4RANGE SUBGRAPH FOREVER NOW AS SELECT TRUE FALSE )
Default language token, extension token start at 1000
type WithinElementMatcher ¶
type WithinElementMatcher struct {
List []interface{}
}
WithinElementMatcher describes a list of metadata that should match (within)
type WithoutElementMatcher ¶
type WithoutElementMatcher struct {
List []interface{}
}
WithoutElementMatcher describes a list of metadata that shouldn't match (without)