RDF.Dataset.pop

You're seeing just the function pop, go back to RDF.Dataset module for more information.

Specs

pop(t()) :: {RDF.Statement.t() | nil, t()}

Pops an arbitrary statement from a RDF.Dataset.

Link to this function

pop(dataset, graph_name)

View Source

Specs

Pops the graph with the given name.

When a graph with given name can not be found the optionally given default value or nil is returned.

Examples

iex> dataset = RDF.Dataset.new([
...>   {EX.S1, EX.P1, EX.O1, EX.Graph},
...>   {EX.S2, EX.P2, EX.O2}])
...> RDF.Dataset.pop(dataset, EX.Graph)
{RDF.Graph.new({EX.S1, EX.P1, EX.O1}, name: EX.Graph), RDF.Dataset.new({EX.S2, EX.P2, EX.O2})}
iex> RDF.Dataset.pop(dataset, EX.Foo)
{nil, dataset}