Options
All
  • Public
  • Public/Protected
  • All
Menu

Module sparql

SPARQL related utilities

Index

Functions

hashBGP

  • hashBGP(bgp: TripleObject[], md5?: boolean): string
  • Hash Basic Graph pattern to assign them an unique ID

    Parameters

    • bgp: TripleObject[]

      Basic Graph Pattern to hash

    • Default value md5: boolean = false

      True if the ID should be hashed to md5, False to keep it as a plain text string

    Returns string

    An unique ID to identify the BGP

leftLinearJoinOrdering

  • leftLinearJoinOrdering(patterns: TripleObject[]): TripleObject[]
  • Perform a join ordering of a set of triple pattern, i.e., a BGP. Sort pattern such as they creates a valid left linear tree without cartesian products (unless it's required to evaluate the BGP)

    Parameters

    • patterns: TripleObject[]

      Set of triple pattern

    Returns TripleObject[]

    Order set of triple patterns

variablesFromPattern

  • variablesFromPattern(pattern: TripleObject): string[]
  • Get the set of SPARQL variables in a triple pattern

    Parameters

    • pattern: TripleObject

      Triple Pattern

    Returns string[]

    The set of SPARQL variables in the triple pattern

Generated using TypeDoc