Class VirtualAlgebraOptimiser<TNodeID, TGraphID>
Abstract implementation of an algebra optimiser and expression transformer which optimises the algebra to replace any Node terms with Virtual Node terms for more efficient querying of virtualised RDF data.
Inherited Members
Namespace: VDS.RDF.Query.Optimisation
Assembly: dotNetRdf.dll
Syntax
public abstract class VirtualAlgebraOptimiser<TNodeID, TGraphID> : IAlgebraOptimiser, IExpressionTransformer
Type Parameters
| Name | Description |
|---|---|
| TNodeID | Node ID Type. |
| TGraphID | Graph ID Type. |
Constructors
| Edit this page View SourceVirtualAlgebraOptimiser(IVirtualRdfProvider<TNodeID, TGraphID>)
Creates a new Virtual Algebra Optimiser.
Declaration
public VirtualAlgebraOptimiser(IVirtualRdfProvider<TNodeID, TGraphID> provider)
Parameters
| Type | Name | Description |
|---|---|---|
| IVirtualRdfProvider<TNodeID, TGraphID> | provider | Virtual RDF Provider. |
Fields
| Edit this page View Source_provider
Virtual RDF Provider.
Declaration
protected IVirtualRdfProvider<TNodeID, TGraphID> _provider
Field Value
| Type | Description |
|---|---|
| IVirtualRdfProvider<TNodeID, TGraphID> |
Properties
| Edit this page View SourceUnsafeOptimisation
Determines whether an Optimiser will perform algebra optimizations that are potentially unsafe at execution time.
Declaration
public bool UnsafeOptimisation { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceCreateVirtualNode(TNodeID, INode)
Creates a virtual Node based on a given Value.
Declaration
protected abstract INode CreateVirtualNode(TNodeID id, INode value)
Parameters
| Type | Name | Description |
|---|---|---|
| TNodeID | id | Node ID. |
| INode | value | Value. |
Returns
| Type | Description |
|---|---|
| INode |
IsApplicable(SparqlQuery)
Returns that the optimiser is applicable to all queries.
Declaration
public bool IsApplicable(SparqlQuery q)
Parameters
| Type | Name | Description |
|---|---|---|
| SparqlQuery | q | Query. |
Returns
| Type | Description |
|---|---|
| bool |
IsApplicable(SparqlUpdateCommandSet)
Returns that the optimiser is applicable to all updates.
Declaration
public bool IsApplicable(SparqlUpdateCommandSet cmds)
Parameters
| Type | Name | Description |
|---|---|---|
| SparqlUpdateCommandSet | cmds | Updates. |
Returns
| Type | Description |
|---|---|
| bool |
Optimise(ISparqlAlgebra)
Optimises the algebra so that all Node terms are virtualised.
Declaration
public ISparqlAlgebra Optimise(ISparqlAlgebra algebra)
Parameters
| Type | Name | Description |
|---|---|---|
| ISparqlAlgebra | algebra | Algebra. |
Returns
| Type | Description |
|---|---|
| ISparqlAlgebra |
SubstitutePrimaryExpression(ISparqlExpression)
Substitutes a primary expression which is a Node term for a virtual Node term.
Declaration
protected ISparqlExpression SubstitutePrimaryExpression(ISparqlExpression expr)
Parameters
| Type | Name | Description |
|---|---|---|
| ISparqlExpression | expr | Expression. |
Returns
| Type | Description |
|---|---|
| ISparqlExpression |
Transform(ISparqlExpression)
Transforms an expression so Node terms are virtualised.
Declaration
public ISparqlExpression Transform(ISparqlExpression expr)
Parameters
| Type | Name | Description |
|---|---|---|
| ISparqlExpression | expr | Expression. |
Returns
| Type | Description |
|---|---|
| ISparqlExpression |