A comunica Path ZeroOrOne Query Operation Actor.

Hierarchy (View Summary)

Constructors

Properties

beforeActors: Actor<
    IActionQueryOperation,
    IActorTest,
    IQueryOperationResult,
    undefined,
>[] = []

Actor that must be registered in the bus before this actor.

bus: Bus<
    Actor<
        IActionQueryOperation,
        IActorTest,
        IQueryOperationResult,
        undefined,
    >,
    IActionQueryOperation,
    IActorTest,
    IQueryOperationResult,
    undefined,
>

The bus this actor subscribes to.

mediatorMergeBindingsContext: MediatorMergeBindingsContext
mediatorQueryOperation: MediatorQueryOperation
name: string

The name for this actor.

{<rdf:subject>}
operationName: string
predicateType: string

Methods

  • Pushes all terms to iterator it that are a solution of object predicate* ?o.

    Parameters

    • algebraFactory: Factory

      The algebra factory.

    • object: Term

      Term of where we start the predicate* search.

    • predicate: PropertyPathSymbol

      Predicate of the *-path.

    • graph: Term

      The graph in which we search for the pattern.

    • context: IActionContext
    • termHashes: Record<string, Term>

      Remembers the objects we've already searched for.

    • it: BufferedIterator<Term>

      Iterator to push terms to.

    • counter: any

      Counts how many searches are in progress to close it when needed (when counter == 0).

    Returns Promise<undefined | () => Promise<MetadataBindings>>

    The results metadata.

  • Returns an iterator with Bindings of the query subject predicate* ?o or subject predicate+ ?o If graph is a variable, it will also be in those bindings

    Parameters

    • subject: Term

      Term of where we start the predicate* search.

    • predicate: PropertyPathSymbol

      Predicate of the *-path.

    • object: Variable

      Variable of the zeroOrMore-query.

    • graph: Term

      The graph in which we search for the pattern. (Possibly a variable)

    • context: IActionContext

      The context to pass to sub-opertations

    • emitFirstSubject: boolean

      If the path operation is predicate*, otherwise it is predicate+.

    • algebraFactory: Factory

      The algebra factory.

    • bindingsFactory: BindingsFactory

      The data factory.

    Returns Promise<IPathResultStream>

    Iterator to where all bindings of query should have been pushed.

  • Pushes all terms to iterator it that are a solution of ?s predicate* ?o.

    Parameters

    • subjectVar: Variable

      String representation of subjectVariable

    • objectVar: Variable

      String representation of objectVariable

    • subjectVal: Term

      Term of where we start the predicate* search.

    • objectVal: Term

      Found solution for an object, start for the new step.

    • predicate: PropertyPathSymbol

      Predicate of the *-path.

    • graph: Term

      The graph in which we search for the pattern.

    • context: IActionContext
    • termHashesGlobal: Record<string, Promise<Term[]>>

      Remembers solutions for when objectVal is already been calculated, can be reused when same objectVal occurs

    • termHashesCurrentSubject: Record<string, boolean>

      Remembers the pairs we've already searched for, can stop searching if so.

    • it: BufferedIterator<Bindings>

      Iterator to push terms to.

    • counter: any

      Counts how many searches are in progress to close it when needed (when counter == 0).

    • algebraFactory: Factory

      The algebra factory.

    • bindingsFactory: BindingsFactory

      The bindings factory.

    Returns Promise<void>

    All solutions of query should have been pushed to it by then.