RDF.Description.fetch
You're seeing just the function
fetch
, go back to RDF.Description module for more information.
Specs
fetch(t(), RDF.Statement.coercible_predicate()) :: {:ok, [RDF.Statement.object()]} | :error
Fetches the objects for the given predicate of a Description.
When the predicate can not be found :error
is returned.
Examples
iex> RDF.Description.new(EX.S, init: {EX.p, EX.O}) |> RDF.Description.fetch(EX.p)
{:ok, [RDF.iri(EX.O)]}
iex> RDF.Description.new(EX.S, init: [{EX.P, EX.O1}, {EX.P, EX.O2}])
...> |> RDF.Description.fetch(EX.P)
{:ok, [RDF.iri(EX.O1), RDF.iri(EX.O2)]}
iex> RDF.Description.new(EX.S) |> RDF.Description.fetch(EX.foo)
:error