oxrdflib icon indicating copy to clipboard operation
oxrdflib copied to clipboard

No result using `Dataset(store="Oxigraph")`

Open namedgraph opened this issue 1 year ago • 10 comments

Hi,

I'm getting the expected result using Dataset() but not Dataset(store="Oxigraph"):

from rdflib import Dataset

query = """
    SELECT *
    WHERE
    {{
        ?s ?p ?o .
    }}
        """

data="<http://s> <http://p> <http://o> ."

print("Dataset")
ds = Dataset()
ds.default_context.parse(data=data, format="ntriples")

qres = ds.query(query)
for row in qres:
    print(row)

print("Dataset(store=\"Oxigraph\")")
ds = Dataset(store="Oxigraph")
ds.default_context.parse(data=data, format="ntriples")

qres = ds.query(query)
for row in qres:
    print(row)

Output:

Dataset
(rdflib.term.URIRef('http://o'), rdflib.term.URIRef('http://p'), rdflib.term.URIRef('http://s'))
Dataset(store="Oxigraph")

namedgraph avatar Jun 09 '23 11:06 namedgraph