Class: SPARQL::Algebra::Operator::Asc

Inherits:
Unary show all
Includes:
Evaluatable
Defined in:
lib/sparql/algebra/operator/asc.rb

Overview

The SPARQL ascending sort operator.

Examples:

(prefix ((foaf: <http://xmlns.com/foaf/0.1/>))
  (project (?name)
    (order ((asc ?name))
      (bgp (triple ?x foaf:name ?name)))))

See Also:

Direct Known Subclasses

Desc

Constant Summary

NAME =
:asc

Constants inherited from Unary

Unary::ARITY

Constants inherited from SPARQL::Algebra::Operator

ARITY

Instance Attribute Summary

Attributes inherited from SPARQL::Algebra::Operator

#operands, #options

Instance Method Summary collapse

Methods included from Evaluatable

#apply, #memoize

Methods inherited from Unary

#initialize

Methods inherited from SPARQL::Algebra::Operator

arity, #base_uri, base_uri, base_uri=, #boolean, #constant?, #eql?, #evaluatable?, evaluate, #executable?, for, #initialize, #inspect, #operand, #optimize, #prefixes, prefixes, prefixes=, #to_sse, #to_sxp, #variable?

Methods included from Expression

cast, #constant?, for, new, open, #optimize, parse, #to_sse, #variable?

Constructor Details

This class inherits a constructor from SPARQL::Algebra::Operator::Unary

Instance Method Details

#evaluate(bindings = {}) ⇒ RDF::Term

Returns the evaluation of it's operand. Default comparison is in ascending order. Ordering is applied in Order.

Parameters:

  • bindings (RDF::Query::Solution, #[]) (defaults to: {})

Returns:



24
25
26
# File 'lib/sparql/algebra/operator/asc.rb', line 24

def evaluate(bindings = {})
  operand(0).evaluate(bindings)
end