traversal

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrExecutionError execution error
	ErrExecutionError = errors.New("Error while executing the query")
)

Functions

func KeyValueToFilter added in v0.16.0

func KeyValueToFilter(k string, v interface{}) (*filters.Filter, error)

KeyValueToFilter creates a filter for a key with a fixed value or a predicate

func ParamsToFilter added in v0.10.0

func ParamsToFilter(filterOp filters.BoolFilterOp, s ...interface{}) (*filters.Filter, error)

ParamsToFilter converts a slice to a filter

func ParamsToMetadataFilter added in v0.16.0

func ParamsToMetadataFilter(filterOp filters.BoolFilterOp, s ...interface{}) (graph.ElementMatcher, error)

ParamsToMetadataFilter converts a slice to a ElementMatcher

func ParseSortParameter added in v0.10.0

func ParseSortParameter(keys ...interface{}) (order common.SortOrder, sortBy string, err error)

ParseSortParameter helper

Types

type BetweenElementMatcher added in v0.21.0

type BetweenElementMatcher struct {
	// contains filtered or unexported fields
}

BetweenElementMatcher describes a list of metadata that match between the range from, to

func Between added in v0.5.0

func Between(from interface{}, to interface{}) *BetweenElementMatcher

Between predicate

type ForeverPredicate added in v0.18.0

type ForeverPredicate struct{}

ForeverPredicate describes a entire time limit in the history

type GTEElementMatcher added in v0.21.0

type GTEElementMatcher struct {
	// contains filtered or unexported fields
}

GTEElementMatcher describes a list of metadata that match Greater Than Equal

func Gte added in v0.5.0

func Gte(s interface{}) *GTEElementMatcher

Gte predicate

type GTElementMatcher added in v0.21.0

type GTElementMatcher struct {
	// contains filtered or unexported fields
}

GTElementMatcher describes a list of metadata that match GreaterThan

func Gt added in v0.5.0

func Gt(s interface{}) *GTElementMatcher

Gt predicate

type GraphTraversal

type GraphTraversal struct {
	Graph *graph.Graph
	// contains filtered or unexported fields
}

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 added in v0.12.0

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) RLock added in v0.10.0

func (t *GraphTraversal) RLock()

RLock reads lock the graph

func (*GraphTraversal) RUnlock added in v0.10.0

func (t *GraphTraversal) RUnlock()

RUnlock reads unlock the graph

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 added in v0.19.0

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 added in v0.12.0

func NewGraphTraversalE(gt *GraphTraversal, edges []*graph.Edge, err ...error) *GraphTraversalE

NewGraphTraversalE creates a new graph traversal Edges

func (*GraphTraversalE) BothV added in v0.13.0

func (te *GraphTraversalE) BothV(ctx StepContext, s ...interface{}) *GraphTraversalV

BothV step, nodes in/out

func (*GraphTraversalE) Count added in v0.5.0

func (te *GraphTraversalE) Count(ctx StepContext, s ...interface{}) *GraphTraversalValue

Count step

func (*GraphTraversalE) Dedup

func (te *GraphTraversalE) Dedup(ctx StepContext, keys ...interface{}) *GraphTraversalE

Dedup step : deduplicate

func (*GraphTraversalE) Error

func (te *GraphTraversalE) Error() error

func (*GraphTraversalE) G added in v0.19.0

G returns the GraphTraversal

func (*GraphTraversalE) Has

func (te *GraphTraversalE) Has(ctx StepContext, s ...interface{}) *GraphTraversalE

Has step

func (*GraphTraversalE) HasEither added in v0.21.0

func (te *GraphTraversalE) HasEither(ctx StepContext, s ...interface{}) *GraphTraversalE

HasEither step

func (*GraphTraversalE) HasKey added in v0.10.0

func (te *GraphTraversalE) HasKey(ctx StepContext, s string) *GraphTraversalE

HasKey step

func (*GraphTraversalE) HasNot added in v0.10.0

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 added in v0.6.0

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 added in v0.6.0

func (te *GraphTraversalE) Range(ctx StepContext, s ...interface{}) *GraphTraversalE

Range step

func (*GraphTraversalE) SubGraph added in v0.13.0

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 added in v0.6.0

type GraphTraversalRange [2]int64

GraphTraversalRange is within a min and a max

func (*GraphTraversalRange) Iterator added in v0.6.0

func (r *GraphTraversalRange) Iterator() *common.Iterator

Iterator on the range

type GraphTraversalShortestPath

