transform

package
v1.0.0-beta12 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TRANSFORM = ls.LS + "transform/"

Variables

View Source
var EvaluateTermSemantics = evaluateTermSemantics{}
View Source
var ExportTermSemantics = exportTermSemantics{}
View Source
var JoinWithTerm = ls.NewTerm(TRANSFORM, "joinWith", false, false, ls.OverrideComposition, nil)

JoinWithTerm specifies how to join multiple values. JoinWith: " " will join them using a space.

View Source
var MapContextSemantics = mapContextSemantics{}

MapContextTerm gives an opencypher expression that results in a node. That node will be used as the context for the map operations under that node

View Source
var MapPropertyTerm = ls.NewTerm(TRANSFORM, "mapProperty", false, false, ls.OverrideComposition, nil)

MapPropertyTerm defines the name of the property in the source graph nodes that contain the mapped schema node id. The contents of the nodes under the mapContext that have prop:schemaNodeId will be assigned to the current node

View Source
var MultipleTerm = ls.NewTerm(TRANSFORM, "multi", false, false, ls.OverrideComposition, nil)

MultipleTerm is used to specify if multiple values are allowed. If so, one node will be constructed for each value

View Source
var ValueExprTermSemantics = valueExprTermSemantics{}

Functions

func ApplyLayer

func ApplyLayer(ctx *ls.Context, g graph.Graph, layer *ls.Layer) error

ApplyLayer applies the given layer onto the graph.

The annotations of the given layer will be composed with all matching nodes of the graph.

func JoinValues

func JoinValues(values []string, delimiter string) string

Types

type ErrMultipleValues

type ErrMultipleValues struct{}

func (ErrMultipleValues) Error

func (e ErrMultipleValues) Error() string

type ErrReshape

type ErrReshape struct {
	Wrapped      error
	SchemaNodeID string
}

func (ErrReshape) Error

func (e ErrReshape) Error() string

func (ErrReshape) Unwrap

func (e ErrReshape) Unwrap() error

type Reshaper

type Reshaper struct {
	TargetSchema *ls.Layer
	Builder      ls.GraphBuilder
}

func (Reshaper) Reshape

func (reshaper Reshaper) Reshape(ctx *ls.Context, sourceGraph graph.Graph) error

Jump to

Keyboard shortcuts

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