Click or drag to resize

VirtuosoManagerQuery Method (String)

Executes a SPARQL Query on the native Quad Store.

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

Parameters

sparqlQuery
Type: SystemString
SPARQL Query to execute.

Return Value

Type: Object

[Missing <returns> documentation for "M:VDS.RDF.Storage.VirtuosoManager.Query(System.String)"]

Implements

IQueryableStorageQuery(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 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