Documentation ¶
Index ¶
- func IndexStartOptimize(pipe []*gripql.GraphStatement) []*gripql.GraphStatement
- func NewCompiler(db gdbi.GraphInterface, optimizers ...QueryOptimizer) gdbi.Compiler
- func StatementProcessor(gs *gripql.GraphStatement, db gdbi.GraphInterface, ps *pipeline.State) (gdbi.Processor, error)
- func Validate(stmts []*gripql.GraphStatement, opts *gdbi.CompileOptions) error
- type Count
- type DefaultCompiler
- type DefaultPipeline
- type Distinct
- type Fields
- type Has
- type HasID
- type HasKey
- type HasLabel
- type InE
- type Limit
- type LookupEdgeAdjIn
- type LookupEdgeAdjOut
- type LookupEdges
- type LookupVertexAdjIn
- type LookupVertexAdjOut
- type LookupVerts
- type LookupVertsIndex
- type MarkSelect
- type Marker
- type OutE
- type Path
- type QueryOptimizer
- type Range
- type Render
- type Selector
- type Skip
- type Unwind
- type ValueIncrement
- type ValueSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexStartOptimize ¶
func IndexStartOptimize(pipe []*gripql.GraphStatement) []*gripql.GraphStatement
IndexStartOptimize looks at processor pipeline for queries like V().Has(Eq("$.label", "Person")) and V().Has(Eq("$.gid", "1")), streamline into a single index lookup
func NewCompiler ¶
func NewCompiler(db gdbi.GraphInterface, optimizers ...QueryOptimizer) gdbi.Compiler
NewCompiler creates a new compiler that runs using the provided GraphInterface
func StatementProcessor ¶
func StatementProcessor(gs *gripql.GraphStatement, db gdbi.GraphInterface, ps *pipeline.State) (gdbi.Processor, error)
func Validate ¶
func Validate(stmts []*gripql.GraphStatement, opts *gdbi.CompileOptions) error
Validate checks pipeline for chains of statements that won't work
Types ¶
type DefaultCompiler ¶
type DefaultCompiler struct {
// contains filtered or unexported fields
}
DefaultCompiler is the core compiler that works with default graph interface
func (DefaultCompiler) Compile ¶
func (comp DefaultCompiler) Compile(stmts []*gripql.GraphStatement, opts *gdbi.CompileOptions) (gdbi.Pipeline, error)
Compile take set of statments and turns them into a runnable pipeline
type DefaultPipeline ¶
type DefaultPipeline struct {
// contains filtered or unexported fields
}
DefaultPipeline a set of runnable query operations
func NewPipeline ¶
func NewPipeline(graph gdbi.GraphInterface, procs []gdbi.Processor, ps *pipeline.State) *DefaultPipeline
func (*DefaultPipeline) DataType ¶
func (pipe *DefaultPipeline) DataType() gdbi.DataType
DataType return the datatype
func (*DefaultPipeline) Graph ¶
func (pipe *DefaultPipeline) Graph() gdbi.GraphInterface
Graph gets the processor graph interface
func (*DefaultPipeline) MarkTypes ¶
func (pipe *DefaultPipeline) MarkTypes() map[string]gdbi.DataType
MarkTypes get the mark types
func (*DefaultPipeline) Processors ¶
func (pipe *DefaultPipeline) Processors() []gdbi.Processor
Processors gets the list of processors
type Distinct ¶
type Distinct struct {
// contains filtered or unexported fields
}
Distinct only returns unique objects as defined by the set of select features
type Fields ¶
type Fields struct {
// contains filtered or unexported fields
}
Fields selects fields from current element
type HasID ¶
type HasID struct {
// contains filtered or unexported fields
}
HasID filters elements based on their id.
type HasKey ¶
type HasKey struct {
// contains filtered or unexported fields
}
HasKey filters elements based on whether it has one or more properties.
type HasLabel ¶
type HasLabel struct {
// contains filtered or unexported fields
}
HasLabel filters elements based on their label.
type InE ¶
type InE struct {
// contains filtered or unexported fields
}
InE finds the incoming edges
type Limit ¶
type Limit struct {
// contains filtered or unexported fields
}
Limit limits incoming values to count
type LookupEdgeAdjIn ¶
type LookupEdgeAdjIn struct {
// contains filtered or unexported fields
}
LookupEdgeAdjIn finds incoming edge
type LookupEdgeAdjOut ¶
type LookupEdgeAdjOut struct {
// contains filtered or unexported fields
}
LookupEdgeAdjOut finds out edge
type LookupEdges ¶
type LookupEdges struct {
// contains filtered or unexported fields
}
LookupEdges starts query by looking up edges
type LookupVertexAdjIn ¶
type LookupVertexAdjIn struct {
// contains filtered or unexported fields
}
LookupVertexAdjIn finds incoming vertex
type LookupVertexAdjOut ¶
type LookupVertexAdjOut struct {
// contains filtered or unexported fields
}
LookupVertexAdjOut finds out vertex
type LookupVerts ¶
type LookupVerts struct {
// contains filtered or unexported fields
}
LookupVerts starts query by looking on vertices
type LookupVertsIndex ¶
type LookupVertsIndex struct {
// contains filtered or unexported fields
}
LookupVertsIndex look up vertices by indexed based feature
type MarkSelect ¶
type MarkSelect struct {
// contains filtered or unexported fields
}
MarkSelect moves to selected mark
type Marker ¶
type Marker struct {
// contains filtered or unexported fields
}
Marker marks the current element
type OutE ¶
type OutE struct {
// contains filtered or unexported fields
}
OutE finds the outgoing edges
type Path ¶
type Path struct {
Template interface{} //this isn't really used yet.
}
Path tells system to return path data
type QueryOptimizer ¶
type QueryOptimizer func(pipe []*gripql.GraphStatement) []*gripql.GraphStatement
type Range ¶
type Range struct {
// contains filtered or unexported fields
}
Range limits the number of travelers returned. When the low-end of the range is not met, objects are continued to be iterated. When within the low (inclusive) and high (exclusive) range, traversers are emitted. When above the high range, the traversal breaks out of iteration. Finally, the use of -1 on the high range will emit remaining traversers after the low range begins.
type Render ¶
type Render struct {
Template interface{}
}
Render takes current state and renders into requested structure
type Selector ¶
type Selector struct {
// contains filtered or unexported fields
}
Selector selects marks to return
type Skip ¶
type Skip struct {
// contains filtered or unexported fields
}
Skip limits incoming values to count
type Unwind ¶
type Unwind struct {
Field string
}
Unwind takes an array field and replicates the message for every element in the array
type ValueIncrement ¶
type ValueIncrement struct {
// contains filtered or unexported fields
}