# `Gno.Store.SPARQL.Operation`
[🔗](https://github.com/rdf-elixir/gno/blob/v0.1.0/lib/gno/store/sparql_operation.ex#L1)

Represents a SPARQL operation to be executed against a `Gno.Store`.

Wraps SPARQL queries and updates with type metadata used by `Gno.Store.Adapter`
implementations to dispatch to the correct endpoint and `SPARQL.Client` function.

## Fields

- `name` — the operation name (e.g. `:select`, `:insert_data`, `:clear`)
- `type` — `:query` or `:update`
- `update_type` — for updates, further classifies the dispatch target:
  - `:query` — SPARQL updates with WHERE clause (INSERT, DELETE, UPDATE),
    dispatched to the update endpoint
  - `:data` — direct data operations (INSERT DATA, DELETE DATA),
    dispatched to the update endpoint
  - `:graph_store` — graph management operations (LOAD, CLEAR, DROP, CREATE,
    ADD, COPY, MOVE), dispatched to the graph store endpoint
- `payload` — the query string, update string, `RDF.Data` source, or `nil`
- `opts` — additional options passed through to `SPARQL.Client`

# `data`

```elixir
@type data() :: RDF.Data.Source.t()
```

# `name`

```elixir
@type name() :: atom()
```

# `payload`

```elixir
@type payload() :: query() | update() | data() | nil
```

# `query`

```elixir
@type query() :: String.t()
```

# `t`

```elixir
@type t() :: %Gno.Store.SPARQL.Operation{
  name: name(),
  opts: keyword(),
  payload: payload(),
  type: type(),
  update_type: update_type()
}
```

# `type`

```elixir
@type type() :: :query | :update
```

# `update`

```elixir
@type update() :: String.t()
```

# `update_type`

```elixir
@type update_type() :: :query | :data | :graph_store
```

# `add`

# `add!`

# `ask`

# `ask!`

# `clear`

# `clear!`

# `construct`

# `construct!`

# `copy`

# `copy!`

# `create`

# `create!`

# `delete`

# `delete!`

# `delete_data`

# `delete_data!`

# `describe`

# `describe!`

# `drop`

# `drop!`

# `insert`

# `insert!`

# `insert_data`

# `insert_data!`

# `load`

# `load!`

# `move`

# `move!`

# `new`

Creates a new SPARQL operation with the given name and payload.

The name determines the operation type (`:query` or `:update`) and subtype
automatically. See the convenience functions (`select/2`, `insert_data/2`, etc.)
for creating specific operation types.

# `new!`

# `select`

# `select!`

# `update`

# `update!`

---

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