Gno.Commit (Gno v0.1.0)

Copy Markdown View Source

The result of a successful commit operation.

Created during the prepare step of the Gno.Commit.Processor pipeline. The commit's __id__ is a UUID-based IRI generated automatically.

Fields

Summary

Types

t()

@type t() :: %Gno.Commit{
  __additional_statements__: term(),
  __id__: term(),
  changeset: term(),
  time: term()
}

Functions

build(id)

build(id, initial)

build!(id)

build!(id, initial)

build_id(attributes)

from(value)

@spec from(Grax.Schema.t()) :: {:ok, t()} | {:error, any()}

from!(value)

@spec from!(Grax.Schema.t()) :: t()

load(graph, id, opts \\ [])

@spec load(
  RDF.Graph.t() | RDF.Description.t(),
  RDF.IRI.coercible() | RDF.BlankNode.t(),
  opts :: keyword()
) :: {:ok, t()} | {:error, any()}

load!(graph, id, opts \\ [])

@spec load!(
  RDF.Graph.t() | RDF.Description.t(),
  RDF.IRI.coercible() | RDF.BlankNode.t(),
  opts :: keyword()
) :: t()

new(changes, args \\ [])

Creates a new commit from an Gno.EffectiveChangeset or keyword arguments.

Automatically generates a UUID-based commit ID and sets the timestamp.

new!(changes, args \\ [])

validate(commit)