Class SparqlOrderingComparer
Comparer class for use in SPARQL ORDER BY - implements the Semantics broadly similar to the relational operator but instead of erroring using Node/Lexical ordering where an error would occur it makes an appropriate decision.
Inherited Members
Namespace: VDS.RDF.Query
Assembly: dotNetRdf.dll
Syntax
public class SparqlOrderingComparer : SparqlNodeComparer, ISparqlNodeComparer, IComparer<INode>, IComparer<IValuedNode>
Constructors
| Edit this page View SourceSparqlOrderingComparer(CultureInfo, CompareOptions)
Create a new comparer that uses the specified culture and options when comparing string literals.
Declaration
public SparqlOrderingComparer(CultureInfo culture, CompareOptions options)
Parameters
Type | Name | Description |
---|---|---|
CultureInfo | culture | The culture to use for string literal comparison. |
CompareOptions | options | The string comparison options to apply to string literal comparison. |
SparqlOrderingComparer(ISparqlNodeComparer)
Create a new comparer that uses the same culture and comparison options as the specified node comparer.
Declaration
public SparqlOrderingComparer(ISparqlNodeComparer nodeComparer)
Parameters
Type | Name | Description |
---|---|---|
ISparqlNodeComparer | nodeComparer | The node comparer whose culture and comparison options are to be used. |
Methods
| Edit this page View SourceCompare(INode, INode)
Compares two Nodes.
Declaration
public override int Compare(INode x, INode y)
Parameters
Type | Name | Description |
---|---|---|
INode | x | Node. |
INode | y | Node. |
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceCompare(IValuedNode, IValuedNode)
Compares two Nodes.
Declaration
public override int Compare(IValuedNode x, IValuedNode y)
Parameters
Type | Name | Description |
---|---|---|
IValuedNode | x | Node. |
IValuedNode | y | Node. |
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceDateTimeCompare(IValuedNode, IValuedNode)
Compares two Date Times for Date Time ordering.
Declaration
protected override int DateTimeCompare(IValuedNode x, IValuedNode y)
Parameters
Type | Name | Description |
---|---|---|
IValuedNode | x | Node. |
IValuedNode | y | Node. |
Returns
Type | Description |
---|---|
int |