# `SPARQL.Query`
[🔗](https://github.com/rdf-elixir/sparql-ex/blob/v0.3.12/lib/sparql/query/query.ex#L1)

A structure for SPARQL queries.

# `forms`

```elixir
@type forms() :: :select | :construct | :describe | :ask
```

# `t`

```elixir
@type t() :: module()
```

# `new`

Creates a `SPARQL.Query` struct.

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

# `translate`

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](https://hexdocs.pm/rdf/RDF.html) for
for more information about `RDF.default_prefixes/0` and `RDF.standard_prefixes/0`
and how to configure them.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
