Options
All
  • Public
  • Public/Protected
  • All
Menu

A Comunica SPARQL query engine.

Hierarchy

  • QueryEngineBase
    • QueryEngine

Index

Constructors

constructor

  • new QueryEngine(engine?: ActorInitQueryBase): QueryEngine

Methods

explain

  • explain<QueryFormatTypeInner>(query: QueryFormatTypeInner, context: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext, explainMode: QueryExplainMode): Promise<IQueryExplained>
  • Explain the given query

    Type parameters

    • QueryFormatTypeInner: QueryFormatType

    Parameters

    • query: QueryFormatTypeInner

      A query string or algebra.

    • context: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext

      An optional query context.

    • explainMode: QueryExplainMode

      The explain mode.

    Returns Promise<IQueryExplained>

    A promise that resolves to the query output or explanation.

getResultMediaTypeFormats

  • getResultMediaTypeFormats(context?: any): Promise<Record<string, string>>
  • Parameters

    • Optional context: any

      An optional context.

    Returns Promise<Record<string, string>>

    } All available SPARQL result media type formats.

getResultMediaTypes

  • getResultMediaTypes(context?: any): Promise<Record<string, number>>
  • Parameters

    • Optional context: any

      An optional context.

    Returns Promise<Record<string, number>>

    } All available SPARQL (weighted) result media types.

invalidateHttpCache

  • invalidateHttpCache(url?: string, context?: any): Promise<any>
  • Invalidate all internal caches related to the given page URL. If no page URL is given, then all pages will be invalidated.

    Parameters

    • Optional url: string

      The page URL to invalidate.

    • Optional context: any

      An optional ActionContext to pass to the actors.

    Returns Promise<any>

    A promise resolving when the caches have been invalidated.

query

  • query<QueryFormatTypeInner>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext): Promise<QueryType>
  • Evaluate the given query

    Type parameters

    • QueryFormatTypeInner: QueryFormatType

    Parameters

    • query: QueryFormatTypeInner

      A query string or algebra.

    • Optional context: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext

      An optional query context.

    Returns Promise<QueryType>

    A promise that resolves to the query output.

queryBindings

  • queryBindings<QueryFormatTypeInner>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext): Promise<BindingsStream>
  • Type parameters

    • QueryFormatTypeInner: QueryFormatType

    Parameters

    • query: QueryFormatTypeInner
    • Optional context: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext

    Returns Promise<BindingsStream>

queryBoolean

  • queryBoolean<QueryFormatTypeInner>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext): Promise<boolean>
  • Type parameters

    • QueryFormatTypeInner: QueryFormatType

    Parameters

    • query: QueryFormatTypeInner
    • Optional context: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext

    Returns Promise<boolean>

Protected queryOfType

  • queryOfType<QueryFormatTypeInner, QueryTypeOut>(query: QueryFormatTypeInner, context: undefined | (QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext), expectedType: QueryTypeOut["resultType"]): Promise<ReturnType<QueryTypeOut["execute"]>>
  • Type parameters

    • QueryFormatTypeInner: QueryFormatType

    • QueryTypeOut: QueryEnhanced

    Parameters

    • query: QueryFormatTypeInner
    • context: undefined | (QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext)
    • expectedType: QueryTypeOut["resultType"]

    Returns Promise<ReturnType<QueryTypeOut["execute"]>>

queryOrExplain

  • queryOrExplain<QueryFormatTypeInner>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext): Promise<IQueryExplained | QueryType>
  • Evaluate or explain the given query

    Type parameters

    • QueryFormatTypeInner: QueryFormatType

    Parameters

    • query: QueryFormatTypeInner

      A query string or algebra.

    • Optional context: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext

      An optional query context.

    Returns Promise<IQueryExplained | QueryType>

    A promise that resolves to the query output or explanation.

queryQuads

  • queryQuads<QueryFormatTypeInner>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext): Promise<AsyncIterator<Quad> & ResultStream<Quad>>
  • Type parameters

    • QueryFormatTypeInner: QueryFormatType

    Parameters

    • query: QueryFormatTypeInner
    • Optional context: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext

    Returns Promise<AsyncIterator<Quad> & ResultStream<Quad>>

queryVoid

  • queryVoid<QueryFormatTypeInner>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext): Promise<void>
  • Type parameters

    • QueryFormatTypeInner: QueryFormatType

    Parameters

    • query: QueryFormatTypeInner
    • Optional context: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext

    Returns Promise<void>

resultToString

  • resultToString(queryResult: Query<any>, mediaType?: string, context?: any): Promise<IActorQueryResultSerializeOutput>
  • Convert a query result to a string stream based on a certain media type.

    Parameters

    • queryResult: Query<any>

      A query result.

    • Optional mediaType: string

      A media type.

    • Optional context: any

      An optional context.

    Returns Promise<IActorQueryResultSerializeOutput>

    A text stream.

Static finalToInternalResult

  • finalToInternalResult(finalResult: Query<any>): Promise<IQueryOperationResult>
  • Convert a final query result to an internal one.

    Parameters

    • finalResult: Query<any>

      A final query result.

    Returns Promise<IQueryOperationResult>

Static internalToFinalResult

  • internalToFinalResult(internalResult: IQueryOperationResult): QueryType
  • Convert an internal query result to a final one.

    Parameters

    • internalResult: IQueryOperationResult

      An intermediary query result.

    Returns QueryType

Generated using TypeDoc