type GraphTraversalShortestPath struct {
	GraphTraversal *GraphTraversal
	// contains filtered or unexported fields
}

GraphTraversalShortestPath traversal step shortest path

func (*GraphTraversalShortestPath) Error

func (sp *GraphTraversalShortestPath) Error() error

func (*GraphTraversalShortestPath) GetNodes added in v0.11.0

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 added in v0.14.0

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 added in v0.19.0

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 added in v0.12.0

func (tv *GraphTraversalV) BothE(ctx StepContext, s ...interface{}) *GraphTraversalE

BothE : both are edges

func (*GraphTraversalV) Count added in v0.5.0

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 added in v0.19.0

G returns the GraphTraversal

func (*GraphTraversalV) GetNodes added in v0.8.0

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 added in v0.21.0

func (tv *GraphTraversalV) HasEither(ctx StepContext, s ...interface{}) *GraphTraversalV

HasEither step produces a OR filter

func (*GraphTraversalV) HasKey added in v0.10.0

func (tv *GraphTraversalV) HasKey(ctx StepContext, s string) *GraphTraversalV

HasKey step

func (*GraphTraversalV) HasNot added in v0.10.0

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 added in v0.6.0

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 added in v0.8.0

func (tv *GraphTraversalV) PropertyKeys(ctx StepContext, keys ...interface{}) *GraphTraversalValue

PropertyKeys returns at this step, all the metadata keys of each metadata

func (*GraphTraversalV) PropertyValues added in v0.8.0

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 added in v0.6.0

func (tv *GraphTraversalV) Range(ctx StepContext, s ...interface{}) *GraphTraversalV

Range step

func (*GraphTraversalV) Select added in v0.19.0

func (tv *GraphTraversalV) Select(ctx StepContext, keys ...interface{}) *GraphTraversalV

Select implements the SELECT gremlin step

func (*GraphTraversalV) ShortestPathTo

ShortestPathTo step

func (*GraphTraversalV) Sort added in v0.10.0

func (tv *GraphTraversalV) Sort(ctx StepContext, keys ...interface{}) *GraphTraversalV

Sort step

func (*GraphTraversalV) SubGraph added in v0.13.0

func (tv *GraphTraversalV) SubGraph(ctx StepContext, s ...interface{}) *GraphTraversal

SubGraph step, node/edge out

func (*GraphTraversalV) Sum added in v0.8.0

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 added in v0.5.0

type GraphTraversalValue struct {
	GraphTraversal *GraphTraversal
	// contains filtered or unexported fields
}

GraphTraversalValue traversal step value

func NewGraphTraversalValue added in v0.5.0

func NewGraphTraversalValue(gt *GraphTraversal, value interface{}) *GraphTraversalValue

NewGraphTraversalValue creates a new traversal value step

func NewGraphTraversalValueFromError added in v0.17.0

func NewGraphTraversalValueFromError(err ...error) *GraphTraversalValue

NewGraphTraversalValueFromError creates a new traversal value step

func (*GraphTraversalValue) Dedup added in v0.8.0

func (t *GraphTraversalValue) Dedup(ctx StepContext, keys ...interface{}) *GraphTraversalValue

Dedup step : deduplicate

func (*GraphTraversalValue) Error added in v0.5.0

func (t *GraphTraversalValue) Error() error

func (*GraphTraversalValue) MarshalJSON added in v0.5.0

func (t *GraphTraversalValue) MarshalJSON() ([]byte, error)

MarshalJSON serialize in JSON

func (*GraphTraversalValue) Values added in v0.5.0

func (t *GraphTraversalValue) Values() []interface{}

Values return the graph values

type GremlinTraversalContext added in v0.6.0

type GremlinTraversalContext struct {
	StepContext StepContext
	Params      []interface{}
}

GremlinTraversalContext describes the context of a step

func (*GremlinTraversalContext) Context added in v0.6.0

Context step

