VirtuosoManagerQuery Method (String) |
Namespace: VDS.RDF.Storage
[Missing <returns> documentation for "M:VDS.RDF.Storage.VirtuosoManager.Query(System.String)"]
Exception | Condition |
---|---|
RdfQueryException | Thrown if an error occurs in making the query. |
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.