interface IRdfJsSourceExtended {
    countQuads?: (
        subject?: Term,
        predicate?: Term,
        object?: Term,
        graph?: Term,
    ) => number | Promise<number>;
    features?: { quotedTripleFiltering?: boolean };
    matchBindings?: (
        bindingsFactory: BindingsFactory,
        subject: Term,
        predicate: Term,
        object: Term,
        graph: Term,
    ) => EventEmitter<DefaultEventMap>;
    match(
        subject?: null | Term,
        predicate?: null | Term,
        object?: null | Term,
        graph?: null | Term,
    ): Stream<Quad>;
}

Hierarchy

  • Source
    • IRdfJsSourceExtended

Properties

countQuads?: (
    subject?: Term,
    predicate?: Term,
    object?: Term,
    graph?: Term,
) => number | Promise<number>

Return an estimated count of the number of quads matching the given pattern.

The better the estimate, the better the query engine will be able to optimize the query.

Type declaration

    • (
          subject?: Term,
          predicate?: Term,
          object?: Term,
          graph?: Term,
      ): number | Promise<number>
    • Parameters

      • Optionalsubject: Term

        An optional subject.

      • Optionalpredicate: Term

        An optional predicate.

      • Optionalobject: Term

        An optional object.

      • Optionalgraph: Term

        An optional graph.

      Returns number | Promise<number>

features?: { quotedTripleFiltering?: boolean }

A record indicating supported features of this source.

Type declaration

  • OptionalquotedTripleFiltering?: boolean

    If true, this source supports passing quad patterns with quoted quad patterns in the match method. If false (or if features is undefined), such quoted quad patterns can not be passed, and must be replaced by undefined and filtered by the caller afterwards.

matchBindings?: (
    bindingsFactory: BindingsFactory,
    subject: Term,
    predicate: Term,
    object: Term,
    graph: Term,
) => EventEmitter<DefaultEventMap>

Returns a stream that produces all bindings matching the pattern.

Type declaration

    • (
          bindingsFactory: BindingsFactory,
          subject: Term,
          predicate: Term,
          object: Term,
          graph: Term,
      ): EventEmitter<DefaultEventMap>
    • Parameters

      • bindingsFactory: BindingsFactory

        The factory that will be used to create bindings.

      • subject: Term

        The subject, which can be a variable.

      • predicate: Term

        The predicate, which can be a variable.

      • object: Term

        The object, which can be a variable.

      • graph: Term

        The graph, which can be a variable.

      Returns EventEmitter<DefaultEventMap>

Methods

  • Returns a stream that processes all quads matching the pattern.

    Parameters

    • Optionalsubject: null | Term

      The optional subject.

    • Optionalpredicate: null | Term

      The optional predicate.

    • Optionalobject: null | Term

      The optional object.

    • Optionalgraph: null | Term

      The optional graph.

    Returns Stream<Quad>

    The resulting quad stream.