This repository was archived by the owner on Feb 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Query Datasets
Efimster edited this page Mar 26, 2014
·
2 revisions
The dataset description of a query consists of the FROM and FROM NAMED clauses present in the query, these indicate to a query engine which graph(s) to use and where to use them when answering queries.
Graphs specified in the FROM clause are used to form the default graph, this is the graph that queries operate over except when a GRAPH clause is encountered.
Graphs specified in the FROM NAMED clauses are named graphs that may be accessed using a GRAPH clause in your query.
Sample:
res = dyno.Select(
prefixes: new[] { SPARQL.Prefix("foaf:", "http://xmlns.com/foaf/0.1/"),
SPARQL.Prefix("graph", "http://example.org/foaf/")},
from: "http://example.org/foaf/def",
fromNamed: new[] {"http://example.org/foaf/aliceFoaf", "http://example.org/foaf/bobFoaf"},
projection: "?g ?s ?p ?o",
where: SPARQL.Group(
SPARQL.Graph("?g",
SPARQL.Triple("?s ?p ?o")
)
)
);