-
Notifications
You must be signed in to change notification settings - Fork 8
Upgrading to RDF.ex 0.10
Marcel Otto edited this page Mar 20, 2022
·
3 revisions
The only breaking change in this version is that the RDF.Turtle.Encoder
no longer supports the encoding of RDF.Dataset
s. You'll have to aggregate an RDF.Dataset
to an RDF.Graph
on your own now. So, where you previously could do
RDF.Turtle.to_string(dataset)
you'll now have to do something like this
dataset
|> RDF.Dataset.graphs()
|> Enum.reduce(RDF.graph(), &RDF.Graph.add(&2, &1))
|> RDF.Turtle.to_string()
This change affects the SPARQL.Client, which needs to be upgraded to v0.4 to handle RDF.Dataset
s on the SPARQL.Client.insert_data/3
and SPARQL.Client.delete_data/3
functions.