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.
Implements
System.Collections.Generic.IComparer<T><INode>
System.Collections.Generic.IComparer<T><IValuedNode>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Query
Assembly: dotNetRdf.dll
Syntax
public class SparqlOrderingComparer : SparqlNodeComparer, ISparqlNodeComparer, IComparer<INode>, IComparer<IValuedNode>
Constructors
| Improve this Doc 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 |
---|---|---|
System.Globalization.CultureInfo | culture | The culture to use for string literal comparison. |
System.Globalization.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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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 |
Overrides
Implements
System.Collections.Generic.IComparer<T>
System.Collections.Generic.IComparer<T>