core

package
v0.0.0-...-fa720cf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

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 Validate

func Validate(stmts []*gripql.GraphStatement, opts *gdbi.CompileOptions) error

Validate checks pipeline for chains of statements that won't work

Types

type Count

type Count struct{}

Count incoming elements

func (*Count) Process

func (c *Count) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs Count

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

func (*Distinct) Process

func (g *Distinct) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs distinct

type Fields

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

Fields selects fields from current element

func (*Fields) Process

func (f *Fields) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs Values step

type Has

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

Has filters based on data

func (*Has) Process

func (w *Has) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs Has

type HasID

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

HasID filters elements based on their id.

func (*HasID) Process

func (h *HasID) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs Count

type HasKey

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

HasKey filters elements based on whether it has one or more properties.

func (*HasKey) Process

func (h *HasKey) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs Count

type HasLabel

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

HasLabel filters elements based on their label.

func (*HasLabel) Process

func (h *HasLabel) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs Count

type InE

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

InE finds the incoming edges

func (*InE) Process

func (l *InE) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs InE

type Limit

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

Limit limits incoming values to count

func (*Limit) Process

func (l *Limit) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs limit

type LookupEdgeAdjIn

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

LookupEdgeAdjIn finds incoming edge

func (*LookupEdgeAdjIn) Process

Process runs LookupEdgeAdjIn

type LookupEdgeAdjOut

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

LookupEdgeAdjOut finds out edge

func (*LookupEdgeAdjOut) Process

Process runs LookupEdgeAdjOut

type LookupEdges

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

LookupEdges starts query by looking up edges

func (*LookupEdges) Process

func (l *LookupEdges) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs LookupEdges

type LookupVertexAdjIn

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

LookupVertexAdjIn finds incoming vertex

func (*LookupVertexAdjIn) Process

Process runs LookupVertexAdjIn

type LookupVertexAdjOut

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

LookupVertexAdjOut finds out vertex

func (*LookupVertexAdjOut) Process

Process runs out vertex

type LookupVerts

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

LookupVerts starts query by looking on vertices

func (*LookupVerts) Process

func (l *LookupVerts) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process LookupVerts

type LookupVertsIndex

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

LookupVertsIndex look up vertices by indexed based feature

func (*LookupVertsIndex) Process

Process LookupVertsIndex

type MarkSelect

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

MarkSelect moves to selected mark

func (*MarkSelect) Process

func (s *MarkSelect) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs Selector

type Marker

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

Marker marks the current element

func (*Marker) Process

func (m *Marker) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs Marker

type OutE

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

OutE finds the outgoing edges

func (*OutE) Process

func (l *OutE) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs OutE

type Path

type Path struct {
	Template interface{} //this isn't really used yet.
}

Path tells system to return path data

func (*Path) Process

func (r *Path) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs the render processor

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.

func (*Range) Process

func (r *Range) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs range

type Render

type Render struct {
	Template interface{}
}

Render takes current state and renders into requested structure

func (*Render) Process

func (r *Render) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs the render processor

type Selector

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

Selector selects marks to return

func (*Selector) Process

func (s *Selector) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs Selector

type Skip

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

Skip limits incoming values to count

func (*Skip) Process

func (o *Skip) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs offset

type Unwind

type Unwind struct {
	Field string
}

Unwind takes an array field and replicates the message for every element in the array

func (*Unwind) Process

func (r *Unwind) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Process runs the render processor

type ValueIncrement

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

func (*ValueIncrement) Process

type ValueSet

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

func (*ValueSet) Process

func (s *ValueSet) Process(ctx context.Context, man gdbi.Manager, in gdbi.InPipe, out gdbi.OutPipe) context.Context

Jump to

Keyboard shortcuts

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