Configuration of a commit operation for a Gno.Service.
Defines the Gno.CommitMiddleware pipeline and handles different input changeset types.
Implements Gno.CommitOperation.Type to provide the standard commit workflow
executed by Gno.Commit.Processor:
- Initializes changesets from various input formats
- Computes effective changesets by querying current state
- Builds and executes SPARQL updates
- Handles empty changesets (configurable via
on_no_effective_changes) - Performs rollback on failure
Properties
middlewares- ordered list ofGno.CommitMiddlewareinstances invoked at each state transitionon_no_effective_changes- what to do when the computedGno.EffectiveChangesetcontains no changes:"error"(default) — return an error"skip"— skip the transaction phase, proceed to post-commit"proceed"— continue with an empty changeset through all phases
Summary
Functions
Builds a commit operation with the given ID and attributes.
Creates a new commit operation with an auto-generated blank node ID.
Returns the commit operation type module for the given IRI, or nil if not a commit operation type.
Checks if the given module is a Gno.CommitOperation.Type.
Types
Functions
Builds a commit operation with the given ID and attributes.
@spec from(Grax.Schema.t()) :: {:ok, t()} | {:error, any()}
@spec from!(Grax.Schema.t()) :: t()
@spec load( RDF.Graph.t() | RDF.Description.t(), RDF.IRI.coercible() | RDF.BlankNode.t(), opts :: keyword() ) :: {:ok, t()} | {:error, any()}
@spec load!( RDF.Graph.t() | RDF.Description.t(), RDF.IRI.coercible() | RDF.BlankNode.t(), opts :: keyword() ) :: t()
Creates a new commit operation with an auto-generated blank node ID.
Returns the commit operation type module for the given IRI, or nil if not a commit operation type.
Checks if the given module is a Gno.CommitOperation.Type.
Example
iex> Gno.CommitOperation.type?(Gno.CommitOperation)
true
iex> Gno.CommitOperation.type?(Gno.Commit)
false
iex> Gno.CommitOperation.type?(Gno.CommitLogger)
false
iex> Gno.CommitOperation.type?(NonExisting)
false