View Source SPARQL.Query (SPARQL.ex v0.3.7)

A structure for SPARQL queries.

Link to this section Summary

Functions

Creates a SPARQL.Query struct from a SPARQL language string.

Link to this section Types

Specs

forms() :: :select | :construct | :describe | :ask

Specs

t() :: module()

Link to this section Functions

Link to this function

new(query, options \\ [])

View Source

Creates a SPARQL.Query struct.

See translate/2 for more information about default prefixes, all of which applies also to this function.

Link to this function

translate(string, options \\ [])

View Source

Creates a SPARQL.Query struct from a SPARQL language string.

By default the configured RDF.default_prefixes/0 will be automatically defined for the query, so that you can use these prefixes without having them defined manually in your query. You can overwrite these default prefixes and define another set of prefixes with the default_prefixes option. If you don't want to use default prefixes for the given query you can pass nil or an empty map for the default_prefixes option.

If you don't want to use default prefixes at all, just don't configure any and set the rdf configuration flag use_standard_prefixes to false. See the API documentation of RDF.ex for for more information about RDF.default_prefixes/0 and RDF.standard_prefixes/0 and how to configure them.