Click or drag to resize

VirtuosoManagerQuery Method (IRdfHandler, ISparqlResultsHandler, String)

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

Namespace:  VDS.RDF.Storage
Assembly:  dotNetRDF.Data.Virtuoso (in dotNetRDF.Data.Virtuoso.dll) Version: 2.0.1+5.Branch.master.Sha.2b2692866fdc3f3bb5bc6f318ab2f93abcc1a689
Syntax
public void Query(
	IRdfHandler rdfHandler,
	ISparqlResultsHandler resultsHandler,
	string sparqlQuery
)

Parameters

rdfHandler
Type: VDS.RDFIRdfHandler
RDF Handler.
resultsHandler
Type: VDS.RDFISparqlResultsHandler
Results Handler.
sparqlQuery
Type: SystemString
SPARQL Query to execute.

Implements

IQueryableStorageQuery(IRdfHandler, ISparqlResultsHandler, String)
Exceptions
ExceptionCondition
RdfQueryExceptionThrown if an error occurs in making the query.
Remarks

This method will first attempt to parse the query into a SparqlQuery object. If this succeeds then the Query Type can be used to determine how to handle the response.

If the parsing fails then the query will be executed anyway using Virtuoso's SPASQL (SPARQL + SQL) syntax. Parsing can fail because Virtuoso supports various SPARQL non-standardised extensions which the library does not support. These include things like aggregate functions but also SPARUL updates (the non-standard precusor to SPARQL 1.1 Update).

If you use an aggregate query which has an Integer, Decimal or Double type result then you will receive a SparqlResultSet containing a single SparqlResult which has contains a binding for a variable named Result which contains a LiteralNode typed to the appropriate datatype.

See Also