func (*GremlinTraversalContext) ReduceRange added in v0.6.0

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 {
	common.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

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

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 added in v0.19.0

type GremlinTraversalStepAs struct {
	GremlinTraversalContext
}

GremlinTraversalStepAs step

func (*GremlinTraversalStepAs) Exec added in v0.19.0

Exec As step

func (*GremlinTraversalStepAs) Reduce added in v0.19.0

Reduce As step

type GremlinTraversalStepBoth added in v0.5.0

type GremlinTraversalStepBoth struct {
	GremlinTraversalContext
}

GremlinTraversalStepBoth step

func (*GremlinTraversalStepBoth) Exec added in v0.5.0

Exec Both step

func (*GremlinTraversalStepBoth) Reduce added in v0.5.0

Reduce Both step

type GremlinTraversalStepBothE added in v0.12.0

type GremlinTraversalStepBothE struct {
	GremlinTraversalContext
}

GremlinTraversalStepBothE step

func (*GremlinTraversalStepBothE) Exec added in v0.12.0

Exec BothE step

func (*GremlinTraversalStepBothE) Reduce added in v0.12.0

Reduce BothE step

type GremlinTraversalStepBothV added in v0.13.0

type GremlinTraversalStepBothV struct {
	GremlinTraversalContext
}

GremlinTraversalStepBothV step

func (*GremlinTraversalStepBothV) Exec added in v0.13.0

Exec BothV step

func (*GremlinTraversalStepBothV) Reduce added in v0.13.0

Reduce BothV step

type GremlinTraversalStepContext added in v0.5.0

type GremlinTraversalStepContext struct {
	GremlinTraversalContext
}

GremlinTraversalStepContext step

func (*GremlinTraversalStepContext) Exec added in v0.5.0

Exec Context step

func (*GremlinTraversalStepContext) Reduce added in v0.5.0

Reduce Context step

type GremlinTraversalStepCount added in v0.5.0

type GremlinTraversalStepCount struct {
	GremlinTraversalContext
}

GremlinTraversalStepCount step

func (*GremlinTraversalStepCount) Exec added in v0.5.0

Exec Count step

func (*GremlinTraversalStepCount) Reduce added in v0.5.0

Reduce Count step

type GremlinTraversalStepDedup added in v0.5.0

type GremlinTraversalStepDedup struct {
	GremlinTraversalContext
}

GremlinTraversalStepDedup step

func (*GremlinTraversalStepDedup) Exec added in v0.5.0

Exec Dedup step

func (*GremlinTraversalStepDedup) Reduce added in v0.5.0

Reduce Dedup step

type GremlinTraversalStepE added in v0.5.0

type GremlinTraversalStepE struct {
	GremlinTraversalContext
}

GremlinTraversalStepE step

func (*GremlinTraversalStepE) Exec added in v0.12.0

Exec E step

func (*GremlinTraversalStepE) Reduce added in v0.12.0

Reduce E step

type GremlinTraversalStepG added in v0.5.0

type GremlinTraversalStepG struct {
	GremlinTraversalContext
}

GremlinTraversalStepG step

func (*GremlinTraversalStepG) Exec added in v0.5.0

Exec G step

func (*GremlinTraversalStepG) Reduce added in v0.5.0

Reduce G step

type GremlinTraversalStepHas added in v0.5.0

type GremlinTraversalStepHas struct {
	GremlinTraversalContext
}

GremlinTraversalStepHas step

func (*GremlinTraversalStepHas) Exec added in v0.5.0

Exec Has step

func (*GremlinTraversalStepHas) Reduce added in v0.5.0

Reduce Has step

type GremlinTraversalStepHasEither added in v0.21.0

type GremlinTraversalStepHasEither struct {
	GremlinTraversalContext
}

GremlinTraversalStepHasEither step

func (*GremlinTraversalStepHasEither) Exec added in v0.21.0

Exec HasEither

func (*GremlinTraversalStepHasEither) Reduce added in v0.21.0

Reduce HasEither step

type GremlinTraversalStepHasKey added in v0.10.0

type GremlinTraversalStepHasKey struct {
	GremlinTraversalContext
}

GremlinTraversalStepHasKey step

func (*GremlinTraversalStepHasKey) Exec added in v0.10.0

Exec HasKey step

func (*GremlinTraversalStepHasKey) Reduce added in v0.10.0

Reduce HasKey step

type GremlinTraversalStepHasNot added in v0.10.0

type GremlinTraversalStepHasNot struct {
	GremlinTraversalContext
}

GremlinTraversalStepHasNot step

func (*GremlinTraversalStepHasNot) Exec added in v0.10.0

Exec HasNot

func (*GremlinTraversalStepHasNot) Reduce added in v0.10.0

Reduce HasNot step

type GremlinTraversalStepIn added in v0.5.0

type GremlinTraversalStepIn struct {
	GremlinTraversalContext
}

GremlinTraversalStepIn step

func (*GremlinTraversalStepIn) Exec added in v0.5.0

Exec In step

func (*GremlinTraversalStepIn) Reduce added in v0.5.0

Reduce In step

type GremlinTraversalStepInE added in v0.5.0

type GremlinTraversalStepInE struct {
	GremlinTraversalContext
}

GremlinTraversalStepInE step

func (*GremlinTraversalStepInE) Exec added in v0.5.0

Exec InE step

func (*GremlinTraversalStepInE) Reduce added in v0.5.0

Reduce InE step

type GremlinTraversalStepInV added in v0.5.0

type GremlinTraversalStepInV struct {
	GremlinTraversalContext
}

GremlinTraversalStepInV step

func (*GremlinTraversalStepInV) Exec added in v0.5.0

Exec InV step

func (*GremlinTraversalStepInV) Reduce added in v0.5.0

Reduce InV step

type GremlinTraversalStepKeys added in v0.8.0

type GremlinTraversalStepKeys struct {
	GremlinTraversalContext
}

GremlinTraversalStepKeys step

func (*GremlinTraversalStepKeys) Exec added in v0.8.0

Exec Keys step

func (*GremlinTraversalStepKeys) Reduce added in v0.8.0

Reduce Keys step

type GremlinTraversalStepLimit added in v0.6.0

type GremlinTraversalStepLimit struct {
	GremlinTraversalContext
}

GremlinTraversalStepLimit step

func (*GremlinTraversalStepLimit) Exec added in v0.6.0

Exec Limit step

func (*GremlinTraversalStepLimit) Reduce added in v0.6.0

Reduce Limit step

type GremlinTraversalStepOut added in v0.5.0

type GremlinTraversalStepOut struct {
	GremlinTraversalContext
}

GremlinTraversalStepOut step

func (*GremlinTraversalStepOut) Exec added in v0.5.0

Exec Out step

func (*GremlinTraversalStepOut) Reduce added in v0.5.0

Reduce Out step

type GremlinTraversalStepOutE added in v0.5.0

type GremlinTraversalStepOutE struct {
	GremlinTraversalContext
}

GremlinTraversalStepOutE step

func (*GremlinTraversalStepOutE) Exec added in v0.5.0

Exec OutE step

func (*GremlinTraversalStepOutE) Reduce added in v0.5.0

Reduce OutE step

type GremlinTraversalStepOutV added in v0.5.0

type GremlinTraversalStepOutV struct {
	GremlinTraversalContext
}

GremlinTraversalStepOutV step

func (*GremlinTraversalStepOutV) Exec added in v0.5.0

Exec OutV step

func (*GremlinTraversalStepOutV) Reduce added in v0.5.0

Reduce OutV step

type GremlinTraversalStepRange added in v0.6.0

type GremlinTraversalStepRange struct {
	GremlinTraversalContext
}

GremlinTraversalStepRange step

func (*GremlinTraversalStepRange) Exec added in v0.6.0

Exec Range step

func (*GremlinTraversalStepRange) Reduce added in v0.6.0

Reduce Range step

type GremlinTraversalStepSelect added in v0.19.0

type GremlinTraversalStepSelect struct {
	GremlinTraversalContext
}

GremlinTraversalStepSelect step

func (*GremlinTraversalStepSelect) Exec added in v0.19.0

Exec Select step

func (*GremlinTraversalStepSelect) Reduce added in v0.19.0

Reduce As step

type GremlinTraversalStepShortestPathTo added in v0.5.0

type GremlinTraversalStepShortestPathTo struct {
	GremlinTraversalContext
}

GremlinTraversalStepShortestPathTo step

func (*GremlinTraversalStepShortestPathTo) Exec added in v0.5.0

Exec ShortestPathTo step

func (*GremlinTraversalStepShortestPathTo) Reduce added in v0.5.0

Reduce ShortestPathTo step

type GremlinTraversalStepSort added in v0.7.0

type GremlinTraversalStepSort struct {
	GremlinTraversalContext
}

GremlinTraversalStepSort step

func (*GremlinTraversalStepSort) Exec added in v0.7.0

Exec Sort step

func (*GremlinTraversalStepSort) Reduce added in v0.7.0

Reduce Sort step

type GremlinTraversalStepSubGraph added in v0.13.0

type GremlinTraversalStepSubGraph struct {
	GremlinTraversalContext
}

GremlinTraversalStepSubGraph step

func (*GremlinTraversalStepSubGraph) Exec added in v0.13.0

Exec SubGraph step

func (*GremlinTraversalStepSubGraph) Reduce added in v0.13.0

Reduce SubGraph step

type GremlinTraversalStepSum added in v0.8.0

type GremlinTraversalStepSum struct {
	GremlinTraversalContext
}

GremlinTraversalStepSum step

func (*GremlinTraversalStepSum) Exec added in v0.8.0

Exec Sum step

func (*GremlinTraversalStepSum) Reduce added in v0.8.0

Reduce Sum step

type GremlinTraversalStepV added in v0.5.0

type GremlinTraversalStepV struct {
	GremlinTraversalContext
}

GremlinTraversalStepV step

func (*GremlinTraversalStepV) Exec added in v0.5.0

Exec V step

func (*GremlinTraversalStepV) Reduce added in v0.5.0

Reduce V step

type GremlinTraversalStepValues added in v0.8.0

type GremlinTraversalStepValues struct {
	GremlinTraversalContext
}

GremlinTraversalStepValues step

func (*GremlinTraversalStepValues) Exec added in v0.8.0

Exec Values step

func (*GremlinTraversalStepValues) Reduce added in v0.8.0

Reduce Values step

type IPV4RangeElementMatcher added in v0.21.0

type IPV4RangeElementMatcher struct {
	// contains filtered or unexported fields
}

IPV4RangeElementMatcher matches ipv4 contained in an ipv4 range

func IPV4Range added in v0.13.0

func IPV4Range(s interface{}) *IPV4RangeElementMatcher

IPV4Range predicate

type InsideElementMatcher added in v0.21.0

type InsideElementMatcher struct {
	// contains filtered or unexported fields
}

InsideElementMatcher describes a list of metadata that match inside the range from, to

func Inside added in v0.5.0

func Inside(from, to interface{}) *InsideElementMatcher

Inside predicate

type LTEElementMatcher added in v0.21.0

type LTEElementMatcher struct {
	// contains filtered or unexported fields
}

LTEElementMatcher describes a list of metadata that match Less Than Equal

func Lte added in v0.5.0

func Lte(s interface{}) *LTEElementMatcher

Lte predicate

type LTElementMatcher added in v0.21.0

type LTElementMatcher struct {
	// contains filtered or unexported fields
}

LTElementMatcher describes a list of metadata that match LessThan

func Lt added in v0.5.0

func Lt(s interface{}) *LTElementMatcher

Lt predicate

type NEElementMatcher added in v0.21.0

type NEElementMatcher struct {
	// contains filtered or unexported fields
}

NEElementMatcher describes a list of metadata that match NotEqual

func Ne

func Ne(s interface{}) *NEElementMatcher

Ne predicate

type NowPredicate added in v0.18.0

type NowPredicate struct{}

NowPredicate describes a current time in the history

type OutsideElementMatcher added in v0.21.0

type OutsideElementMatcher struct {
	// contains filtered or unexported fields
}

OutsideElementMatcher describes a list of metadata that match outside the range from, to

func Outside added in v0.5.0

func Outside(from, to interface{}) *OutsideElementMatcher

Outside predicate

type RegexElementMatcher added in v0.21.0

type RegexElementMatcher struct {
	// contains filtered or unexported fields
}

RegexElementMatcher describes a list of metadata that match a regex

func Regex

func Regex(regex string) *RegexElementMatcher

Regex predicate

type Since added in v0.8.0

type Since struct {
	Seconds int64
}

Since describes a list of metadata that match since seconds

type StepContext added in v0.20.0

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
	BOTH
	CONTEXT
	REGEX
	LT
	GT
	LTE
	GTE
	INSIDE
	OUTSIDE
	BETWEEN
	COUNT
	RANGE
	LIMIT
	SORT
	VALUES
	KEYS
	SUM
	ASC
	DESC
	IPV4RANGE
	SUBGRAPH
	FOREVER
	NOW
	AS
	SELECT

	TRUE
	FALSE
)

Default language token, extension token start at 1000

type WithinElementMatcher added in v0.21.0

type WithinElementMatcher struct {
	List []interface{}
}

WithinElementMatcher describes a list of metadata that should match (within)

func Within

func Within(s ...interface{}) *WithinElementMatcher

Within predicate

type WithoutElementMatcher added in v0.21.0

type WithoutElementMatcher struct {
	// contains filtered or unexported fields
}

WithoutElementMatcher describes a list of metadata that shouldn't match (without)

func Without

func Without(s ...interface{}) *WithoutElementMatcher

Without predicate

Jump to

Keyboard shortcuts

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