SPARQL Studio API / SparqlUtils / getQueryType
Function: getQueryType()
getQueryType(
query):QueryType|undefined
Defined in: sparql-utils/src/yasqe.ts:167
Detect the SPARQL query form by scanning the query text. Comments and the PREFIX/BASE prologue are skipped so the first real keyword (SELECT, CONSTRUCT, INSERT, ...) is matched. Returns undefined when nothing matches (e.g. an empty or still-typed query). Shared by both editors.
Parameters
query
string
Returns
QueryType | undefined