Skip to content

SPARQL Studio API / SparqlUtils / getPrefixesFromQuery

Function: getPrefixesFromQuery() ​

getPrefixesFromQuery(query): Prefixes

Defined in: sparql-utils/src/yasqe.ts:66

Extract the PREFIX declarations from a SPARQL query string as a { prefix: iri } map. Shared by both editors (Monaco and CodeMirror) and used by SparqlResults to resolve prefixed names in results. A PREFIX must be preceded by start-of-string or whitespace.

Parameters ​

query ​

string

Returns ​

Prefixes