Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "pattern"

Index

Functions

Const patternVarCount

  • patternVarCount(p: Pattern): number

Const patternVars

  • patternVars(__namedParameters: [any, any, any]): string[]
  • Parameters

    • __namedParameters: [any, any, any]

    Returns string[]

Const resolvePathPattern

  • resolvePathPattern(__namedParameters: [any, Array, any], maxLen?: number): [Pattern[], string[]]
  • Takes a path triple pattern and max depth. The pattern's predicate must be a seq of preds. Returns a 2-elem vector [patterns vars], where patterns is a list of generated sub-query patterns with injected temp qvars for in between patterns and vars are the temp qvars themselves.

    Example:

    ["?s", [p1, p2, p3], "?o"] =>
    [
      [["?s", p1, "?__q0"], ["?__q0", p2, "?__q1"], ["?__q1", p3, "?o"] ],
      ["?__q0", "?__q1"]
    ]

    Parameters

    • __namedParameters: [any, Array, any]
    • Default value maxLen: number = p.length

    Returns [Pattern[], string[]]

Const sortPatterns

  • sortPatterns(patterns: Pattern[]): [any, any, any][]

Generated using TypeDoc