Gno.Store.SPARQL.Operation (Gno v0.1.0)

Copy Markdown View Source

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

Summary

Types

data()

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

name()

@type name() :: atom()

payload()

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

query()

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

t()

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

type()

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

update()

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

update_type()

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

Functions

add(source, target, opts \\ [])

add!(source, target, opts \\ [])

ask(query, opts \\ [])

ask!(query, opts \\ [])

clear(opts \\ [])

clear!(opts \\ [])

construct(query, opts \\ [])

construct!(query, opts \\ [])

copy(source, target, opts \\ [])

copy!(source, target, opts \\ [])

create(opts \\ [])

create!(opts \\ [])

delete(update, opts \\ [])

delete!(update, opts \\ [])

delete_data(data, opts \\ [])

delete_data!(data, opts \\ [])

describe(query, opts \\ [])

describe!(query, opts \\ [])

drop(opts \\ [])

drop!(opts \\ [])

insert(update, opts \\ [])

insert!(update, opts \\ [])

insert_data(data, opts \\ [])

insert_data!(data, opts \\ [])

load(iri, opts \\ [])

load!(iri, opts \\ [])

move(source, target, opts \\ [])

move!(source, target, opts \\ [])

new(name, payload, opts \\ [])

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!(name, payload, opts \\ [])

select(query, opts \\ [])

select!(query, opts \\ [])

update(update, opts \\ [])

update!(update, opts \\ [])