Click or drag to resize

IInMemoryQueryableStoreExecuteQuery Method (IRdfHandler, ISparqlResultsHandler, SparqlQuery)

Note: This API is now obsolete.

Executes a SPARQL Query on the Triple Store processing the results with an appropriate handler from those provided.

Namespace:  VDS.RDF
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
Syntax
[ObsoleteAttribute("This method of making queries is often error prone due to misconceptions about what data is being queries and we recommend using an ISparqlQueryProcessor instead, see remarks for more discussion")]
void ExecuteQuery(
	IRdfHandler rdfHandler,
	ISparqlResultsHandler resultsHandler,
	SparqlQuery query
)

Parameters

rdfHandler
Type: VDS.RDFIRdfHandler
RDF Handler.
resultsHandler
Type: VDS.RDFISparqlResultsHandler
Results Handler.
query
Type: VDS.RDF.QuerySparqlQuery
Parsed SPARQL Query.

Return Value

Type: 
Remarks

This method of making queries often leads to no results because of misconceptions about what data is being queries. dotNetRDF's SPARQL engine only queries the default unnamed graph of the triple store (the graph added with a null URI) by default unless your query uses FROM clauses to change the default graph or you use GRAPH clauses to access named graphs in the store. Therefore a common mistake is to add a single graph to the store and then query the store which typically results in no results because usually the added graph is named and so is not queried.

We recommend using a ISparqlQueryProcessor instead for making queries over in-memory data since using our standard implementation (LeviathanQueryProcessor) affords you much more explicit control over which graphs are queried.

See Also