Compare two terms in the term order that termOrder metadata refers to.
This orders on term type first (default graph, blank nodes, IRIs, literals, quoted triples),
then on value, then on datatype, language, and base direction, and quoted triples component by component.
Values are compared as JavaScript strings, so on UTF-16 code units.
Unlike the SPARQL order, this is a total order in which two terms compare as equal exactly if they are
equal RDF terms, and it never has to interpret a literal. That makes it cheap, and safe to merge-join on.
It deliberately does not follow the SPARQL order: for example, "10"^^xsd:integer comes before
"9"^^xsd:integer.
Parameters
left: Term
A term.
right: Term
A term.
Returns number
A negative number if left comes first, a positive number if right comes first, and 0 if they are equal.
Compare two terms in the term order that
termOrdermetadata refers to.This orders on term type first (default graph, blank nodes, IRIs, literals, quoted triples), then on value, then on datatype, language, and base direction, and quoted triples component by component. Values are compared as JavaScript strings, so on UTF-16 code units.
Unlike the SPARQL order, this is a total order in which two terms compare as equal exactly if they are equal RDF terms, and it never has to interpret a literal. That makes it cheap, and safe to merge-join on. It deliberately does not follow the SPARQL order: for example, "10"^^xsd:integer comes before "9"^^xsd:integer.