Skip to content

qanary-component-helpers/query-sparql

This page is auto-generated from TSDoc output. Edit the source file, not this Markdown.

  • Package: @leipzigtreechat/qanary-component-helpers
  • Source file: packages/qanary-component-helpers/src/query-sparql.ts

Transforms a stream to a promise

function streamToPromise(stream: internal.Readable): Promise<Array<T>>

Transforms a stream to a promise

Parameters

  • stream (internal.Readable): the stream to transform Returns
  • Promise<Array<T>>: the result of the stream as a promise Defined at: line 9
function selectSparql(endpointUrl: string, query: string): Promise<Array<T>>

Queries a sparql endpoint with the given select query

Parameters

  • endpointUrl (string): the sparql endpoint to query
  • query (string): the select query to execute Returns
  • Promise<Array<T>>: the result of the query Defined at: line 28
function askSparql(endpointUrl: string, query: string): Promise<boolean>

Queries a sparql endpoint with the given ask query

Parameters

  • endpointUrl (string): the sparql endpoint to query
  • query (string): the ask query to execute Returns
  • Promise<boolean>: the result of the query Defined at: line 41
function updateSparql(endpointUrl: string, query: string): Promise<void>

Queries a sparql endpoint with the given update query

Parameters

  • endpointUrl (string): the sparql endpoint to query
  • query (string): the update query to execute Returns
  • Promise<void> Defined at: line 52