Documentation
¶
Index ¶
Constants ¶
View Source
const ( JoinMethodJoin = "join" JoinMethodError = "error" )
View Source
const RS = ls.LS + "reshape/"
Variables ¶
View Source
var ( ErrInvalidSource = errors.New("Invalid source") ErrInvalidSourceValue = errors.New("Invalid source value") ErrSourceMustBeString = errors.New("source term value must be a string") ErrMultipleValues = errors.New("Multiple values/result columns found") )
View Source
var ErrInvalidConditional = errors.New("Invalid conditional")
View Source
var ErrInvalidVariables = errors.New("Invalid vars section")
View Source
var ErrJoinFailure = errors.New("Join failure")
View Source
var ReshapeTerms = struct { // If given, the If term specifies a predicate that should be true to reshape the node If string // Export defines a list of symbols that will be exported from the // opencypher expressions run in this node Export string // Expressions specify one or more expression to evaluate Expressions string // ValueExpr specifies the query to be used to generate the target value ValueExpr string // IfEmpty determines whether to reshape the node even if it has no value IfEmpty string // JoinMethod determines how to join multiple values to generate a single value JoinMethod string // JoinDelimiter specifies the join delimiter if there are multiple values to be combined JoinDelimiter string }{ If: ls.NewTerm(RS, "if", false, false, ls.OverrideComposition, struct { ifSemantics }{}), Export: ls.NewTerm(RS, "export", false, true, ls.OverrideComposition, struct { exportSemantics }{}), Expressions: ls.NewTerm(RS, "expr", false, true, ls.OverrideComposition, struct { exprSemantics }{}), ValueExpr: ls.NewTerm(RS, "valueExpr", false, false, ls.OverrideComposition, struct { valueExprSemantics }{}), IfEmpty: ls.NewTerm(RS, "ifEmpty", false, false, ls.OverrideComposition, nil), JoinMethod: ls.NewTerm(RS, "joinMethod", false, false, ls.OverrideComposition, nil), JoinDelimiter: ls.NewTerm(RS, "joinDelimiter", false, false, ls.OverrideComposition, nil), }
ReshapeTerms defines the terms used to specify reshaping layers
Functions ¶
func JoinValues ¶
Types ¶
type ErrInvalidSchemaNodeType ¶
type ErrInvalidSchemaNodeType []string
ErrInvalidSchemaNodeType is returned if the schema node type cannot be projected (such as a reference, which cannot happen after compilation)
func (ErrInvalidSchemaNodeType) Error ¶
func (e ErrInvalidSchemaNodeType) Error() string
type Mapper ¶
type Mapper struct {
ls.Ingester
// PropertyName specifies the property to lookup in the source
// graph. The property values give the target schema attribute IDs
PropertyName string
}
Mapper reads nodes from a source graph and creates a target graph based on a schema. This is used for mapping data across terminologies.
The nodes are selected based on a given node term. The node term in the source graph gives the target schema attributes IDs. For example, if the source graph nodes has properties
term: id
then, the mapper reads the node with `term`, finds the target schema attribute using `id`, and copies the value.
type ReshapeContext ¶
func (*ReshapeContext) SetSymbolValue ¶
func (p *ReshapeContext) SetSymbolValue(name string, value opencypher.Value)
Click to show internal directories.
Click to hide internal directories.